Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
175b74bf
Commit
175b74bf
authored
Mar 05, 2020
by
Peter Eastman
Browse files
Prefer runtime compiler over nvcc
parent
ca4c03c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
11 deletions
+1
-11
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+1
-11
No files found.
platforms/cuda/src/CudaContext.cpp
View file @
175b74bf
...
...
@@ -132,16 +132,6 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
isNvccAvailable
=
(
res
==
0
&&
stat
(
tempDir
.
c_str
(),
&
info
)
==
0
);
int
cudaDriverVersion
;
cuDriverGetVersion
(
&
cudaDriverVersion
);
static
bool
hasShownNvccWarning
=
false
;
if
(
hasCompilerKernel
&&
!
isNvccAvailable
&&
!
hasShownNvccWarning
&&
cudaDriverVersion
<
8000
)
{
hasShownNvccWarning
=
true
;
printf
(
"Could not find nvcc. Using runtime compiler, which may produce slower performance. "
);
#ifdef WIN32
printf
(
"Set CUDA_BIN_PATH to specify where nvcc is located.
\n
"
);
#else
printf
(
"Set OPENMM_CUDA_COMPILER to specify where nvcc is located.
\n
"
);
#endif
}
if
(
hostCompiler
.
size
()
>
0
)
this
->
compiler
=
compiler
+
" --compiler-bindir "
+
hostCompiler
;
if
(
!
hasInitializedCuda
)
{
...
...
@@ -575,7 +565,7 @@ CUmodule CudaContext::createModule(const string source, const map<string, string
// If the runtime compiler plugin is available, use it.
if
(
hasCompilerKernel
&&
!
isNvccAvailable
)
{
if
(
hasCompilerKernel
)
{
string
ptx
=
compilerKernel
.
getAs
<
CudaCompilerKernel
>
().
createModule
(
src
.
str
(),
"-arch=compute_"
+
gpuArchitecture
+
" "
+
options
,
*
this
);
// If possible, write the PTX out to a temporary file so we can cache it for later use.
...
...
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