Browse Source

fix(cuda): remove cuda driver version check and runtime minor version

GitOrigin-RevId: 4463beccf1
release-1.5
Megvii Engine Team huangxinda 4 years ago
parent
commit
1c7d0802ab
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/core/impl/utils/persistent_cache.cpp

+ 4
- 4
src/core/impl/utils/persistent_cache.cpp View File

@@ -41,14 +41,14 @@ std::string PersistentCache::make_category_from_comp_node(CompNode comp_node) {
switch (env.property().type) {
#if MGB_CUDA
case CompNode::DeviceType::CUDA: {
int drv = -1, cuda_rt = -1;
MGB_CUDA_CHECK(cudaDriverGetVersion(&drv));
int cuda_rt = -1;
MGB_CUDA_CHECK(cudaRuntimeGetVersion(&cuda_rt));
int cuda_rt_major = cuda_rt / 1000;
auto&& prop = env.cuda_env().device_prop;
// note: we do not contain library versions such as cudnn here. They
// are handled by opr impls in MegDNN
return ssprintf("plat=cuda;dev=%s;cap=%d.%d,drv=%d;runtime=%d",
prop.name, prop.major, prop.minor, drv, cuda_rt);
return ssprintf("plat=cuda;dev=%s;cap=%d.%d;runtime=%d",
prop.name, prop.major, prop.minor, cuda_rt_major);
break;
}
#endif


Loading…
Cancel
Save