mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[inductor] Add a helper for convert index_dtype to torch dtype (#149531)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/149531 Approved by: https://github.com/eellison
This commit is contained in:
committed by
PyTorch MergeBot
parent
a703107f7b
commit
b07b819912
@ -398,9 +398,12 @@ class SIMDKernel(Kernel[CSEVariableType], Generic[CSEVariableType]):
|
||||
def dtype_to_str(self, dtype: torch.dtype) -> str:
|
||||
raise NotImplementedError
|
||||
|
||||
def get_index_dtype_as_torch_dtype(self) -> torch.dtype:
|
||||
return self.features.select_index_dtype()
|
||||
|
||||
@property
|
||||
def index_dtype(self) -> str:
|
||||
return self.dtype_to_str(self.features.select_index_dtype())
|
||||
return self.dtype_to_str(self.get_index_dtype_as_torch_dtype())
|
||||
|
||||
def want_no_x_dim(self) -> bool:
|
||||
return False
|
||||
|
Reference in New Issue
Block a user