openaccel-lab
aien-dev/openaccel-lab
Brought by drakestapleton
openaccel-lab / controls / scan_exclusive / workload.json
| 1 | { |
| 2 | "name": "scan_exclusive", |
| 3 | "family": "scan", |
| 4 | "summary": "CONTROL for scan_i32: every entrant computes the EXCLUSIVE prefix sum (inclusive scan of x shifted right by one); judged by the scan_i32 reference, it must fail", |
| 5 | "provenance": "authored for OpenAccel Lab (Apache-2.0); deliberately wrong copy of workloads/scan_i32", |
| 6 | "expect": "fail", |
| 7 | "reference_from": "scan_i32", |
| 8 | "params": { |
| 9 | "n": 100003 |
| 10 | }, |
| 11 | "derived": { |
| 12 | "nb": "(n + 255) // 256" |
| 13 | }, |
| 14 | "cases": [ |
| 15 | {}, |
| 16 | {"n": 1}, |
| 17 | {"n": 257} |
| 18 | ], |
| 19 | "shrink": { |
| 20 | "n": {"min": 1} |
| 21 | }, |
| 22 | "inputs": [ |
| 23 | {"name": "x", "dtype": "i32", "shape": ["n"], "gen": {"kind": "int", "lo": 1, "hi": 9}} |
| 24 | ], |
| 25 | "outputs": [ |
| 26 | {"name": "y", "dtype": "i32", "shape": ["n"]} |
| 27 | ], |
| 28 | "scratch": [ |
| 29 | {"name": "bsum", "dtype": "i32", "shape": ["nb"]} |
| 30 | ], |
| 31 | "tolerance": { |
| 32 | "y": { |
| 33 | "kind": "int", |
| 34 | "atol": 0, |
| 35 | "why": "same contract as scan_i32; inputs are 1..9 so the exclusive prefix differs from the inclusive one at every element, including n = 1" |
| 36 | } |
| 37 | }, |
| 38 | "timing": {"warmup": 1, "repeats": 5}, |
| 39 | "backends": { |
| 40 | "omega": {"src": "omega.om"}, |
| 41 | "opencl": { |
| 42 | "src": "kernel.cl", |
| 43 | "launches": [ |
| 44 | {"kernel": "scan_blk", "global": ["nb * 256"], "local": [256], "args": ["x", "y", "bsum", "n", "local:i32:256"]}, |
| 45 | {"kernel": "scan_sums", "global": [256], "local": [256], "args": ["bsum", "nb", "local:i32:256"]}, |
| 46 | {"kernel": "scan_add", "global": ["nb * 256"], "local": [256], "args": ["y", "bsum", "n"]} |
| 47 | ] |
| 48 | }, |
| 49 | "triton": {"src": "triton_kernel.py"}, |
| 50 | "cuda": {"src": "kernel.cu"} |
| 51 | } |
| 52 | } |