Skip to content

Commit 94475d6

Browse files
desh2608danpovey
authored andcommitted
[src] ifdef to fix compilation failure on CUDA 8 and earlier (#3103)
1 parent b7a4fec commit 94475d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cudamatrix/cu-device.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@ void CuDevice::Initialize() {
111111
CUBLAS_SAFE_CALL(cublasCreate(&cublas_handle_));
112112
CUBLAS_SAFE_CALL(cublasSetStream(cublas_handle_, cudaStreamPerThread));
113113

114+
#if CUDA_VERSION >= 9000
114115
if (device_options_.use_tensor_cores) {
115116
// Enable tensor cores in CUBLAS
116117
// Note if the device does not support tensor cores this will fall back to normal math mode
117118
CUBLAS_SAFE_CALL(cublasSetMathMode(cublas_handle_,
118119
CUBLAS_TENSOR_OP_MATH));
119120
}
121+
#endif
120122

121123
// Initialize the cuSPARSE library
122124
CUSPARSE_SAFE_CALL(cusparseCreate(&cusparse_handle_));

0 commit comments

Comments
 (0)