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

   Fixes #18584
   
   ## Problem
   The tutorial `docs/how_to/tutorials/customize_opt.py` fails with "No module 
named 'tvm_ffi'" when TVM is not built. This happens because the tutorial 
imports `tvm.relax.backend.cuda.cublas` which requires TVM to be built with 
CUDA support.
   
   ## Solution
   1. Add clear prerequisite note about building TVM with CUDA
   2. Add helpful error handling with guidance when import fails
   
   ## Changes
   - Added note after imports explaining build requirements
   - Wrapped problematic import with try/except
   - Provides clear error message pointing to build instructions
   - Follows Python best practices (stderr, proper indentation)
   
   ## Testing
   - File compiles without syntax errors
   - Error message clearly guides users to solution
   
   ## Before
   ```python
   import tvm.relax.backend.cuda.cublas as _cublas
   # Users get: No module named 'tvm_ffi'


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