-
Notifications
You must be signed in to change notification settings - Fork 44
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
Support for tritongpu.upcast_mxfp
operation
#2700
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
Note: Merging upstream to |
// standalone values and returns them as a pair for (high 4 bits, low 4 bits). | ||
std::pair<Value, Value> convertMxfp4x2ToBf16x2(RewriterBase &rewriter, | ||
Location loc, Value v); | ||
// Convert each value, which is an int8 containing 2 packed mxfp4 values, |
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.
Note: This is identical to upstream code as of commit 1cf7b1b31cde8c62611e421becd4648c7284d76c
|
||
return {v0, v1}; | ||
} | ||
SmallVector<Value> convertMxfp4x2ToBf16x2(RewriterBase &rewriter, Location loc, |
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.
Note: This is identical to upstream code as of commit 1cf7b1b31cde8c62611e421becd4648c7284d76c
@@ -19,17 +19,6 @@ using namespace mlir::triton::gpu; | |||
|
|||
namespace { | |||
|
|||
Value mxfpScaleBf16(RewriterBase &rewriter, Location loc, Value v, |
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.
Note: This is identical to upstream code as of commit 1cf7b1b31cde8c62611e421becd4648c7284d76c
@@ -30,47 +30,6 @@ class UpcastMXFPOpPattern : public ConvertOpToLLVMPattern<UpcastMXFPOp> { | |||
: ConvertOpToLLVMPattern<UpcastMXFPOp>(typeConverter, benefit), | |||
targetInfo(targetInfo) {} | |||
|
|||
llvm::SmallVector<Value> unpackFP4Elements(Location loc, |
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.
Removed in 1cf7b1b31cde8c62611e421becd4648c7284d76c
Merging in #2707. |
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.
As this is just copying, LGTM. As in previous cases we found relying on logical bitwise operations for this kind of operations was slower, does it make sense to have a ticket to change the code in the future?
Add initial support for the new tritongpu
upcast_mxfp
operation.