Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to update license here?


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
<!--- Licensed to the Apache Software Foundation (ASF) under one -->
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); 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

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--- or more contributor license agreements. See the NOTICE file -->
<!--- distributed with this work for additional information -->
<!--- regarding copyright ownership. The ASF licenses this file -->
<!--- to you under the Apache License, Version 2.0 (the -->
<!--- "License"); 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 -->
Expand Down
26 changes: 25 additions & 1 deletion docs/how_to/tutorials/customize_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The statement might not be correct, tvm_ffi is now a independent repo (and 3rdparty in tvm), I think we just need to pip install tvm-ffi if we find the 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
# --------------------------------
Expand Down Expand Up @@ -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.
#