Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad code show case #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions python/tvm/contrib/cutlass/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ def _get_cutlass_path():
raise AssertionError(f"The CUTLASS root directory not found in: {invalid_paths}")


def ddd():
print


class SubTreeExtractor(nn.Module):
def __init__(self):
super(SubTreeExtractor, self).__init__()

def forward(self, x, y):
return x + y

torch.onnx.export(SubTreeExtractor(), (torch.Tensor(1,2,3,4), 1), "1.onnx")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The torch.onnx.export function is used incorrectly. The second argument should be a tuple of torch.Tensor or a single torch.Tensor, but currently, it's a tuple of a torch.Tensor and an integer. Please correct this. [important]



def _get_cutlass_compile_options(sm, threads, use_fast_math=False):
cutlass_root = _get_cutlass_path()
cutlass_include = os.path.join(cutlass_root, "include")
Expand Down