Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 4569d12

Browse files
authored
Merge pull request #136 from facebookresearch/fix-version
Fix the version check inequality
2 parents 4b79763 + f6ef9e5 commit 4569d12

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/example_fixture.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,33 +91,33 @@ struct Benchmark : public ::testing::Test {
9191
void SetUp() {
9292
if (!FLAGS_disable_version_checks) {
9393
auto cudnnVersion = cudnnGetVersion();
94-
CHECK_GE(6021, cudnnVersion)
94+
CHECK_LE(6021, cudnnVersion)
9595
<< "[CUDNN][VERSION] Enforce version compatibility check";
9696

9797
auto cudaRtVersion = cudnnGetCudartVersion();
98-
CHECK_GE(8000, cudaRtVersion)
98+
CHECK_LE(8000, cudaRtVersion)
9999
<< "[CUDART][VERSION] Enforce version compatibility check";
100100

101101
int cublasVersion;
102102
cublasHandle_t handle;
103103
TC_CUDA_CUBLAS_ENFORCE(cublasCreate_v2(&handle));
104104
TC_CUDA_CUBLAS_ENFORCE(cublasGetVersion_v2(handle, &cublasVersion));
105-
CHECK_GE(8000, cublasVersion)
105+
CHECK_LE(8000, cublasVersion)
106106
<< "[CUBLAS][VERSION] Enforce version compatibility check";
107107
tc::ScopeGuard sg(
108108
[&handle]() { TC_CUDA_CUBLAS_ENFORCE(cublasDestroy_v2(handle)); });
109109

110110
int cudaRuntimeVersion;
111111
TC_CUDA_RUNTIMEAPI_ENFORCE(cudaRuntimeGetVersion(&cudaRuntimeVersion));
112-
CHECK_GE(8000, cudaRuntimeVersion)
112+
CHECK_LE(8000, cudaRuntimeVersion)
113113
<< "[CUDA RUNTIME][VERSION] Enforce version compatibility check";
114114

115115
int nvrtcVersionMajor;
116116
int nvrtcVersionMinor;
117117
TC_NVRTC_CHECK(nvrtcVersion(&nvrtcVersionMajor, &nvrtcVersionMinor));
118-
CHECK_GE(8, nvrtcVersionMajor)
118+
CHECK_LE(8, nvrtcVersionMajor)
119119
<< "[NVRTC][MAJOR][VERSION] Enforce version compatibility check";
120-
CHECK_GE(0, nvrtcVersionMinor)
120+
CHECK_LE(0, nvrtcVersionMinor)
121121
<< "[NVRTC][MINOR][VERSION] Enforce version compatibility check";
122122
}
123123
}

0 commit comments

Comments
 (0)