NVIDIA / NVIDIA/TransformerEngine

`Float8Quantizer::create_tensor` calculates `scale_inv` instead of creating an empty buffer

Open
#1,491 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
Python
Stars
3.5k
Forks
831
Avg merge
3d 11h
Merged PRs (30d)
65

Description

https://github.com/NVIDIA/TransformerEngine/blob/b39397c541292f336c5964dd1661d80c08dc4c78/transformer_engine/pytorch/csrc/extensions/quantizer.cpp#L112

This brings some overheads. For example, in fused_multi_quantize, the reciprocal kernels (along with the launch overheads) take most of the overall time.

Image

There was an optimization that updates FP8 scale-inverse in kernels with FP8 output https://github.com/NVIDIA/TransformerEngine/pull/1083, why did we change it?

cc @timmoon10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with transformer_engine/pytorch/csrc/extensions/quantizer.cpp at line 112 and trace Float8Quantizer::create_tensor, then inspect fused_multi_quantize and the optimization in PR 1083. Compare the current scale_inv behavior with the proposed empty-buffer approach, verify FP8 output correctness, and measure whether reciprocal kernel overhead is removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, pytorch
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.