This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for modifying the scaled_mm compute (#144)
Summary: This does two things: 1. Creates a new named_tuple type `ScaledMMConfig` that is used to control the behavior of the scaled_mm op. This includes, emulate, fast_accumulation, and fp8_out_dtype(the latter is not currently used). It replaces the emulate arg and strings it through all the relevant infra, and updates test accordingly. 2. This adds the fp8 fast accum mode and enables it for the forward path and not the backward pass. ### Performance With settings use_fast_accum in the forward using the linear_float8 benchmark: ![image](https://github.com/pytorch-labs/float8_experimental/assets/32754868/8510814e-88d0-402c-9676-d4afe8fef2a0) | | shape | Speedup_with_False | Speedup_with_True | Percentage_Gain | |---:|:--------------------|---------------------:|--------------------:|------------------:| | 0 | (16384, 1024, 8192) | 1.19086 | 1.26397 | 6.13912 | | 1 | (16384, 3584, 8192) | 1.42227 | 1.48921 | 4.70629 | | 2 | (16384, 8192, 1280) | 0.970685 | 0.986167 | 1.59497 | | 3 | (16384, 8192, 7168) | 1.50755 | 1.54886 | 2.74022 | Pull Request resolved: #144 Reviewed By: vkuzo Differential Revision: D55906764 Pulled By: drisspg fbshipit-source-id: c6c7f7d5f7831bc594c8e70c71d9ab0e0c90755c
- Loading branch information
1 parent
14da04f
commit 31877bb
Showing
10 changed files
with
219 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.