-
Notifications
You must be signed in to change notification settings - Fork 92
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
New Operation: Fill_Tile_Pad ; Op to fill tile padding with a specific value #16785
base: main
Are you sure you want to change the base?
Conversation
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.
Clang-Tidy
found issue(s) with the introduced code (1/1)
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_op.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_op.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_op.hpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/kernels/dataflow/fill_pad_writer.cpp
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/kernels/dataflow/fill_pad_writer.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/kernels/dataflow/fill_pad_writer.cpp
Outdated
Show resolved
Hide resolved
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.
Rename the PR title to something more descriptive
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_op.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/kernels/dataflow/fill_pad_writer.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/kernels/dataflow/fill_pad_writer.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/kernels/dataflow/fill_pad_writer.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/kernels/dataflow/fill_pad_writer.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_op.cpp
Outdated
Show resolved
Hide resolved
…pybind. Small pcc error as well
…t for latest main changes added
4d6bfc8
to
e908196
Compare
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.
Clang-Tidy
found issue(s) with the introduced code (1/1)
ttnn/cpp/ttnn/operations/data_movement/fill_pad/fill_pad_pybind.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_program_factory.cpp
Outdated
Show resolved
Hide resolved
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_op.cpp
Outdated
Show resolved
Hide resolved
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.
You should probably make the github actions error go away (either by changing the code or maybe adding a pragma).
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_program_factory.cpp
Outdated
Show resolved
Hide resolved
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.
A few comments. Overall great PR!
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_program_factory.cpp
Outdated
Show resolved
Hide resolved
uint32_t padded_height = tt::div_up(height, tt::constants::TILE_HEIGHT) * tt::constants::TILE_HEIGHT; | ||
uint32_t padded_width = tt::div_up(width, tt::constants::TILE_HEIGHT) * tt::constants::TILE_HEIGHT; | ||
uint32_t tiles_per_2d_tensor = | ||
padded_height / tt::constants::TILE_HEIGHT * padded_width / tt::constants::TILE_HEIGHT; |
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.
Instead of TT constants for tile height can you get it from the tensor, tile shape, @TT-BrianLiu , can you point us to the appropriate tile shape api.
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.
You'd need to pass in an optional Tile parameter and plumb it through. You can look at struct Matmul
's output_tile
parameter in ttnn/cpp/ttnn/operations/matmul/device/matmul_op.hpp
I think it'd be better not to block this PR for adding that functionality.
ttnn/cpp/ttnn/operations/data_movement/fill_pad/device/fill_pad_op.cpp
Outdated
Show resolved
Hide resolved
Hi all, I'm trying to be more specific with what name we bind the op to for users, and these options came up:
and certainly open to more suggestions |
A few more specific names could be something like
Anything with more words would probably be too long, although even with this length, most people will stay away from it. I don't have a preference. @ayerofieiev-tt you probably have the strongest opinion. What's your preference? |
|
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.
For your next PR use these to get tile_shape/face_shape
const auto& tile_shape = input_tensor.get_tensor_spec().tile().get_tile_shape();
const auto& face_shape = input_tensor.get_tensor_spec().tile().get_face_shape();
Ticket
#16393
Problem description
Need to create an op that fills any tile padding with a particular value
What's changed
Only parallelizing across dims that aren't the last 2 for now. Simply iterate through the space between the logical shape and padded shape and fill with the respective value.
Checklist