← all workloads

specialization

A generic struct over a type parameter, instantiated at n distinct wrapper types. Forces specializeModule to clone the generic n ways.

bucket: specialization  ·  compile mode: target  ·  flags: -target spirv -emit-spirv-directly  ·  default N: 300

Phase composition across releases

Full sub-counter decomposition of compileInner — named leaf timers plus (self) residuals (a parent's time not covered by a named child, e.g. the autodiff transform in linkAndOptimizeIR (self)). Topmost band traces compileInner; hover a band for its phase.

specialization — full phase breakdown across releases (median ms) specialization 1.01× 0.0 169 338 daily → 25.14 25.15 25.16 25.17 25.18 25.19 25.20 25.21 25.22 25.23 25.24 26.1 26.2 26.3 26.4 26.5 26.7 26.8 26.9 26.10 26.11 06-25 06-26 specialization — parseTranslationUnit specialization — SemanticChecking specialization — generateIR specialization — frontEndExecute (self) specialization — specializeModule specialization — simplifyIR specialization — linkIR specialization — unrollLoopsInModule specialization — legalizeResourceTypes specialization — legalizeExistentialTypeLayout specialization — performMandatoryEarlyInlining specialization — performForceInlining specialization — linkAndOptimizeIR (self) specialization — generateOutput (self) specialization — compileInner (self) phase buckets parseTranslationUnit SemanticChecking generateIR frontEndExecute (self) specializeModule simplifyIR linkIR unrollLoopsInModule legalizeResourceTypes legalizeExistentialTypeLayout performMandatoryEarlyInlining performForceInlining linkAndOptimizeIR (self) emitEntryPointsSourceFromIR generateOutput (self) compileInner (self)

Compiled Slang source

exact compiled source (N = 300); long files show the first 40 lines, the area around computeMain (±40), and the last 40 lines (gaps elided)

specialization.slang

// AUTO-GENERATED by perf-suite/workloads.py — do not edit by hand.
RWStructuredBuffer<float> outBuf;

interface IVal { float get(); }

struct V0 : IVal { float get() { return 0.0 + 1.0; } }
struct V1 : IVal { float get() { return 1.0 + 1.0; } }
struct V2 : IVal { float get() { return 2.0 + 1.0; } }
struct V3 : IVal { float get() { return 3.0 + 1.0; } }
struct V4 : IVal { float get() { return 4.0 + 1.0; } }
struct V5 : IVal { float get() { return 5.0 + 1.0; } }
struct V6 : IVal { float get() { return 6.0 + 1.0; } }
struct V7 : IVal { float get() { return 7.0 + 1.0; } }
struct V8 : IVal { float get() { return 8.0 + 1.0; } }
struct V9 : IVal { float get() { return 9.0 + 1.0; } }
struct V10 : IVal { float get() { return 10.0 + 1.0; } }
struct V11 : IVal { float get() { return 11.0 + 1.0; } }
struct V12 : IVal { float get() { return 12.0 + 1.0; } }
struct V13 : IVal { float get() { return 13.0 + 1.0; } }
struct V14 : IVal { float get() { return 14.0 + 1.0; } }
struct V15 : IVal { float get() { return 15.0 + 1.0; } }
struct V16 : IVal { float get() { return 16.0 + 1.0; } }
struct V17 : IVal { float get() { return 17.0 + 1.0; } }
struct V18 : IVal { float get() { return 18.0 + 1.0; } }
struct V19 : IVal { float get() { return 19.0 + 1.0; } }
struct V20 : IVal { float get() { return 20.0 + 1.0; } }
struct V21 : IVal { float get() { return 21.0 + 1.0; } }
struct V22 : IVal { float get() { return 22.0 + 1.0; } }
struct V23 : IVal { float get() { return 23.0 + 1.0; } }
struct V24 : IVal { float get() { return 24.0 + 1.0; } }
struct V25 : IVal { float get() { return 25.0 + 1.0; } }
struct V26 : IVal { float get() { return 26.0 + 1.0; } }
struct V27 : IVal { float get() { return 27.0 + 1.0; } }
struct V28 : IVal { float get() { return 28.0 + 1.0; } }
struct V29 : IVal { float get() { return 29.0 + 1.0; } }
struct V30 : IVal { float get() { return 30.0 + 1.0; } }
struct V31 : IVal { float get() { return 31.0 + 1.0; } }
struct V32 : IVal { float get() { return 32.0 + 1.0; } }
struct V33 : IVal { float get() { return 33.0 + 1.0; } }
struct V34 : IVal { float get() { return 34.0 + 1.0; } }

// … 230 lines omitted …

struct V265 : IVal { float get() { return 265.0 + 1.0; } }
struct V266 : IVal { float get() { return 266.0 + 1.0; } }
struct V267 : IVal { float get() { return 267.0 + 1.0; } }
struct V268 : IVal { float get() { return 268.0 + 1.0; } }
struct V269 : IVal { float get() { return 269.0 + 1.0; } }
struct V270 : IVal { float get() { return 270.0 + 1.0; } }
struct V271 : IVal { float get() { return 271.0 + 1.0; } }
struct V272 : IVal { float get() { return 272.0 + 1.0; } }
struct V273 : IVal { float get() { return 273.0 + 1.0; } }
struct V274 : IVal { float get() { return 274.0 + 1.0; } }
struct V275 : IVal { float get() { return 275.0 + 1.0; } }
struct V276 : IVal { float get() { return 276.0 + 1.0; } }
struct V277 : IVal { float get() { return 277.0 + 1.0; } }
struct V278 : IVal { float get() { return 278.0 + 1.0; } }
struct V279 : IVal { float get() { return 279.0 + 1.0; } }
struct V280 : IVal { float get() { return 280.0 + 1.0; } }
struct V281 : IVal { float get() { return 281.0 + 1.0; } }
struct V282 : IVal { float get() { return 282.0 + 1.0; } }
struct V283 : IVal { float get() { return 283.0 + 1.0; } }
struct V284 : IVal { float get() { return 284.0 + 1.0; } }
struct V285 : IVal { float get() { return 285.0 + 1.0; } }
struct V286 : IVal { float get() { return 286.0 + 1.0; } }
struct V287 : IVal { float get() { return 287.0 + 1.0; } }
struct V288 : IVal { float get() { return 288.0 + 1.0; } }
struct V289 : IVal { float get() { return 289.0 + 1.0; } }
struct V290 : IVal { float get() { return 290.0 + 1.0; } }
struct V291 : IVal { float get() { return 291.0 + 1.0; } }
struct V292 : IVal { float get() { return 292.0 + 1.0; } }
struct V293 : IVal { float get() { return 293.0 + 1.0; } }
struct V294 : IVal { float get() { return 294.0 + 1.0; } }
struct V295 : IVal { float get() { return 295.0 + 1.0; } }
struct V296 : IVal { float get() { return 296.0 + 1.0; } }
struct V297 : IVal { float get() { return 297.0 + 1.0; } }
struct V298 : IVal { float get() { return 298.0 + 1.0; } }
struct V299 : IVal { float get() { return 299.0 + 1.0; } }

struct Box<T : IVal> { T v; float compute() { return v.get() * 2.0 + v.get(); } }

[shader("compute")]
[numthreads(1,1,1)]
void computeMain()
{
    float acc = 0.0;
    { Box<V0> b; acc += b.compute(); }
    { Box<V1> b; acc += b.compute(); }
    { Box<V2> b; acc += b.compute(); }
    { Box<V3> b; acc += b.compute(); }
    { Box<V4> b; acc += b.compute(); }
    { Box<V5> b; acc += b.compute(); }
    { Box<V6> b; acc += b.compute(); }
    { Box<V7> b; acc += b.compute(); }
    { Box<V8> b; acc += b.compute(); }
    { Box<V9> b; acc += b.compute(); }
    { Box<V10> b; acc += b.compute(); }
    { Box<V11> b; acc += b.compute(); }
    { Box<V12> b; acc += b.compute(); }
    { Box<V13> b; acc += b.compute(); }
    { Box<V14> b; acc += b.compute(); }
    { Box<V15> b; acc += b.compute(); }
    { Box<V16> b; acc += b.compute(); }
    { Box<V17> b; acc += b.compute(); }
    { Box<V18> b; acc += b.compute(); }
    { Box<V19> b; acc += b.compute(); }
    { Box<V20> b; acc += b.compute(); }
    { Box<V21> b; acc += b.compute(); }
    { Box<V22> b; acc += b.compute(); }
    { Box<V23> b; acc += b.compute(); }
    { Box<V24> b; acc += b.compute(); }
    { Box<V25> b; acc += b.compute(); }
    { Box<V26> b; acc += b.compute(); }
    { Box<V27> b; acc += b.compute(); }
    { Box<V28> b; acc += b.compute(); }
    { Box<V29> b; acc += b.compute(); }
    { Box<V30> b; acc += b.compute(); }
    { Box<V31> b; acc += b.compute(); }
    { Box<V32> b; acc += b.compute(); }
    { Box<V33> b; acc += b.compute(); }
    { Box<V34> b; acc += b.compute(); }
    { Box<V35> b; acc += b.compute(); }
    { Box<V36> b; acc += b.compute(); }
    { Box<V37> b; acc += b.compute(); }

// … 224 lines omitted …

    { Box<V262> b; acc += b.compute(); }
    { Box<V263> b; acc += b.compute(); }
    { Box<V264> b; acc += b.compute(); }
    { Box<V265> b; acc += b.compute(); }
    { Box<V266> b; acc += b.compute(); }
    { Box<V267> b; acc += b.compute(); }
    { Box<V268> b; acc += b.compute(); }
    { Box<V269> b; acc += b.compute(); }
    { Box<V270> b; acc += b.compute(); }
    { Box<V271> b; acc += b.compute(); }
    { Box<V272> b; acc += b.compute(); }
    { Box<V273> b; acc += b.compute(); }
    { Box<V274> b; acc += b.compute(); }
    { Box<V275> b; acc += b.compute(); }
    { Box<V276> b; acc += b.compute(); }
    { Box<V277> b; acc += b.compute(); }
    { Box<V278> b; acc += b.compute(); }
    { Box<V279> b; acc += b.compute(); }
    { Box<V280> b; acc += b.compute(); }
    { Box<V281> b; acc += b.compute(); }
    { Box<V282> b; acc += b.compute(); }
    { Box<V283> b; acc += b.compute(); }
    { Box<V284> b; acc += b.compute(); }
    { Box<V285> b; acc += b.compute(); }
    { Box<V286> b; acc += b.compute(); }
    { Box<V287> b; acc += b.compute(); }
    { Box<V288> b; acc += b.compute(); }
    { Box<V289> b; acc += b.compute(); }
    { Box<V290> b; acc += b.compute(); }
    { Box<V291> b; acc += b.compute(); }
    { Box<V292> b; acc += b.compute(); }
    { Box<V293> b; acc += b.compute(); }
    { Box<V294> b; acc += b.compute(); }
    { Box<V295> b; acc += b.compute(); }
    { Box<V296> b; acc += b.compute(); }
    { Box<V297> b; acc += b.compute(); }
    { Box<V298> b; acc += b.compute(); }
    { Box<V299> b; acc += b.compute(); }
    outBuf[0] = acc;
}