diff --git a/test/inductor/test_cpp_wrapper_hipify.py b/test/inductor/test_cpp_wrapper_hipify.py index 43b1909e927df..b4574578b2732 100644 --- a/test/inductor/test_cpp_wrapper_hipify.py +++ b/test/inductor/test_cpp_wrapper_hipify.py @@ -104,7 +104,11 @@ def test_hipify_aoti_driver_header(self) -> None: } """ if torch.version.hip is not None: - expected = expected.replace("32*numWarps", "64*numWarps") + # Adjusting the warp size to GPU supported wavefront size on AMD GPU + prop = torch.cuda.get_device_properties(torch.cuda.current_device()) + expected = expected.replace( + "32*numWarps", str(prop.warp_size) + "*numWarps" + ) result = maybe_hipify_code_wrapper(header, True) self.assertEqual(result.rstrip(), expected.rstrip())