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
65be5156
Commit
65be5156
authored
Oct 13, 2016
by
peastman
Committed by
GitHub
Oct 13, 2016
Browse files
Merge pull request #1629 from peastman/warning
Remove warning about runtime compiler on CUDA 8.0
parents
32d2707c
fd91f608
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+7
-5
No files found.
platforms/cuda/src/CudaContext.cpp
View file @
65be5156
...
@@ -130,8 +130,10 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
...
@@ -130,8 +130,10 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
#endif
#endif
struct
stat
info
;
struct
stat
info
;
isNvccAvailable
=
(
res
==
0
&&
stat
(
tempDir
.
c_str
(),
&
info
)
==
0
);
isNvccAvailable
=
(
res
==
0
&&
stat
(
tempDir
.
c_str
(),
&
info
)
==
0
);
int
cudaDriverVersion
;
cuDriverGetVersion
(
&
cudaDriverVersion
);
static
bool
hasShownNvccWarning
=
false
;
static
bool
hasShownNvccWarning
=
false
;
if
(
hasCompilerKernel
&&
!
isNvccAvailable
&&
!
hasShownNvccWarning
)
{
if
(
hasCompilerKernel
&&
!
isNvccAvailable
&&
!
hasShownNvccWarning
&&
cudaDriverVersion
<
8000
)
{
hasShownNvccWarning
=
true
;
hasShownNvccWarning
=
true
;
printf
(
"Could not find nvcc. Using runtime compiler, which may produce slower performance. "
);
printf
(
"Could not find nvcc. Using runtime compiler, which may produce slower performance. "
);
#ifdef WIN32
#ifdef WIN32
...
@@ -208,14 +210,14 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
...
@@ -208,14 +210,14 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
int
major
,
minor
;
int
major
,
minor
;
CHECK_RESULT
(
cuDeviceComputeCapability
(
&
major
,
&
minor
,
device
));
CHECK_RESULT
(
cuDeviceComputeCapability
(
&
major
,
&
minor
,
device
));
int
numThreadBlocksPerComputeUnit
=
(
major
>=
6
?
4
:
6
);
int
numThreadBlocksPerComputeUnit
=
(
major
>=
6
?
4
:
6
);
#if __CUDA_API_VERSION
< 7000
if
(
cudaDriverVersion
<
7000
)
{
// This is a workaround to support GTX 980 with CUDA 6.5. It reports
// This is a workaround to support GTX 980 with CUDA 6.5. It reports
// its compute capability as 5.2, but the compiler doesn't support
// its compute capability as 5.2, but the compiler doesn't support
// anything beyond 5.0.
// anything beyond 5.0.
if
(
major
==
5
)
if
(
major
==
5
)
minor
=
0
;
minor
=
0
;
#endif
}
#if __CUDA_API_VERSION
< 8000
if
(
cudaDriverVersion
<
8000
)
{
// This is a workaround to support Pascal with CUDA 7.5. It reports
// This is a workaround to support Pascal with CUDA 7.5. It reports
// its compute capability as 6.x, but the compiler doesn't support
// its compute capability as 6.x, but the compiler doesn't support
// anything beyond 5.3.
// anything beyond 5.3.
...
@@ -223,7 +225,7 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
...
@@ -223,7 +225,7 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
major
=
5
;
major
=
5
;
minor
=
3
;
minor
=
3
;
}
}
#endif
}
gpuArchitecture
=
intToString
(
major
)
+
intToString
(
minor
);
gpuArchitecture
=
intToString
(
major
)
+
intToString
(
minor
);
computeCapability
=
major
+
0.1
*
minor
;
computeCapability
=
major
+
0.1
*
minor
;
...
...
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