Skip to content

Conversation

@jwfromm
Copy link
Contributor

@jwfromm jwfromm commented Oct 30, 2020

This very small PR changes how channels are extracted from a Conv2D relay op when converting to TensorRT. Previously, we relied on the channels attribute being available. However, it is optional and often left as None. When attempting to convert in this case stoi fails with an unpleasant error. Since we are already enforcing that the weight layout is OIHW, there is no downside to instead extracting the channel info from the weight shape. I updated the corresponding conv2d test to not specify channels to confirm that this change resolves the issue.

@jwfromm
Copy link
Contributor Author

jwfromm commented Oct 30, 2020

@trevor-m can you review this two-liner?

Copy link
Contributor

@trevor-m trevor-m left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @jwfromm looks good to me.

@tqchen tqchen merged commit ceef616 into apache:main Oct 31, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 2, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 4, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Dec 4, 2020
@jwfromm jwfromm deleted the trt_conv_channel_fix branch April 12, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants