TransformerEngine icon indicating copy to clipboard operation
TransformerEngine copied to clipboard

Use internal quantizer in Linear module

Open ptrendx opened this issue 8 months ago • 1 comments

Description

Use internal option in the input quantizer in the Linear module.

Type of change

  • [ ] Documentation change (change only to the documentation, either a fix or a new content)
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Infra/Build change
  • [ ] Code refactoring

Changes

Please list the changes introduced in this PR:

  • Moved update_usage from *Tensor to *TensorBase (without changes)
  • Added is_quantized_tensor function
  • Changed the input quantizer to be internal
  • (not really related but came about in the testing) Modified the absolute tolerance in the distributed test of FP32 transformer.

Checklist:

  • [ ] I have read and followed the contributing guidelines
  • [ ] The functionality is complete
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes

ptrendx avatar Apr 03 '25 00:04 ptrendx

/te-ci pytorch L1

ptrendx avatar Apr 03 '25 00:04 ptrendx

/te-ci

ptrendx avatar May 01 '25 22:05 ptrendx

/te-ci

ptrendx avatar May 03 '25 00:05 ptrendx

/te-ci pytorch L1

timmoon10 avatar May 05 '25 23:05 timmoon10

This PR introduced a bug in Thunder's TE executor, which is fixed with https://github.com/Lightning-AI/lightning-thunder/pull/2146 (see https://github.com/Lightning-AI/lightning-thunder/pull/2146#issuecomment-2915824016).

timmoon10 avatar May 28 '25 19:05 timmoon10