fix: default to use CUDA when both CUDA and ROCm are installed

This commit is contained in:
lzhengning 2022-10-17 12:08:51 +08:00 committed by Zheng-Ning Liu
parent 042c3610a3
commit db81cc938f
2 changed files with 6 additions and 5 deletions

View File

@ -9,7 +9,7 @@
# file 'LICENSE.txt', which is part of this source code package. # file 'LICENSE.txt', which is part of this source code package.
# *************************************************************** # ***************************************************************
__version__ = '1.3.5.19' __version__ = '1.3.5.20'
from jittor_utils import lock from jittor_utils import lock
with lock.lock_scope(): with lock.lock_scope():
ori_int = int ori_int = int

View File

@ -1234,10 +1234,11 @@ jit_utils.add_backend(acl_compiler)
from .extern.rocm import rocm_compiler from .extern.rocm import rocm_compiler
jit_utils.add_backend(rocm_compiler) jit_utils.add_backend(rocm_compiler)
for mod in jit_utils.backends: if not has_cuda:
mod.check() for mod in jit_utils.backends:
# if mod.check(): mod.check()
# break # if mod.check():
# break
# build core # build core
gen_jit_flags() gen_jit_flags()