From 5c603a8b2f13a1a74128ac70f638a499a5d115e8 Mon Sep 17 00:00:00 2001 From: iupaikov-amd Date: Fri, 29 Nov 2024 15:02:08 +0100 Subject: [PATCH] Fixed string comparison in test_cpp_wrapper_hipify --- test/inductor/test_cpp_wrapper_hipify.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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())