Skip to content
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a65fb44
docs: update http to https in license link
AshwiniBokka Jan 25, 2026
8d74f25
docs: update http to https in LICENSE file (lines 3 and 195)
AshwiniBokka Jan 26, 2026
fceb7da
docs: add contributor entry
AshwiniBokka Jan 26, 2026
2201b99
fix: add missing trailing newline to CONTRIBUTORS.md to resolve lint …
AshwiniBokka Jan 26, 2026
9a599d5
Merge branch 'main' of https://github.com/apache/tvm
AshwiniBokka Jan 29, 2026
1084817
Fix Customize Optimization tutorial import error
AshwiniBokka Jan 29, 2026
4f8fbac
[lint] Apply black formatting
AshwiniBokka Jan 29, 2026
f6b4209
[lint] Fix ASF license header in README.md
AshwiniBokka Jan 29, 2026
a4e83e4
Improve tutorial fix based on maintainer feedback
AshwiniBokka Jan 30, 2026
2f50183
Fix black formatting for long URL line
AshwiniBokka Jan 30, 2026
793758a
Fix file encoding: remove UTF-8 BOM character
AshwiniBokka Jan 30, 2026
354d80b
Fix tutorial error handling logic
AshwiniBokka Feb 1, 2026
6cb24ba
revert: Remove LICENSE and README modifications, focus on tutorial fix
AshwiniBokka Feb 9, 2026
c0d9bb4
revert: Remove LICENSE and README modifications, focus on tutorial fix
AshwiniBokka Feb 9, 2026
3d7c474
fix: Update error handling per maintainer feedback
AshwiniBokka Feb 11, 2026
c7051fb
fix: Apply maintainer feedback - apache-tvm-ffi and proper raise
AshwiniBokka Feb 11, 2026
f524d9e
fix: Add CUDA error handling with apache-tvm-ffi and proper raise
AshwiniBokka Feb 11, 2026
2746532
fix: Add CUDA error handling with apache-tvm-ffi per maintainer feedback
AshwiniBokka Feb 11, 2026
07049c1
Update customize_opt.py
AshwiniBokka Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/how_to/tutorials/customize_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,16 @@ def forward(self, x):


# Import cublas pattern
import tvm.relax.backend.cuda.cublas as _cublas
try:
import tvm.relax.backend.cuda.cublas as _cublas
except ImportError as e:
raise ImportError(
"This tutorial requires TVM built with CUDA support.\n"
"If you hit missing 'tvm_ffi', try: pip install apache-tvm-ffi\n"
"Otherwise build TVM with CUDA enabled:\n"
" https://tvm.apache.org/docs/install/from_source.html\n"
f"Original error: {e}"
) from e


# Define a new pass for CUBLAS dispatch
Expand Down Expand Up @@ -174,7 +183,7 @@ def transform_module(self, mod: IRModule, _ctx: tvm.transform.PassContext) -> IR
# e.g. language model, DLight provides excellent performance, while for generic models,
# it achieves a balance between performance and compilation time.

from tvm import dlight as dl
from tvm.s_tir import dlight as dl

# Apply DLight rules
with target:
Expand Down