Skip to content

Commit fccd341

Browse files
authored
[ROCm] Use portable compiler names in cpp_extension compatibility tests (pytorch#188580) (#3384)
Use util function to get compiler executable names instead of hardcoded `g++` Pull Request resolved: pytorch#188580 Approved by: https://github.com/jeffdaily (cherry picked from commit e6e48bf)
1 parent 9df77ad commit fccd341

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/cpp_extensions/libtorch_agn_2_10_extension/test_version_compatibility.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from torch.testing._internal.common_utils import IS_WINDOWS, run_tests, TestCase
2525
from torch.utils.cpp_extension import (
2626
CUDA_HOME,
27+
get_cxx_compiler,
2728
include_paths as torch_include_paths,
2829
ROCM_HOME,
2930
)
@@ -83,7 +84,7 @@ def _compile_cpp_file(
8384
torch_version_2_9 = "0x0209000000000000"
8485

8586
cmd = [
86-
"g++",
87+
get_cxx_compiler(),
8788
"-c",
8889
"-std=c++17",
8990
f"-DTORCH_TARGET_VERSION={torch_version_2_9}",

0 commit comments

Comments
 (0)