[Inductor UT] Fix duplicate registration of custom ops amount test cases (#140540)

Fix #140537

Pull Request resolved: https://github.com/pytorch/pytorch/pull/140540
Approved by: https://github.com/EikanWang, https://github.com/jansel
ghstack dependencies: #140517
This commit is contained in:
xinan.lin 2024-11-13 06:48:37 -08:00 committed by PyTorch MergeBot
parent 8d3a07e321
commit 3ce75e7ea6

View File

@ -10878,7 +10878,7 @@ class CommonTemplate:
@torch._dynamo.config.patch(capture_dynamic_output_shape_ops=True)
@torch._inductor.config.patch(implicit_fallbacks=True)
def test_custom_op_unbacked_symints(self):
@torch.library.custom_op("mylib::foo", mutates_args={})
@torch.library.custom_op("test_unbacked_symints::foo", mutates_args={})
def foo(x: torch.Tensor) -> torch.Tensor:
return x.clone()
@ -10889,7 +10889,7 @@ class CommonTemplate:
u2 = torch.library.get_ctx().new_dynamic_size()
return x.new_empty(u0, u1, u2)
@torch.library.custom_op("mylib::bar", mutates_args={})
@torch.library.custom_op("test_unbacked_symints::bar", mutates_args={})
def bar(x: torch.Tensor) -> torch.Tensor:
return x.clone()