torch-mlir/lib
Ramiro Leal-Cavazos 73bd32d06c
Make `getTensorRank` safer by changing return to `Optional<unsigned>` (#1707)
Currently `getTensorRank` returns -1 if it was unable to get the rank
of the tensor. However, not every use in the codebase was checking the
return value, and in some cases, the return value was casted to
unsigned leading to some infinte loops when an unranked tensor reached
a decomposition.

This commit changes the return of `getTensorRank` to
`Optional<unsigned>` to make it clear to the user that the function
can fail.

This commit also changes a couple of for loops that iterate a vector
in reverse order that can potentially become infinite loops into
range-based for loops.
2022-12-12 08:56:28 -08:00
..
CAPI Fix Base Lazy Backend Type Conversion (#1412) 2022-10-04 15:53:28 -07:00
Conversion Make `getTensorRank` safer by changing return to `Optional<unsigned>` (#1707) 2022-12-12 08:56:28 -08:00
Dialect Make `getTensorRank` safer by changing return to `Optional<unsigned>` (#1707) 2022-12-12 08:56:28 -08:00
RefBackend [MLIR][TORCH] Add TorchConversionToMLProgram and MLProgramBufferize pass 2022-12-02 13:20:46 +05:30
CMakeLists.txt Resolve CI testing failure for Lazy Tensor Core (#1088) 2022-07-30 09:40:02 -04:00
InitAll.cpp Resolve CI testing failure for Lazy Tensor Core (#1088) 2022-07-30 09:40:02 -04:00