ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

Tensix: Exponent Thresholding (Packers)

T1 tenstorrent guide guide
Tenstorrent WormholeB0 Tensix — Exponent Thresholding (Packers)
SourceTenstorrent Official Tensix ISA Documentation (Wormhole & Blackhole) (tenstorrent_tt_isa)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeTenstorrent WormholeB0
Tenstorrent Wormhole B0 & Blackhole A0
License & VersionApache-2.0
main
Upstreamhttps://github.com/tenstorrent/tt-isa-documentation
ExtensionsTensix, WormholeB0

Summary

Exponent thresholding can optionally be used to replace values which are close to zero with zero. Its use (Exp_threshold_en set) is UnsupportedFunctionality.

Reference Notes

# Exponent Thresholding

Exponent thresholding can optionally be used to replace values which are close to zero with zero. Its use (`Exp_threshold_en` set) is `UnsupportedFunctionality`.

## Functional model

```c

Datum ApplyExponentThresholding(Datum d) {
  uint1_t StateID = ThreadConfig[CurrentThread].CFG_STATE_ID_StateID;
  auto& CurrentPackerConfig = CurrentPacker.Config[StateID];
  if (CurrentPackerConfig.Exp_threshold_en) {
    UnsupportedFunctionality(); // No known usage
    uint8_t Threshold = CurrentPackerConfig.Exp_threshold;
    uint4_t DataFormat = CurrentPackerConfig.In_data_format;
    switch (DataFormat) {
    case FP32: case TF32: case BF16: case BFP8: case BFP4:
      // In these cases, d.Exponent is an 8-bit value.
      if (d.Exponent < Threshold) {
        return 0;
      }
      break;
    case FP16: case FP8: case BFP8a: case BFP4a:
      // In these cases, d.Exponent is a 5-bit value, and it'll be zero-extended
      // to eight bits before the comparison with Threshold.
      if (d.Exponent < Threshold) {
        return 0;
      }
      break;
    case BFP2a:
      UndefinedBehavior(); // Hardware bug
      break;
    }
  }
  return d;
}

```