Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
a05b4823
Unverified
Commit
a05b4823
authored
Feb 13, 2020
by
Chris Sullivan
Committed by
GitHub
Feb 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default the GPU backend to DEX. (#4327)
parent
8063c2ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
34 deletions
+1
-34
CMakeLists.txt
CMakeLists.txt
+1
-1
CMakeLists.txt
src/ngraph/runtime/gpu/CMakeLists.txt
+0
-9
gpu_compiled_function.cpp
src/ngraph/runtime/gpu/gpu_compiled_function.cpp
+0
-24
No files found.
CMakeLists.txt
View file @
a05b4823
...
...
@@ -620,7 +620,7 @@ if (NGRAPH_MLIR_ENABLE)
include
(
cmake/external_mlir.cmake
)
endif
()
if
(
(
NGRAPH_GPU_ENABLE OR NGRAPH_CPU_ENABLE
)
AND NOT NGRAPH_DEX_ONLY
)
if
(
NGRAPH_CPU_ENABLE
AND NOT NGRAPH_DEX_ONLY
)
set
(
NGRAPH_CODEGEN_ENABLE TRUE
)
else
()
set
(
NGRAPH_CODEGEN_ENABLE FALSE
)
...
...
src/ngraph/runtime/gpu/CMakeLists.txt
View file @
a05b4823
...
...
@@ -51,10 +51,6 @@ set(SRC
op/rnn.cpp
)
if
(
NOT NGRAPH_DEX_ONLY
)
list
(
APPEND SRC gpu_external_function.cpp
)
endif
()
set
(
CUDA_INC
${
PROJECT_SOURCE_DIR
}
/src/
)
...
...
@@ -152,11 +148,6 @@ if (NGRAPH_GPU_ENABLE)
SOVERSION
${
NGRAPH_API_VERSION
}
)
endif
()
target_link_libraries
(
gpu_backend PUBLIC ngraph
)
if
(
NGRAPH_DEX_ONLY
)
target_compile_definitions
(
gpu_backend PRIVATE
"NGRAPH_DEX_ONLY"
)
else
()
target_link_libraries
(
gpu_backend PUBLIC codegen
)
endif
()
find_library
(
CUDA_nvrtc_LIBRARY nvrtc
PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64
)
find_library
(
CUDA_cuda_LIBRARY cuda
...
...
src/ngraph/runtime/gpu/gpu_compiled_function.cpp
View file @
a05b4823
...
...
@@ -120,31 +120,7 @@ std::shared_ptr<runtime::gpu::GPUCompiledFunction> runtime::gpu::GPUCompiledFunc
const
std
::
shared_ptr
<
ngraph
::
Function
>&
function
,
const
std
::
shared_ptr
<
GPU_Backend
::
BackendContext
>&
shared_context
)
{
#if defined(NGRAPH_DEX_ONLY)
return
std
::
make_shared
<
runtime
::
gpu
::
GPUInternalFunction
>
(
function
,
shared_context
);
#else
// For now codegen is default unless explicitly disabled
bool
use_codegen
=
true
;
if
(
auto
env
=
std
::
getenv
(
"NGRAPH_CODEGEN"
))
{
std
::
string
env_codegen
(
env
);
for
(
auto
&
opt
:
get_case_variants
({
"0"
,
"false"
}))
{
if
(
env_codegen
==
opt
)
{
use_codegen
=
false
;
}
}
}
if
(
use_codegen
)
{
return
std
::
make_shared
<
runtime
::
gpu
::
GPUExternalFunction
>
(
function
,
shared_context
);
}
else
{
return
std
::
make_shared
<
runtime
::
gpu
::
GPUInternalFunction
>
(
function
,
shared_context
);
}
#endif
}
void
runtime
::
gpu
::
GPUCompiledFunction
::
compile
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment