-
Notifications
You must be signed in to change notification settings - Fork 370
Fix Bugs #3902
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
base: main
Are you sure you want to change the base?
Fix Bugs #3902
Conversation
| } | ||
| } | ||
|
|
||
| DataType::DataType(c10::ScalarType t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are type constructors not direct translators
| Value value; |
| TORCHTRT_CHECK( | ||
| t == at::MemoryFormat::Contiguous || t == at::MemoryFormat::ChannelsLast, | ||
| "Tensor format is unsupported (" << t << ")"); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here, value is held by a TensorFormat object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misread this one. For the purpose of clarity, I think we should use m prefix for object member variables. Will revert these.
|
@leimao thanks for the PR. For the changes to the TS C++ API, these are not bugs. We define a set of wrapped enums that abstract the TRT and PyTorch versions. This makes it easier to write code that may mix the two APIs arbitrarily. Also as with FX, we are strongly pushing people to use Dynamo + AOTInductor to replace TorchScript as it is now deprecated in PyTorch and will be removed in PyTorch 2.14 |
@narendasan I believe there is still a bug, please review again. Thanks. |
| [](Stack& stack) { | ||
| auto attn_mask = pop(stack).to<at::Tensor>(); | ||
| if (attn_mask.scalar_type() == at::kBool) { | ||
| attn_mask = attn_mask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is unnecessary and is very confusing.
| switch (t) { | ||
| case at::MemoryFormat::ChannelsLast: | ||
| value = TensorFormat::kChannelsLast; | ||
| break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one fixes an oversight of the implementation.
narendasan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Would reiterate again that the torchscript frontend is in maintenance mode so unless there are bugs we likely will not change the implementation much. But we are highly interested in collecting reasons why Dynamo isnt working for your use case if thats the reason you are using TS so we can work to get those gaps closed prior to torchscript being removed
|
The test failures seems to be irrelevant to my change. Some warnings were treated as errors by compiler flags. |
I believe there are some bugs due to typo in programming.