Open dbabokin opened 1 month ago
When building with -DTORCH_MLIR_ENABLE_STABLEHLO=OFF and running lit tests, I see three fails:
-DTORCH_MLIR_ENABLE_STABLEHLO=OFF
TORCH_MLIR :: Conversion/TorchToLinalg/sparse.mlir TORCH_MLIR :: Dialect/Torch/invalid.mlir TORCH_MLIR :: Dialect/Torch/ops.mlir
All of the fails are due to #sparse_tensor.encoding not being recogined:
#sparse_tensor.encoding
bin/torch-mlir-opt < ../test/Conversion/TorchToLinalg/sparse.mlir -split-input-file -verify-diagnostics module { } // ----- within split at <stdin>:3 offset :3:23: error: unexpected error: #"sparse_tensor"<"encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>"> : 'none' attribute created with unregistered dialect. If this is intended, please call allowUnregisteredDialects() on the MLIRContext, or use -allow-unregistered-dialect with the MLIR opt tool used #CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }> ^
#sparse_tensor.encoding was introduced in https://github.com/llvm/torch-mlir/pull/2809 and https://github.com/llvm/torch-mlir/pull/2799 by @aartbik.
The patches have nothing specific to STABLEHLO. I'm wondering if ifdefs for STABLEHLO covering too much code somewhere else.
Due to a career switch, there will be a bit of a delay, but I will have a look!
When building with
-DTORCH_MLIR_ENABLE_STABLEHLO=OFF
and running lit tests, I see three fails:All of the fails are due to
#sparse_tensor.encoding
not being recogined:#sparse_tensor.encoding
was introduced in https://github.com/llvm/torch-mlir/pull/2809 and https://github.com/llvm/torch-mlir/pull/2799 by @aartbik.The patches have nothing specific to STABLEHLO. I'm wondering if ifdefs for STABLEHLO covering too much code somewhere else.