mirror of https://github.com/llvm/torch-mlir
6491c69539
This patch replaces the use of raw integers like 6, 4, etc. (that represent PyTorch's scalar types) with named values from the ScalarType enum (e.g. `ScalarType::Float`, `ScalarType::Long`, etc.) in code for folding `prim.dtype` ops into numeric constants. This patch isn't strictly a non-functional change, since its use of `Torch::getScalarTypeForType()` implies that the input type has to be one among the supported types, otherwise compilation will abort, whereas previously, compilation proceeded without folding the unsupported data type into a numeric constant. |
||
---|---|---|
.. | ||
CAPI | ||
Conversion | ||
Dialect | ||
RefBackend | ||
CMakeLists.txt | ||
InitAll.cpp |