Softanza
DémarrerEnglish
Softanza
La bibliothèque se documente elle-même · GPU

stzGpu

32 méthodes propres · 1 formes avec extensions, rangées sous leur méthode

la source: base/gpu/stzGpu.ring(s'ouvre dans un nouvel onglet) · Toutes les classes · La référence du domaine : GPU

Sous chaque méthode, ses extensions (Q CS XT Z ZZ IB W U) : en gras et cochée, elle existe ; barrée, elle n'existe pas. Les extensions et leur sens

Aucune méthode de cette classe n'est exécutée sur cette page : la classe touche aux fichiers, au réseau, aux processus, à l'horloge, au hasard ou au son, et un exemple exécuté ici ne serait que l'exemple de ses effets. Chaque méthode porte l'explication que la bibliothèque donne d'elle-même.

Méthode
Explication, telle que la source la porte
init
(sans commentaire dans la source : le nom se lit comme une phrase) initaucune extension
IsAvailable
(sans commentaire dans la source : le nom se lit comme une phrase) is availableaucune extension
DeviceName
(sans commentaire dans la source : le nom se lit comme une phrase) device nameaucune extension
AdapterCount
(sans commentaire dans la source : le nom se lit comme une phrase) adapter countaucune extension
UploadQ
Upload a vector; it lives on the device until Free() (or eviction under VRAM pressure -- bounded, counted, never silent).aucune extension
Run
One-shot convenience: upload the bound vectors, run the kernel, read the result back, free everything temporary. Data in, DATA out.QCSXTZZZIBWU
ApplyOnQ
Multi-input kernels over ALREADY-RESIDENT buffers: no transfer at all. paBindings binds vector names to stzGpuBuffer objects (plus scalars): oG.ApplyOnQ(k, [ :A = oBuf1, :B = oBuf2, :alpha = 2 ])aucune extension
Calibrate
Measure where the GPU actually starts winning ON THIS MACHINE, store the crossover in the calibration store, and persist it (the faces auto-load it in later sessions). Warm-min discipline throughout -- G0's clock inversion means sustained numbers flatter the GPU. Returns [ nThreshold, [ [nProblemSize, nCpuMs, nGpuMs], ... ] ].aucune extension
CalibrateWith
The same, on a caller-chosen ladder of corpus sizes (d fixed at 64: a representative embedding width; problem size = n*d).aucune extension
Verify
pCand may be an stzKernelMaker on the SAME declarations, or raw WGSL on the same binding contract (how a hand-written variant -- or a cheat -- gets checked). Options: [ :reps = 7, :band = 0.000001 ].aucune extension
VerifyWith
(sans commentaire dans la source : le nom se lit comme une phrase) verify withaucune extension
VerifyJudge
The roofline alone: could a dispatch touching nBytes finish in nMs on this device? Pure judgement over the MEASURED floors -- exposed so a guard can hand it an impossible number and watch it refuse.aucune extension
VerifyFloors
The measured floors themselves: [ :floorgbs, :submitfloorms ]aucune extension
LoadCalibration
(sans commentaire dans la source : le nom se lit comme une phrase) load calibrationaucune extension
FirstError
one rung: warm-min per-query ms through the REAL seam, both routes Measured 2026-09-09 on this laptop's RTX 3050: after ~10 s idle, every submit pays a fixed ~2 ms and the copy floor reads 13 GB/s instead of 85 -- and hundreds of tiny queries never lift it, while ~150 ms of heavy work does. Wake() is that work, ADAPTIVE: it copies until a copy runs at full speed, settles, and stops -- the budget is a cap. Every timing this face takes calls it first; a caller measuring on its own should too. Returns the copies it took (an awake device answers in ~20). THE CAUSE AND THE SYMPTOM. A shader that fails validation raises two errors: the parser's, with the offending name and line, and then the pipeline's, which only says the module is invalid. FirstError() is the parser's; LastError() is whatever came last. A compile clears both first.aucune extension
LastError
(sans commentaire dans la source : le nom se lit comme une phrase) last erroraucune extension
ClearErrors
(sans commentaire dans la source : le nom se lit comme une phrase) clear errorsaucune extension
Wake
(sans commentaire dans la source : le nom se lit comme une phrase) wakeaucune extension
CalibrateKnnResident
Measured 2026-09-09 on the RTX 3050 laptop at 384 dims: the GPU loses at 1,000 (0.39x) and 4,000 (0.98x) and wins at 16,000 (1.42x); the multicore top-k switches on at n*d >= 8M and the window may close again above it -- which is why the rung above that gate is measured too, and why the store is SHAPED: a class that wins carries its win, and the flat line stays beyond the ladder where a class lost.aucune extension
CalibrateKnnResidentWith
(sans commentaire dans la source : le nom se lit comme une phrase) calibrate knn resident withaucune extension
ConvolveReal
This is the ONE-SHOT doorway: upload, run, download. A plane holding its signal on the device uses the buffer form (StzEngineGpuOpConvolveReal over buffer ids) and pays no marshalling -- the sound desk's route.aucune extension
FoundryPairdist
Report: [ :m, :n, :d, :hiddenn, :clocks, :refgpums, :refwallms, :variants = [ [name, verified, gpums, wallms, ratio, ratiowall], ... ], :winner = name, :ratio = generic/winner on the GPU clock, :stored = bool ]aucune extension
FoundryPairdistWith
(sans commentaire dans la source : le nom se lit comme une phrase) foundry pairdist withaucune extension
FoundryAttention
THE ATTENTION FOUNDRY (GK2c). The backbone's fused attention -- one workgroup per (head, query row) -- against three reduction-form variants at workgroup widths 64, 128 and 256, under the checker on the neural DLL's device; the winner recorded for the (tokens, width, head_dim) class under the op name "attention", persisted, and pushed into the neural DLL's table so the next forward dispatches it.aucune extension
FoundryAttentionWith
(sans commentaire dans la source : le nom se lit comme une phrase) foundry attention withaucune extension
FoundryMatmul
THE MATMUL FOUNDRY (GK2b's matmul leg). C(m x n) = A(m x k) B(k x n): tile16 (the generic), tile8, reg2, reg4 under the checker at the asked shape and a hidden one; the winner recorded for the (m, n, k) class under the op name "matmul" and persisted. The backbone compiles the table's winner for its own shapes with the bias fused.aucune extension
FoundryMatmulWith
(sans commentaire dans la source : le nom se lit comme une phrase) foundry matmul withaucune extension
FoundryUmapKnn
THE k-NN FOUNDRY (GS6e). The UMAP k-NN kernel lives in the stats DLL on its own device, so its enumeration runs there; the verdict is recorded in that DLL's variant table AND persisted here under the op name "umap_knn", beside pairdist's rows, so the next session finds it. The stats DLL reads the persisted rows back through StzUmapKnnVariantsSync() at its first fit.aucune extension
FoundryUmapKnnWith
(sans commentaire dans la source : le nom se lit comme une phrase) foundry umap knn withaucune extension
FoundryPairdistGrid
The kill line, per adapter: a grid of single-query shapes; TRUE if any class found a variant worth the margin.aucune extension
CalibrateShaped
Report: [ :cells = [[d, n, cpuMs, gpuMs, ratio], ...], :flat = the flat line stored, :flatwhy = "crossover" | "beyond-ladder", :hidden = [ [d, n, cpuMs, gpuMs, predicted, measured, agree], ... ], :adapter = name ]aucune extension
CalibrateShapedWith
(sans commentaire dans la source : le nom se lit comme une phrase) calibrate shaped withaucune extension