diff --git a/LICENSE b/LICENSE index f6126d011a9a..b23afba158af 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -192,7 +192,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/README.md b/README.md index fb9e9bc4a0d1..58878cfd0409 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,22 @@ - + + @@ -6,7 +24,7 @@ - + diff --git a/docs/how_to/tutorials/customize_opt.py b/docs/how_to/tutorials/customize_opt.py index 2e2747d61fc5..ed1571cd3b51 100644 --- a/docs/how_to/tutorials/customize_opt.py +++ b/docs/how_to/tutorials/customize_opt.py @@ -55,6 +55,31 @@ from tvm import IRModule, relax from tvm.relax.frontend import nn +# Note: This tutorial requires TVM CUDA support. +# If you encounter import errors: +# 1. First try: pip install tvm-ffi (from 3rdparty/tvm-ffi) +# 2. If that fails: Build TVM from source with CUDA enabled +# Build instructions: https://tvm.apache.org/docs/install/from_source.html + +try: + import tvm.relax.backend.cuda.cublas as _cublas +except ImportError as e: + import sys + + print("Error: TVM CUDA support required for this tutorial.", file=sys.stderr) + print("Solutions:", file=sys.stderr) + print(" 1. Install tvm-ffi: pip install tvm-ffi", file=sys.stderr) + print( + " 2. Build TVM with CUDA: https://tvm.apache.org/docs/install/from_source.html", + file=sys.stderr, + ) + sys.exit(1) +# If import succeeds, continue with tutorial +# If you encounter 'No module named ''tvm_ffi''' error, +# you need to build TVM from source with CUDA enabled. +# Build instructions: https://tvm.apache.org/docs/install/from_source.html + + ###################################################################### # Composable IRModule Optimization # -------------------------------- @@ -222,4 +247,3 @@ def transform_module(self, mod: IRModule, _ctx: tvm.transform.PassContext) -> IR # We can easily compose the optimization passes and customize the optimization for different parts # of the computation graph. The flexibility of the optimization pipeline enables us to quickly # iterate the optimization and improve the performance of the model. -#