Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/openaccel-lab/blob/main/workloads/dequant_int8/triton_kernel.py # openaccel-lab aien-dev/openaccel-lab Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `openaccel-lab / workloads / dequant_int8 / triton_kernel.py` 16 lines ยท 454 bytes Raw Blame History 1 # SPDX-License-Identifier: Apache-2.0 2 import triton 3 import triton.language as tl 4 5 6 @triton.jit 7 def _dequant_int8(q, s, y, C, BC: tl.constexpr): 8 r = tl.program_id(0) 9 c = tl.arange(0, BC) 10 live = c < C 11 qv = tl.load(q + r * C + c, mask=live, other=0).to(tl.float32) 12 tl.store(y + r * C + c, qv * tl.load(s + r), mask=live) 13 14 15 def launch(p, t): 16 _dequant_int8[(p["R"],)](t["q"], t["s"], t["y"], p["C"], BC=triton.next_power_of_2(p["C"]))