mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-11 22:34:53 +08:00
[inductor] Make adaptive_max_pool2d error on int64 (#143762)
Fixes #143752 Pull Request resolved: https://github.com/pytorch/pytorch/pull/143762 Approved by: https://github.com/yanboliang
This commit is contained in:
committed by
PyTorch MergeBot
parent
135c7db99d
commit
060ee14753
@ -4630,6 +4630,9 @@ fallback_adaptive_max_pool2d = fallback_handler(
|
||||
|
||||
@register_lowering(aten.adaptive_max_pool2d)
|
||||
def adaptive_max_pool2d(x, output_size):
|
||||
if x.get_dtype() == torch.int64:
|
||||
# not supported in eager
|
||||
raise RuntimeError("adaptive_max_pool2d not implemented for Long")
|
||||
assert isinstance(x, TensorBox)
|
||||
assert len(output_size) == 2
|
||||
x.realize_hint()
|
||||
|
||||
Reference in New Issue
Block a user