跳转至

Other

本页暂无中文版。以下为英文原文。

6 ops, 27 workloads — FFT 1 · mHC 2 · Engram 3.

One table per op, one row per workload. Ratio is the fastest other implementation's device time divided by ours, so green is faster than it, plain is level with it, red is slower. Times are in ms. How these numbers are taken.

FFT

FFTC2CFwd

input: [*B, n]

  • latency-4kinput: [4096]dtype=c64
  • throughput-4kinput: [64, 4096]dtype=c64, c128
  • longconv-16kinput: [64, 16384]dtype=c64
  • longconv-64kinput: [8, 65536]dtype=c64
  • spectrogram-1kinput: [256, 1024]dtype=c64
  • fnet-512input: [4096, 512]dtype=c64
  • shortconv-64input: [65536, 64]dtype=c64
  • scientific-1minput: [4, 1048576]dtype=c128
  • spectrogram-1k-b300input: [300, 1024]dtype=c64
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
latency-4kc641.54×0.00358torch-compile
torch-cufft
0.00554
0.00557
0.06860%lat
throughput-4kc641.28×0.00445torch-cufft
torch-compile
0.0057
0.0057
3.5421%lat
c1281.18×0.00726torch-cufft
torch-compile
0.00858
0.00858
2.1726%lat
longconv-16kc641.07×0.0154torch-cufft
torch-compile
0.0164
0.0164
4.7724%mem
longconv-64kc641.24×0.00893torch-cufft
torch-compile
0.0110
0.0110
4.721%lat
spectrogram-1kc641.15×0.00352torch-cufft
torch-compile
0.00403
0.00406
3.7226%lat
fnet-512c641.26×0.0109torch-compile
torch-cufft
0.0138
0.0138
8.6268%mem
shortconv-64c641.09×0.0203torch-compile
torch-cufft
0.0222
0.0222
6.273%mem
scientific-1mc1281.38×0.1049torch-compile
torch-cufft
0.1448
0.1449
428%mem
spectrogram-1k-b300c641.14×0.004torch-cufft
torch-compile
0.00458
0.00458
3.8427%lat

mHC

MHCPreFwd

phi: [C, Q]x: [B, C], bf16b: [Q]

alpha_pre=1alpha_post=1alpha_res=1sinkhorn_repeat=1dtype=f32

  • hidden-1280phi: [5120, 24]x: [1, 5120], bf16b: [24]
  • hidden-1920phi: [7680, 24]x: [2, 7680], bf16b: [24]
  • hidden-2560phi: [10240, 24]x: [4, 10240], bf16b: [24]
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
hidden-1280f324.40×0.00472torch-compile
torch-ref
0.0208
0.0658
0.06292%lat
hidden-1920f326.43×0.00509torch-compile
torch-ref
0.0327
0.0856
0.1754%lat
hidden-2560f3210.52×0.0055torch-compile
torch-ref
0.0579
0.1246
0.4325%lat

MHCPostFwd

x_layer_out: [B, c_x]h_post: [B, n], f32x_res: [B, n * c_x]

dtype=bf16

  • hidden-1280x_layer_out: [1, 1280]h_post: [1, 4], f32x_res: [1, 5120]
  • hidden-1920x_layer_out: [2, 1920]h_post: [2, 4], f32x_res: [2, 7680]
  • hidden-2560x_layer_out: [4, 2560]h_post: [4, 4], f32x_res: [4, 10240]
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
hidden-1280bf160.98×0.00144torch-compile
torch-ref
0.00141
0.0107
0.007110%lat
hidden-1920bf161.00×0.0015torch-compile
torch-ref
0.0015
0.0111
0.02041%lat
hidden-2560bf160.98×0.00166torch-compile
torch-ref
0.00163
0.0115
0.04922%lat

Engram

EngramGateConvFwd

H, k, v: [M, seq_len, d]rms_w_h, rms_w_v: [d]conv_w: [4, d]

  • train-s32H, k, v: [1, 32, 256]rms_w_h, rms_w_v: [256]conv_w: [4, 256]dtype=f16
  • train-s64H, k, v: [2, 64, 512]rms_w_h, rms_w_v: [512]conv_w: [4, 512]dtype=f16
  • train-s128H, k, v: [1, 128, 256]rms_w_h, rms_w_v: [256]conv_w: [4, 256]dtype=bf16
  • train-s96H, k, v: [3, 96, 768]rms_w_h, rms_w_v: [768]conv_w: [4, 768]dtype=bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
train-s32f162.54×0.00442torch-compile
torch-ref
0.0112
0.0748
0.05320%lat
train-s64f162.14×0.00512torch-compile
torch-ref
0.0110
0.0859
0.3693%lat
train-s128bf162.81×0.00454torch-compile
torch-ref
0.0128
0.0804
0.2092%lat
train-s96bf162.15×0.0072torch-compile
torch-ref
0.0155
0.1004
0.8887%lat

EngramGateConvBwd

dY, H, k, v, vhat: [M, seq_len, d]rms_w_h, rms_w_v: [d]conv_w: [4, d]alpha, rrms_h, rrms_k, rrms_v: [M, seq_len], f32

  • train-s32dY, H, k, v, vhat: [1, 32, 256]rms_w_h, rms_w_v: [256]conv_w: [4, 256]alpha, rrms_h, rrms_k, rrms_v: [1, 32], f32dtype=f16
  • train-s64dY, H, k, v, vhat: [2, 64, 512]rms_w_h, rms_w_v: [512]conv_w: [4, 512]alpha, rrms_h, rrms_k, rrms_v: [2, 64], f32dtype=f16
  • train-s128dY, H, k, v, vhat: [1, 128, 256]rms_w_h, rms_w_v: [256]conv_w: [4, 256]alpha, rrms_h, rrms_k, rrms_v: [1, 128], f32dtype=bf16
  • train-s96dY, H, k, v, vhat: [3, 96, 768]rms_w_h, rms_w_v: [768]conv_w: [4, 768]alpha, rrms_h, rrms_k, rrms_v: [3, 96], f32dtype=bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
train-s32f1618.60×0.00906torch0.16840.06140%lat
train-s64f1610.10×0.0199torch0.20110.2251%lat
train-s128bf1611.91×0.0155torch0.18450.1451%lat
train-s96bf162.36×0.1051torch0.24770.1451%mem

EngramDecodeFwd

e_t: [batch, d_mem]h_t: [batch, d]conv_state: [batch, L, d]W_K, W_V: [d_mem, d]rms_w_h, rms_w_v: [d]conv_w: [conv_kernel_size, d]

  • serving-b1e_t: [1, 512]h_t: [1, 256]conv_state: [1, 12, 256]W_K, W_V: [512, 256]rms_w_h, rms_w_v: [256]conv_w: [4, 256]max_conv_len=12dilation=3dtype=f16
  • serving-b4e_t: [4, 1024]h_t, conv_w: [4, 512]conv_state: [4, 20, 512]W_K, W_V: [1024, 512]rms_w_h, rms_w_v: [512]max_conv_len=20dilation=5dtype=f16
  • serving-b8e_t: [8, 512]h_t: [8, 256]conv_state: [8, 18, 256]W_K, W_V: [512, 256]rms_w_h, rms_w_v: [256]conv_w: [4, 256]max_conv_len=18dilation=3dtype=bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
serving-b1f161.88×0.0071torch-compile
torch-ref
0.0133
0.0949
0.07472%lat
serving-b4f162.68×0.0096torch-compile
torch-ref
0.0257
0.1221
0.8795%lat
serving-b8bf163.29×0.00653torch-compile
torch-ref
0.0215
0.1120
0.652%lat