-
Notifications
You must be signed in to change notification settings - Fork 6k
[Cpp API Compatibility] Fix flashmla compile #78550
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
Changes from all commits
d39c77c
bed6e56
1e7a992
555266f
236217e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -44,9 +44,11 @@ void* Stream::native_handle() const { | |||||||
| return reinterpret_cast<void*>(static_cast<intptr_t>(id_)); | ||||||||
| } | ||||||||
| #endif | ||||||||
| PADDLE_THROW(::common::errors::Unimplemented( | ||||||||
| "c10::Stream::native_handle() is not supported for device type %d", | ||||||||
| static_cast<int>(device_type()))); | ||||||||
| // Match PyTorch error message format for unsupported device types | ||||||||
| PD_CHECK(false, | ||||||||
| "native_handle() is not supported for this device type (", | ||||||||
|
Comment on lines
+48
to
+49
|
||||||||
| PD_CHECK(false, | |
| "native_handle() is not supported for this device type (", | |
| PD_THROW("native_handle() is not supported for this device type (", |
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.
New error handling was added for invalid
dim/indexvalues, but the existing select tests (e.g.,test/cpp/compat/ATen_select_test.cc) don't cover these out-of-range branches. Add test cases that assert an exception is thrown for (1)dimout of range (including negative beyond-self.dim()), and (2)indexout of range (including negative beyond-size(dim)).