Datasets:
v1.1: compiler-backed dialects, 375 records, 1225 diagnostic pairs
Browse files- v1.1/README.md +125 -0
- v1.1/dataset_full.jsonl +3 -0
- v1.1/dataset_full.parquet +3 -0
- v1.1/dataset_noncommercial.jsonl +3 -0
- v1.1/dataset_noncommercial.parquet +3 -0
- v1.1/dataset_permissive.jsonl +3 -0
- v1.1/dataset_permissive.parquet +3 -0
- v1.1/diagnostic_bugfix_pairs.jsonl +0 -0
- v1.1/metrics.json +64 -0
- v1.1/sample.jsonl +3 -0
v1.1/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- graphics
|
| 9 |
+
- glsl
|
| 10 |
+
- wgsl
|
| 11 |
+
- hlsl
|
| 12 |
+
- metal
|
| 13 |
+
- spir-v
|
| 14 |
+
- webgpu
|
| 15 |
+
- shaders
|
| 16 |
+
- compiler-validated
|
| 17 |
+
size_categories:
|
| 18 |
+
- 10K<n<100K
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# ShaderCross Graphics Dataset v1.1
|
| 22 |
+
|
| 23 |
+
Multi-dialect shader corpus where **every dialect is produced by a real
|
| 24 |
+
compiler** and validated by a real validator.
|
| 25 |
+
|
| 26 |
+
## What changed from the previous release
|
| 27 |
+
|
| 28 |
+
The earlier release advertised a five-way polyglot matrix but generated it with
|
| 29 |
+
regular-expression substitution. Measured on the published files:
|
| 30 |
+
|
| 31 |
+
| Claim | Measured reality |
|
| 32 |
+
|---|---|
|
| 33 |
+
| Five dialects via compilers | `wgsl_transpiler.py` was ~60 regexes; `subprocess` was imported but never called |
|
| 34 |
+
| Valid targets | `dxc -T ps_6_0` rejected the HLSL: `layout(location = 0) in float3 v_WorldPos;` |
|
| 35 |
+
| Distinct implementations | `quick_ratio(glsl, wgsl) = 0.9996`; 82% of records were four near-identical copies |
|
| 36 |
+
| Zero-junk filtering | `validation` was all zeros; 42% of records were not shaders (e.g. a tree-sitter C scanner) |
|
| 37 |
+
| Dense corpus | 41.6% of bytes were exact duplicates stored under two keys |
|
| 38 |
+
|
| 39 |
+
v1.1 replaces the transpiler with `glslang -> spirv-cross -> naga` and validates
|
| 40 |
+
each target with `spirv-val`, `glslangValidator`, `dxc` and `wgpu`. On the same
|
| 41 |
+
GGX shader, GLSL-to-HLSL similarity fell from 0.9996 to 0.715 and `dxc` now
|
| 42 |
+
accepts the output.
|
| 43 |
+
|
| 44 |
+
## Generation and validation matrix
|
| 45 |
+
|
| 46 |
+
| Dialect | Generator | This run | Validator |
|
| 47 |
+
|---|---|---|---|
|
| 48 |
+
| SPIR-V | glslangValidator -V | 557/562 (99%) | spirv-val |
|
| 49 |
+
| GLSL 330 | spirv-cross | 445/536 (83%) | glslangValidator |
|
| 50 |
+
| ESSL 300 | spirv-cross | 441/476 (93%) | glslangValidator |
|
| 51 |
+
| HLSL SM6.0 | spirv-cross | 438/514 (85%) | dxc (authoritative) |
|
| 52 |
+
| MSL 2.0 | spirv-cross | emitted, unverified | none exists on Linux |
|
| 53 |
+
| WGSL | sampler-split + naga | 334/458 (73%) | wgpu.create_shader_module |
|
| 54 |
+
|
| 55 |
+
`msl_status` is reported as `EMITTED_UNVERIFIED`, never `PASSED`: no Metal
|
| 56 |
+
compiler exists outside macOS, and overstating that is what made the previous
|
| 57 |
+
release untrustworthy.
|
| 58 |
+
|
| 59 |
+
### The WGSL fix
|
| 60 |
+
|
| 61 |
+
GLSL's `sampler2D` is a combined image sampler; WGSL requires separate
|
| 62 |
+
`texture_2d<f32>` and `sampler` bindings. naga cannot bridge that gap, so 64% of
|
| 63 |
+
shaders failed conversion with `invalid id %N`. Twelve SPIR-V hygiene strategies
|
| 64 |
+
scored 0/40. Normalising the **source** instead lifted WGSL from 36% to 86%.
|
| 65 |
+
|
| 66 |
+
## Contents
|
| 67 |
+
|
| 68 |
+
| File | Records |
|
| 69 |
+
|---|---|
|
| 70 |
+
| `dataset_full.jsonl` | 375 |
|
| 71 |
+
| `dataset_permissive.jsonl` | 346 |
|
| 72 |
+
| `dataset_noncommercial.jsonl` | 29 |
|
| 73 |
+
| `diagnostic_bugfix_pairs.jsonl` | 1225 |
|
| 74 |
+
| `metrics.json` | pipeline counters |
|
| 75 |
+
|
| 76 |
+
Parquet mirrors use nested Arrow structs rather than JSON-in-a-string.
|
| 77 |
+
|
| 78 |
+
### Diagnostic pairs
|
| 79 |
+
|
| 80 |
+
Compilation failures are not discarded. Each becomes a record with the compiler
|
| 81 |
+
invocation, its exact log, and an explanation. Cases marked `is_fixable: false`
|
| 82 |
+
are constructs that cannot exist in the target API at all - subpass input,
|
| 83 |
+
`gl_PointCoord`, mesh shaders, descriptor indexing - which teaches genuine
|
| 84 |
+
portability boundaries.
|
| 85 |
+
|
| 86 |
+
## Pipeline statistics for this build
|
| 87 |
+
|
| 88 |
+
```
|
| 89 |
+
repositories : 64/102 cloned
|
| 90 |
+
files scanned: 8972
|
| 91 |
+
candidates : 1751
|
| 92 |
+
accepted : 375
|
| 93 |
+
diagnostics : 1225
|
| 94 |
+
rejected : L0=2456 licence=4765 inflation=20
|
| 95 |
+
duplicates : exact=52 near=82
|
| 96 |
+
tokens : 2,536,681
|
| 97 |
+
elapsed : 460s
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
## Toolchain
|
| 101 |
+
|
| 102 |
+
```json
|
| 103 |
+
{
|
| 104 |
+
"glslang": "Glslang Version: 10:11.8.0",
|
| 105 |
+
"spirv_cross": "(Debian package)",
|
| 106 |
+
"spirv_val": "SPIRV-Tools v2022.2-dev unknown hash, 2022-02-16T16:37:15",
|
| 107 |
+
"spirv_opt": "SPIRV-Tools v2022.2-dev unknown hash, 2022-02-16T16:37:15",
|
| 108 |
+
"spirv_dis": "SPIRV-Tools v2022.2-dev unknown hash, 2022-02-16T16:37:15",
|
| 109 |
+
"naga": "30.0.0",
|
| 110 |
+
"dxc": "libdxcompiler.so: 1.8(dev;3944-3e105849)"
|
| 111 |
+
}
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
## Licensing
|
| 115 |
+
|
| 116 |
+
Records carry `license` and `license_category`. Use `dataset_permissive.jsonl`
|
| 117 |
+
for commercial pre-training; `dataset_noncommercial.jsonl` holds CC-BY-NC and
|
| 118 |
+
GPL-derived material for research only.
|
| 119 |
+
|
| 120 |
+
## Schema
|
| 121 |
+
|
| 122 |
+
See `docs/ARCHITECTURE_v1.1.md` in the source repository. Key point: generated
|
| 123 |
+
code lives in exactly one place, `implementations.*`, and validation is
|
| 124 |
+
tri-state (`PASSED` / `FAILED` / `EMITTED_UNVERIFIED`) so unprovable claims are
|
| 125 |
+
representable rather than rounded up to success.
|
v1.1/dataset_full.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62beb04363734163037c91058eee48b80c83f0ae167a009d5fb37e749a7061df
|
| 3 |
+
size 6992390
|
v1.1/dataset_full.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80af04cd2e674767d416aa34563c0210c2ccf04c76b7ae623c61917def58c408
|
| 3 |
+
size 997296
|
v1.1/dataset_noncommercial.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6892d16db968b68808aae284dd1a6cd5a8fead52fa8420ea81ab2a0bd97a8e8
|
| 3 |
+
size 317328
|
v1.1/dataset_noncommercial.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:96126515646321ca0a404642bf8e5a295662cf0a55d533a910f4f8178323b121
|
| 3 |
+
size 87184
|
v1.1/dataset_permissive.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4b71df1b4ed6e0d27886a62323be68b16d8723678af21383d4cc1b88b9b5916
|
| 3 |
+
size 6675062
|
v1.1/dataset_permissive.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:53ab86865fb605bd41354f9853420fd289ccb5f6e2391adc07af971865c56711
|
| 3 |
+
size 953912
|
v1.1/diagnostic_bugfix_pairs.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
v1.1/metrics.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"repos_attempted": 102,
|
| 3 |
+
"repos_cloned": 64,
|
| 4 |
+
"repos_failed": 38,
|
| 5 |
+
"files_scanned": 8972,
|
| 6 |
+
"candidates": 1751,
|
| 7 |
+
"rejected_l0": 2456,
|
| 8 |
+
"rejected_license": 4765,
|
| 9 |
+
"rejected_inflation": 20,
|
| 10 |
+
"rejected_integrity": 0,
|
| 11 |
+
"duplicates_exact": 52,
|
| 12 |
+
"duplicates_near": 82,
|
| 13 |
+
"accepted": 375,
|
| 14 |
+
"diagnostics": 1225,
|
| 15 |
+
"target_passed": {
|
| 16 |
+
"spirv": 557,
|
| 17 |
+
"glsl_330": 445,
|
| 18 |
+
"essl_300": 441,
|
| 19 |
+
"wgsl": 334,
|
| 20 |
+
"hlsl_sm60": 438
|
| 21 |
+
},
|
| 22 |
+
"target_failed": {
|
| 23 |
+
"hlsl_sm60": 76,
|
| 24 |
+
"glsl_330": 91,
|
| 25 |
+
"essl_300": 35,
|
| 26 |
+
"wgsl": 85,
|
| 27 |
+
"spirv": 5
|
| 28 |
+
},
|
| 29 |
+
"target_unverified": {
|
| 30 |
+
"msl_20": 543
|
| 31 |
+
},
|
| 32 |
+
"target_unsupported": {
|
| 33 |
+
"wgsl": 39
|
| 34 |
+
},
|
| 35 |
+
"reject_reasons": {
|
| 36 |
+
"L0:only 6 non-blank lines (min 8)": 82,
|
| 37 |
+
"L0:only 7 non-blank lines (min 8)": 123,
|
| 38 |
+
"L0:only 4 non-blank lines (min 8)": 52,
|
| 39 |
+
"L0:only 3 non-blank lines (min 8)": 21,
|
| 40 |
+
"L0:only 1 shader marker(s), need 2": 211,
|
| 41 |
+
"L0:only 0 shader marker(s), need 2": 42,
|
| 42 |
+
"L0:no shader entry point": 1546,
|
| 43 |
+
"L0:only 2 non-blank lines (min 8)": 8,
|
| 44 |
+
"L0:only 5 non-blank lines (min 8)": 107,
|
| 45 |
+
"L0:trivial stub or passthrough shader": 67,
|
| 46 |
+
"L4:target near-identical to source": 20,
|
| 47 |
+
"L0:host-language markers present: ['cpp_namespace']": 36,
|
| 48 |
+
"L0:host-language markers present: ['java_csharp_declaration', 'cpp_namesp": 34,
|
| 49 |
+
"L0:host-language markers present: ['java_csharp_declaration']": 121,
|
| 50 |
+
"L0:host-language markers present: ['c_stdio_call']": 2,
|
| 51 |
+
"L3:licence 'verify' could not be classified": 4765,
|
| 52 |
+
"L0:6709 lines exceeds max 4000": 1,
|
| 53 |
+
"L0:host-language markers present: ['cpp_std_namespace']": 3
|
| 54 |
+
},
|
| 55 |
+
"failure_classes": {
|
| 56 |
+
"compile_error": 1194,
|
| 57 |
+
"validator_rejected": 26,
|
| 58 |
+
"wgsl_unsupported_by_webgpu": 4,
|
| 59 |
+
"sampler_split_failed": 1
|
| 60 |
+
},
|
| 61 |
+
"total_tokens": 2536681,
|
| 62 |
+
"elapsed_seconds": 460.22603058815,
|
| 63 |
+
"sampler_split_applied": 68
|
| 64 |
+
}
|
v1.1/sample.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56489d5820a723e4651bf44e0f7b5686ba4b39cfb3f3c4a49fbbe7ae776cd43f
|
| 3 |
+
size 774021
|