openaccel-lab
aien-dev/openaccel-lab
Brought by drakestapleton
openaccel-lab / workloads / dequant_int8 / workload.json
| 1 | { |
| 2 | "name": "dequant_int8", |
| 3 | "family": "quantization", |
| 4 | "summary": "per-row int8 dequantization: y[r][c] = q[r][c] * s[r], q i8 in -127..127, s f32 per row", |
| 5 | "provenance": "authored for OpenAccel Lab (Apache-2.0)", |
| 6 | "params": { |
| 7 | "R": 64, |
| 8 | "C": 256 |
| 9 | }, |
| 10 | "cases": [ |
| 11 | {}, |
| 12 | { |
| 13 | "R": 1, |
| 14 | "C": 1 |
| 15 | }, |
| 16 | { |
| 17 | "R": 5, |
| 18 | "C": 77 |
| 19 | } |
| 20 | ], |
| 21 | "shrink": { |
| 22 | "R": { |
| 23 | "min": 1 |
| 24 | }, |
| 25 | "C": { |
| 26 | "min": 1 |
| 27 | } |
| 28 | }, |
| 29 | "inputs": [ |
| 30 | { |
| 31 | "name": "q", |
| 32 | "dtype": "i8", |
| 33 | "shape": [ |
| 34 | "R", |
| 35 | "C" |
| 36 | ], |
| 37 | "gen": { |
| 38 | "kind": "int", |
| 39 | "lo": -127, |
| 40 | "hi": 127 |
| 41 | } |
| 42 | }, |
| 43 | { |
| 44 | "name": "s", |
| 45 | "dtype": "f32", |
| 46 | "shape": [ |
| 47 | "R" |
| 48 | ], |
| 49 | "gen": { |
| 50 | "kind": "uniform", |
| 51 | "lo": 0.001, |
| 52 | "hi": 0.05 |
| 53 | } |
| 54 | } |
| 55 | ], |
| 56 | "outputs": [ |
| 57 | { |
| 58 | "name": "y", |
| 59 | "dtype": "f32", |
| 60 | "shape": [ |
| 61 | "R", |
| 62 | "C" |
| 63 | ] |
| 64 | } |
| 65 | ], |
| 66 | "tolerance": { |
| 67 | "y": { |
| 68 | "kind": "exact", |
| 69 | "why": "q converts to f32 exactly (|q| <= 127 < 2^24), then one correctly rounded f32 multiply per element" |
| 70 | } |
| 71 | }, |
| 72 | "timing": { |
| 73 | "warmup": 2, |
| 74 | "repeats": 10 |
| 75 | }, |
| 76 | "backends": { |
| 77 | "omega": { |
| 78 | "src": "omega.om" |
| 79 | }, |
| 80 | "opencl": { |
| 81 | "src": "kernel.cl", |
| 82 | "launches": [ |
| 83 | { |
| 84 | "kernel": "dequant_int8", |
| 85 | "global": [ |
| 86 | "R", |
| 87 | "C" |
| 88 | ], |
| 89 | "local": null, |
| 90 | "args": [ |
| 91 | "q", |
| 92 | "s", |
| 93 | "y", |
| 94 | "R", |
| 95 | "C" |
| 96 | ] |
| 97 | } |
| 98 | ] |
| 99 | }, |
| 100 | "triton": { |
| 101 | "src": "triton_kernel.py" |
| 102 | }, |
| 103 | "cuda": { |
| 104 | "src": "kernel.cu" |
| 105 | } |
| 106 | } |
| 107 | } |