Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

add per-gemm config to Float8LinearConfig #334

Closed
wants to merge 2 commits into from

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Jul 25, 2024

Stack from ghstack (oldest at bottom):

Summary:

Previously the per-gemm configuration had to be hardcoded in library
code. This PR exposes it to the top-level UX by adding a
Float8GemmConfig field to Float8LinearConfig.

Note that today the only supported configuration option is
use_fast_accum. In the future, configuring output_dtype
and whether to keep a gemm in higher precision would go here.

Test Plan:

./test/test_everything.sh

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D60252069

Summary:

Previously the per-gemm configuration had to be hardcoded in library
code. This PR exposes it to the top-level UX by adding a
`Float8GemmConfig` field to `Float8LinearConfig`.

Note that today the only supported configuration option is
`use_fast_accum`.  In the future, configuring output_dtype
and whether to keep a gemm in higher precision would go here.

Test Plan:

```
./test/test_everything.sh
```

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:

Previously the per-gemm configuration had to be hardcoded in library
code. This PR exposes it to the top-level UX by adding a
`Float8GemmConfig` field to `Float8LinearConfig`.

Note that today the only supported configuration option is
`use_fast_accum`.  In the future, configuring output_dtype
and whether to keep a gemm in higher precision would go here.

Test Plan:

```
./test/test_everything.sh
```

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
ScaledMMConfig(
emulate,
True if not emulate else False,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was mistakenly set to default True in #315, fixing

@vkuzo
Copy link
Contributor Author

vkuzo commented Jul 25, 2024

@vkuzo has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b9b606e.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants