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

[1/x] clean up casting functions #342

Closed
wants to merge 1 commit into from
Closed

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Jul 26, 2024

Stack from ghstack (oldest at bottom):

Summary:

This is a start of a cleanup of private casting functions in preparation for
rowwise scaling. In this PR:

  1. create float8_scaling_utils.py to unify functions which take a
    high precision tensor and return a float8 tensor, taking care of
    scaling
  2. delete Float8Tensor.to_float8 and move callsites to
    ToFloat8ConstrFunc, since the two functions do the same thing

The end result is a slightly cleaner state, future PRs will do more
cleanups.

Test Plan:

./test/test_everything.sh

Reviewers:

Subscribers:

Tasks:

Tags:

Summary:

This is a start of a cleanup of private casting functions in preparation for
rowwise scaling.  In this PR:
1. create `float8_scaling_utils.py` to unify functions which take a
   high precision tensor and return a float8 tensor, taking care of
   scaling
2. delete `Float8Tensor.to_float8` and move callsites to
   `ToFloat8ConstrFunc`, since the two functions do the same thing

The end result is a slightly cleaner state, future PRs will do more
cleanups.

Test Plan:

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

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 26, 2024
@vkuzo
Copy link
Contributor Author

vkuzo commented Jul 26, 2024

started a new PR due to ghstack error

@vkuzo vkuzo closed this Jul 26, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants