Skip to content

Commit bc02c75

Browse files
committed
add no warning flag for HIP; turn default backend to CUDA
1 parent 149007b commit bc02c75

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ def detect_gpu_backend() -> str:
8383
backend = os.environ.get('GPU4PYSCF_GPU_BACKEND')
8484
if backend is None:
8585
backend = os.environ.get('GPU4PYSCF_BACKEND')
86-
if backend is None:
86+
if backend is None and not get_hip_version is None:
8787
backend = 'HIP'
88+
else:
89+
backend = 'CUDA'
8890
return normalize_backend(backend)
8991

9092

@@ -159,6 +161,7 @@ def run(self):
159161
if hip_arch:
160162
cmd.append(f'-DCMAKE_HIP_ARCHITECTURES={hip_arch}')
161163
cmd.append('-DBUILD_CUTLASS=OFF')
164+
cmd.append('-DCMAKE_HIP_FLAGS=-Wno-unused-result')
162165
configure_args = os.getenv('CMAKE_CONFIGURE_ARGS')
163166
if configure_args:
164167
cmd.extend(shlex.split(configure_args))

0 commit comments

Comments
 (0)