-
Notifications
You must be signed in to change notification settings - Fork 13
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
implement eltwise_max direct to metal (#533) #1335
Conversation
vroubtsovTT
commented
Nov 20, 2024
•
edited
Loading
edited
- TTIR_MaximumOp has been made to extend TTIR_GenericElementwiseBinaryOp in TTIROps.td and the ensuing necessary modifications were done throughout the metal pipeline
- convertComputeBinaryOp() in TTIRToTTMetal.cpp has been made to build all "generic" binary ops like add/maximum via commonComputeBinaryOp<> parameterized with the type of a tile op; several local vars (inCB0, inCB1, etc) have become redundant in the new code structure and were moved inside the mlir::isaarith::DivFOp else-branch
- simple_max.mlir is a new test for this, intentionally distinct from simple_eltwise.mlir
CI appears to be failing w/
I think we are missing a header after all :p
|
Aside from the missing header the change looks perfect :) |
patched TTKernelToEmitC.cpp to add compute_kernel_api.h inclusion. For the test file, emitted C looks like
|
be3757f
to
249948c
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.
This looks great!
4849981
to
1d55fa0
Compare