LudovicoYIN commented on issue #18648: URL: https://github.com/apache/tvm/issues/18648#issuecomment-3766123251
I reproduced the crash locally and confirmed it happens inside exported_program.run_decompositions() when a sparse CSR buffer is present. Changes (proposed fix): - In exported_program_translator.py, detect whether the exported program contains sparse tensors (buffers/params/constants/tensor_constants). If so, skip run_decompositions() to avoid the PyTorch layout_impl crash. - Add a fallback for aten.to_sparse.default in the convert map: treat it as a no‑op, since Relax doesn’t support sparse tensors yet. - Add a regression test in test_frontend_from_exported_program.py that exports a model with a CSR buffer and ensures from_exported_program completes. - The minimal repro no longer aborts; import succeeds and the IR is produced. If this direction looks good, I’m happy to contribute the PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
