Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bill Hoffman
CMake
Commits
a173118f
Commit
a173118f
authored
Aug 23, 2018
by
Brad King
Browse files
Merge branch 'cuda-no-cublas_device' into release-3.12
Merge-request: !2296
parents
8a3cba52
122c7974
Changes
3
Hide whitespace changes
Inline
Side-by-side
Modules/CMakeCUDAInformation.cmake
View file @
a173118f
...
...
@@ -185,7 +185,7 @@ if(__IMPLICT_DLINK_DIRS)
endif
()
set
(
__IMPLICT_DLINK_FLAGS
)
foreach
(
dir
${
__IMPLICT_DLINK_DIRS
}
)
if
(
EXISTS
"
${
dir
}
/libcu
blas_dev
ic
e
.a"
)
if
(
EXISTS
"
${
dir
}
/libcu
rand_stat
ic.a"
)
string
(
APPEND __IMPLICT_DLINK_FLAGS
" -L
\"
${
dir
}
\"
"
)
endif
()
endforeach
()
...
...
Modules/Platform/Windows-NVIDIA-CUDA.cmake
View file @
a173118f
...
...
@@ -44,7 +44,7 @@ if(__IMPLICT_DLINK_DIRS)
endif
()
set
(
__IMPLICT_DLINK_FLAGS
)
foreach
(
dir
${
__IMPLICT_DLINK_DIRS
}
)
if
(
EXISTS
"
${
dir
}
/cu
blas_dev
ic
e
.lib"
)
if
(
EXISTS
"
${
dir
}
/cu
rand_stat
ic.lib"
)
string
(
APPEND __IMPLICT_DLINK_FLAGS
" -L
\"
${
dir
}
\"
"
)
endif
()
endforeach
()
...
...
Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu
View file @
a173118f
...
...
@@ -3,6 +3,9 @@
#include
<cuda_runtime.h>
#include
<iostream>
// this test only makes sense for versions of CUDA that ships
// static libraries that have separable compilation device symbols
#if __CUDACC_VER_MAJOR__ <= 9
__global__
void
deviceCublasSgemm
(
int
n
,
float
alpha
,
float
beta
,
const
float
*
d_A
,
const
float
*
d_B
,
float
*
d_C
)
...
...
@@ -22,6 +25,7 @@ __global__ void deviceCublasSgemm(int n, float alpha, float beta,
cublasDestroy
(
cnpHandle
);
}
#endif
int
choose_cuda_device
()
{
...
...
@@ -63,6 +67,7 @@ int main(int argc, char** argv)
return
0
;
}
#if __CUDACC_VER_MAJOR__ <= 9
// initial values that will make sure that the cublasSgemm won't actually
// do any work
int
n
=
0
;
...
...
@@ -72,6 +77,7 @@ int main(int argc, char** argv)
float
*
d_B
=
nullptr
;
float
*
d_C
=
nullptr
;
deviceCublasSgemm
<<<
1
,
1
>>>
(
n
,
alpha
,
beta
,
d_A
,
d_B
,
d_C
);
#endif
return
0
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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