-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Make DataFormatVecPermute's validation and implementation consistent with each other #50263
Make DataFormatVecPermute's validation and implementation consistent with each other #50263
Conversation
Looks like these tests are failing in their XLA+GPU configurations (
Alternatively you can use |
@PatriceVignola Can you please check @allenlavoie's comments and keep us posted ? Thanks! |
@gbaned @allenlavoie I copied the changes to the XLA kernel and re-ran the tests. |
Looks like clang-tidy identifies two issues. Can you take a look? https://github.com/tensorflow/tensorflow/blob/master/CONTRIBUTING.md#c-coding-style Just in core/kernels/data_format_ops.h; |
Sure I'll fix it, but this is preexisting. I didn't touch this header besides changing the array size. |
There's currently a mismatch between what the validation of DataFormatVecPermute and its implementation is doing. While the validation allows src_format and dst_format to be of length 4 or 5, it only allows the input to be of shape [4] or [2, 4]. This leads to a gap in the validation where the following is allowed, but results in undefined behavior or uninitialized garbage data:
tf.raw_ops.DataFormatVecPermute(x=[1,2,3,4], src_format="NCDHW", dst_format="NDHWC")