LudovicoYIN opened a new pull request, #18670:
URL: https://github.com/apache/tvm/pull/18670

   ### Motivation
   The Relax Torch frontend crashes when importing an exported program that 
includes
   a torch.sparse_csr_tensor registered as a buffer. The crash happens during
   from_exported_program because run_decompositions() triggers a PyTorch
   layout_impl error for sparse tensors.
   
   This PR avoids the crash while keeping the import pipeline functional for 
such
   models, even though Relax does not yet support sparse tensors.
   
   ### Changes
   
   - Skip run_decompositions() when the exported program contains sparse tensors
   - Treat aten.to_sparse.default as a no-op in the Relax Torch frontend
   - Add a regression test that imports a model with a sparse CSR buffer
   
   ### Testing
   - test_frontend_from_exported_program.py
   
   Fixes: [[Bug] Relax Torch frontend crash with sparse CSR buffer in 
ExportedProgramhttps://github.com/apache/tvm/issues/18648](https://github.com/apache/tvm/issues/18648)


-- 
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]

Reply via email to