mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Test cpp_wrapper_hipify string comparison (#141353)
Updating the test to match this code that takes device warpsize into account: cf1d95a965/torch/_inductor/codegen/cuda/device_op_overrides.py (L120)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141353
Approved by: https://github.com/desertfire
This commit is contained in:
committed by
PyTorch MergeBot
parent
8b5c26287d
commit
7bb2228ffd
@ -110,7 +110,11 @@ class TestCppWrapperHipify(TestCase):
|
||||
}
|
||||
"""
|
||||
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())
|
||||
|
||||
|
Reference in New Issue
Block a user