Skip to content

Commit 81e95bb

Browse files
authored
[release/2.5] Fixed string comparison in test_cpp_wrapper_hipify (#1760)
Same change as 7bb2228
1 parent 1fef591 commit 81e95bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/inductor/test_cpp_wrapper_hipify.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ def test_hipify_aoti_driver_header(self) -> None:
104104
}
105105
"""
106106
if torch.version.hip is not None:
107-
expected = expected.replace("32*numWarps", "64*numWarps")
107+
# Adjusting the warp size to GPU supported wavefront size on AMD GPU
108+
prop = torch.cuda.get_device_properties(torch.cuda.current_device())
109+
expected = expected.replace(
110+
"32*numWarps", str(prop.warp_size) + "*numWarps"
111+
)
108112
result = maybe_hipify_code_wrapper(header, True)
109113
self.assertEqual(result.rstrip(), expected.rstrip())
110114

0 commit comments

Comments
 (0)