doppler-gpu 0.4.15 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/package.json +25 -2
- package/src/cli/doppler-cli.js +253 -94
- package/src/cli/runtime-profiles.js +3 -7
- package/src/client/doppler-api.d.ts +28 -0
- package/src/client/doppler-api.js +2 -0
- package/src/client/inspection.d.ts +122 -0
- package/src/client/inspection.js +343 -0
- package/src/client/runtime/index.d.ts +54 -0
- package/src/client/runtime/index.js +190 -18
- package/src/client/runtime/model-manager.d.ts +0 -4
- package/src/client/runtime/model-manager.js +0 -28
- package/src/client/runtime/model-session.d.ts +48 -1
- package/src/client/runtime/model-session.js +149 -30
- package/src/client/runtime/model-source.d.ts +10 -1
- package/src/client/runtime/scoped-session.d.ts +117 -0
- package/src/client/runtime/scoped-session.js +257 -0
- package/src/client/runtime/types.d.ts +0 -1
- package/src/client/runtime/types.js +0 -1
- package/src/config/evidence/boundary-evidence-policy.json +54 -0
- package/src/config/evidence/source-intake-policy.json +122 -0
- package/src/config/inspection/observation-policies.json +80 -0
- package/src/config/param-validator.js +21 -36
- package/src/config/runtime/compute/f16-activations.json +1 -0
- package/src/config/runtime/compute/f16-batched.json +1 -0
- package/src/config/runtime/default.json +1 -0
- package/src/config/runtime/diagnostics/debug-logits.json +1 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k-alt.json +1 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k-batched.json +1 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k.json +1 -0
- package/src/config/runtime/experiments/bench/gemma4-bench-q4k.json +1 -0
- package/src/config/runtime/experiments/bench/qwen3-bench-q4k-alt.json +1 -0
- package/src/config/runtime/experiments/bench/qwen3-bench-q4k-batched.json +1 -0
- package/src/config/runtime/experiments/debug/gemma3-browser-diagnose-q4k.json +1 -1
- package/src/config/runtime/experiments/debug/gemma3-debug-q4k.json +1 -3
- package/src/config/runtime/experiments/debug/gemma4-e2b-browser-diagnose-q4k.json +1 -1
- package/src/config/runtime/experiments/debug/qwen35-browser-diagnose-q4k.json +1 -1
- package/src/config/runtime/experiments/verify/gemma3-verify.json +1 -3
- package/src/config/runtime/experiments/verify/gemma4-e2b-verify.json +1 -3
- package/src/config/runtime/experiments/verify/lfm2-verify.json +1 -3
- package/src/config/runtime/experiments/verify/translategemma-verify.json +1 -3
- package/src/config/runtime/model/gemma2-debug.json +1 -0
- package/src/config/runtime/model/gemma2-pipeline-debug.json +1 -0
- package/src/config/runtime/model/gemma2-pipeline.json +1 -0
- package/src/config/runtime/model/gemma3-layer-probe.json +1 -0
- package/src/config/runtime/model/qwen3-5-layer-probe.json +1 -0
- package/src/config/runtime/model/qwen3-5-layer3-boundary-probe.json +1 -0
- package/src/config/runtime/model/qwen3-5-linear-attn-debug.json +1 -0
- package/src/config/runtime/optimization-candidates/registry.json +5 -0
- package/src/config/runtime/platform/metal-apple-q4k.json +1 -0
- package/src/config/runtime/profiles/default.json +1 -0
- package/src/config/runtime/profiles/diffusiongemma-26b-a4b-throughput.json +1 -0
- package/src/config/runtime/profiles/gemma3-270m-q4k-throughput-overlapped-probe.json +1 -0
- package/src/config/runtime/profiles/gemma3-270m-q4k-throughput-probe.json +1 -0
- package/src/config/runtime/profiles/gemma4-12b-rdrr-safe-b4.json +1 -3
- package/src/config/runtime/profiles/gemma4-12b-rdrr-safe-single.json +1 -3
- package/src/config/runtime/profiles/gemma4-31b-f16-activations-probe.json +1 -5
- package/src/config/runtime/profiles/gemma4-e2b-baseline-probe.json +1 -3
- package/src/config/runtime/profiles/gemma4-e2b-fused-rmsnorm-probe.json +1 -3
- package/src/config/runtime/profiles/gemma4-e2b-fused-rmsnorm-test.json +1 -0
- package/src/config/runtime/profiles/gemma4-e2b-int4ple-baseline-probe.json +1 -5
- package/src/config/runtime/profiles/gemma4-e2b-int4ple-f16a-probe.json +1 -5
- package/src/config/runtime/profiles/gemma4-e2b-int4ple-reference-export.json +1 -3
- package/src/config/runtime/profiles/gemma4-e2b-int4ple-retain-q4k-probe.json +1 -5
- package/src/config/runtime/profiles/gemma4-e2b-low-memory.json +1 -0
- package/src/config/runtime/profiles/gemma4-e2b-prefill-profile.json +1 -3
- package/src/config/runtime/profiles/gemma4-e2b-throughput-probe.json +1 -0
- package/src/config/runtime/profiles/low-memory.json +1 -0
- package/src/config/runtime/profiles/production.json +1 -3
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-attn128-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-maxbatch64-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-normed-ffn-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-overlap-ringtokens1-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-parity.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-sequential-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-throughput.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-prefill-profile.json +1 -3
- package/src/config/runtime/profiles/qwen-3-5-0-8b-throughput-probe.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-2b-f16-primary-throughput.json +1 -5
- package/src/config/runtime/profiles/qwen-3-5-2b-metal-parity.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-2b-metal-throughput.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-9b-metal-correctness.json +1 -0
- package/src/config/runtime/profiles/qwen-3-embedding-0-6b-metal-stability.json +1 -3
- package/src/config/runtime/profiles/qwen-3-embedding-0-6b-metal-throughput.json +1 -0
- package/src/config/runtime/profiles/qwen-3-reranker-0-6b-metal-stability.json +1 -0
- package/src/config/runtime/profiles/qwen-3-reranker-0-6b-metal-throughput.json +1 -0
- package/src/config/runtime/profiles/qwen3-6-27b-f16-activations-probe.json +1 -5
- package/src/config/runtime/profiles/rerank-stability.json +1 -3
- package/src/config/runtime/profiles/rerank-throughput.json +1 -3
- package/src/config/runtime/profiles/simulation.json +1 -3
- package/src/config/runtime/profiles/throughput.json +1 -3
- package/src/config/runtime/profiles/trace-layers.json +1 -3
- package/src/config/runtime/profiles/translategemma-1b-nativekd2-q4k-rdna3-throughput-probe.json +1 -0
- package/src/config/runtime/profiles/turboquant-contiguous-prod.json +1 -0
- package/src/config/runtime/profiles/turboquant-contiguous.json +1 -0
- package/src/config/runtime/profiles/turboquant.json +1 -0
- package/src/config/runtime/profiles/vector-stability.json +1 -3
- package/src/config/runtime/profiles/vector-throughput.json +1 -0
- package/src/config/runtime/profiles/verbose-trace.json +1 -3
- package/src/config/runtime/tiers/gemma4-128gb.json +1 -0
- package/src/config/runtime/tiers/gemma4-16gb.json +1 -0
- package/src/config/runtime/tiers/gemma4-24gb.json +1 -0
- package/src/config/runtime/tiers/gemma4-32gb.json +1 -0
- package/src/config/schema/benchmark.schema.d.ts +7 -0
- package/src/config/schema/benchmark.schema.js +5 -0
- package/src/config/schema/index.d.ts +8 -16
- package/src/config/schema/index.js +5 -8
- package/src/config/schema/kernel-thresholds.schema.d.ts +0 -12
- package/src/config/schema/kernel-thresholds.schema.js +0 -12
- package/src/config/schema/kernel-warmup.schema.d.ts +1 -3
- package/src/config/schema/kernel-warmup.schema.js +0 -1
- package/src/config/schema/runtime-profile.schema.d.ts +24 -0
- package/src/config/schema/runtime-profile.schema.js +92 -0
- package/src/config/schema/shared-runtime.schema.d.ts +1 -4
- package/src/config/schema/shared-runtime.schema.js +0 -2
- package/src/config/schema/tooling.schema.d.ts +8 -5
- package/src/config/schema/tooling.schema.js +3 -2
- package/src/debug/tensor.d.ts +2 -0
- package/src/debug/tensor.js +21 -2
- package/src/gpu/command-recorder.d.ts +5 -0
- package/src/gpu/command-recorder.js +17 -0
- package/src/gpu/kernel-runtime.js +2 -10
- package/src/gpu/kernels/index.d.ts +0 -2
- package/src/gpu/kernels/index.js +0 -2
- package/src/gpu/kernels/kernel-prewarm.d.ts +3 -0
- package/src/gpu/kernels/kernel-prewarm.js +60 -0
- package/src/gpu/kernels/utils.d.ts +2 -4
- package/src/gpu/kernels/utils.js +2 -4
- package/src/index.d.ts +13 -1
- package/src/index.js +7 -1
- package/src/inference/browser-harness-model-helpers.js +4 -0
- package/src/inference/browser-harness-runtime-helpers.js +25 -10
- package/src/inference/browser-harness-text-helpers.js +4 -1
- package/src/inference/browser-harness.d.ts +4 -0
- package/src/inference/browser-harness.js +91 -4
- package/src/inference/observation-context.d.ts +22 -0
- package/src/inference/observation-context.js +41 -0
- package/src/inference/pipelines/text/attention/attn-config.js +1 -1
- package/src/inference/pipelines/text/attention/executor-immediate.js +42 -0
- package/src/inference/pipelines/text/attention/executor-recorded.js +29 -0
- package/src/inference/pipelines/text/attention/index.js +7 -0
- package/src/inference/pipelines/text/attention/interpreter.js +1334 -0
- package/src/inference/pipelines/text/attention/plan.d.ts +36 -0
- package/src/inference/pipelines/text/attention/plan.js +328 -0
- package/src/inference/pipelines/text/attention/receipt.js +60 -0
- package/src/inference/pipelines/text/attention/record.js +8 -1278
- package/src/inference/pipelines/text/attention/run.js +8 -1386
- package/src/inference/pipelines/text/generator-decode-policy.js +4 -1
- package/src/inference/pipelines/text/generator-helpers.js +2 -0
- package/src/inference/pipelines/text/generator-steps.js +32 -15
- package/src/inference/pipelines/text/generator.js +10 -5
- package/src/inference/pipelines/text/init.d.ts +3 -0
- package/src/inference/pipelines/text/layer-plan-gpu.js +2 -0
- package/src/inference/pipelines/text/layer.js +2 -0
- package/src/inference/pipelines/text/model-load.d.ts +0 -1
- package/src/inference/pipelines/text/model-load.js +2 -11
- package/src/inference/pipelines/text/probes.js +10 -0
- package/src/inference/pipelines/text/resolved-runtime-session.d.ts +56 -0
- package/src/inference/pipelines/text/resolved-runtime-session.js +175 -0
- package/src/inference/pipelines/text/state.d.ts +6 -0
- package/src/inference/pipelines/text/state.js +3 -0
- package/src/inference/pipelines/text/types.d.ts +6 -0
- package/src/inference/pipelines/text.js +16 -1
- package/src/inference/refactor-receipt.d.ts +49 -0
- package/src/inference/refactor-receipt.js +188 -0
- package/src/inference/resource-scope.d.ts +33 -0
- package/src/inference/resource-scope.js +168 -0
- package/src/inference/test-harness.d.ts +3 -0
- package/src/inference/test-harness.js +1 -0
- package/src/storage/model-cache.d.ts +53 -0
- package/src/storage/model-cache.js +550 -0
- package/src/tooling/boundary-evidence.d.ts +51 -0
- package/src/tooling/boundary-evidence.js +408 -0
- package/src/tooling/browser-command-runner.js +4 -4
- package/src/tooling/command-context.d.ts +25 -0
- package/src/tooling/command-context.js +53 -0
- package/src/tooling/command-runner-shared.js +22 -5
- package/src/tooling/demo-receipts.d.ts +56 -0
- package/src/tooling/demo-receipts.js +113 -0
- package/src/tooling/diagnose-runner.js +2 -2
- package/src/tooling/execution-cost-ledger.d.ts +21 -0
- package/src/tooling/execution-cost-ledger.js +199 -0
- package/src/tooling/node-command-runner.js +2 -2
- package/src/tooling/opfs-cache.d.ts +11 -49
- package/src/tooling/opfs-cache.js +4 -510
- package/src/tooling/precision-replay-math.d.ts +42 -0
- package/src/tooling/precision-replay-math.js +174 -0
- package/src/tooling/program-bundle-parity.d.ts +3 -0
- package/src/tooling/program-bundle-parity.js +8 -0
- package/src/tooling/program-bundle.d.ts +1 -52
- package/src/tooling/program-bundle.js +0 -139
- package/src/tooling/registered-variant-calibration.d.ts +24 -0
- package/src/tooling/registered-variant-calibration.js +286 -0
- package/src/tooling/runtime-input-composition.js +105 -53
- package/src/tooling/runtime-intent.js +41 -0
- package/src/tooling/runtime-optimization-index.d.ts +6 -0
- package/src/tooling/runtime-optimization-index.js +72 -0
- package/src/tooling/runtime-optimization.d.ts +47 -6
- package/src/tooling/runtime-optimization.js +559 -40
- package/src/tooling/source-intake.d.ts +49 -0
- package/src/tooling/source-intake.js +414 -0
- package/src/tooling-exports/evidence.d.ts +34 -0
- package/src/tooling-exports/evidence.js +34 -0
- package/src/tooling-exports/runtime.d.ts +7 -0
- package/src/tooling-exports/runtime.js +7 -0
- package/src/tooling-exports.d.ts +11 -0
- package/src/tooling-exports.js +6 -3
- package/src/tooling-exports.shared.d.ts +32 -0
- package/src/tooling-exports.shared.js +31 -0
- package/src/version.js +1 -1
- package/src/config/schema/tuner.schema.d.ts +0 -39
- package/src/config/schema/tuner.schema.js +0 -13
- package/src/gpu/kernel-tuner/benchmarks.js +0 -902
- package/src/gpu/kernel-tuner/cache.js +0 -145
- package/src/gpu/kernel-tuner/index.js +0 -38
- package/src/gpu/kernel-tuner/tuner.js +0 -247
- package/src/gpu/kernel-tuner.js +0 -12
- package/src/gpu/kernels/kernel-tuning.d.ts +0 -42
- package/src/gpu/kernels/kernel-tuning.js +0 -158
- package/src/gpu/profiler.js +0 -382
- package/src/inference/pipelines/text/attention/output-gate-fusion.js +0 -37
|
@@ -52,16 +52,6 @@ export const DEFAULT_ROPE_DEFAULTS = {
|
|
|
52
52
|
defaultStartPos: 0,
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
// =============================================================================
|
|
56
|
-
// Kernel Tuning Defaults
|
|
57
|
-
// =============================================================================
|
|
58
|
-
|
|
59
|
-
export const DEFAULT_TUNER_LIMITS = {
|
|
60
|
-
maxComputeWorkgroupSizeX: 256,
|
|
61
|
-
maxComputeWorkgroupSizeY: 256,
|
|
62
|
-
maxComputeInvocationsPerWorkgroup: 256,
|
|
63
|
-
};
|
|
64
|
-
|
|
65
55
|
// =============================================================================
|
|
66
56
|
// Attention Thresholds
|
|
67
57
|
// =============================================================================
|
|
@@ -154,7 +144,6 @@ export const DEFAULT_KERNEL_THRESHOLDS = {
|
|
|
154
144
|
attention: DEFAULT_ATTENTION_THRESHOLDS,
|
|
155
145
|
fusedMatmul: DEFAULT_FUSED_MATMUL_THRESHOLDS,
|
|
156
146
|
cast: DEFAULT_CAST_THRESHOLDS,
|
|
157
|
-
tuner: DEFAULT_TUNER_LIMITS,
|
|
158
147
|
};
|
|
159
148
|
|
|
160
149
|
|
|
@@ -181,7 +170,6 @@ export function setKernelThresholds(overrides) {
|
|
|
181
170
|
attention: { ...currentThresholds.attention, ...overrides.attention },
|
|
182
171
|
fusedMatmul: { ...currentThresholds.fusedMatmul, ...overrides.fusedMatmul },
|
|
183
172
|
cast: { ...currentThresholds.cast, ...overrides.cast },
|
|
184
|
-
tuner: { ...currentThresholds.tuner, ...overrides.tuner },
|
|
185
173
|
};
|
|
186
174
|
currentThresholds = cloneThresholdTree(nextThresholds);
|
|
187
175
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Kernel Warmup Config Schema
|
|
3
3
|
*
|
|
4
|
-
* Controls optional kernel prewarming
|
|
4
|
+
* Controls optional kernel prewarming.
|
|
5
5
|
*
|
|
6
6
|
* @module config/schema/kernel-warmup
|
|
7
7
|
*/
|
|
@@ -11,8 +11,6 @@ export interface KernelWarmupConfigSchema {
|
|
|
11
11
|
prewarm: boolean;
|
|
12
12
|
/** Prewarm scheduling mode (parallel or sequential). */
|
|
13
13
|
prewarmMode: 'parallel' | 'sequential';
|
|
14
|
-
/** Auto-tune kernel workgroup sizes for the active model config. */
|
|
15
|
-
autoTune: boolean;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
/** Default kernel warmup configuration */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ToolingIntent } from './tooling.schema.js';
|
|
2
|
+
|
|
3
|
+
export type RuntimeProfileStability = 'canonical' | 'experimental' | 'deprecated';
|
|
4
|
+
|
|
5
|
+
export interface RuntimeProfileMetadata {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
intent: Exclude<ToolingIntent, null>;
|
|
9
|
+
compatibleIntents: Array<Exclude<ToolingIntent, null>>;
|
|
10
|
+
stability: RuntimeProfileStability;
|
|
11
|
+
owner: string;
|
|
12
|
+
createdAtUtc: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function validateRuntimeProfileMetadata(
|
|
16
|
+
profile: Record<string, unknown>,
|
|
17
|
+
label?: string
|
|
18
|
+
): Readonly<RuntimeProfileMetadata>;
|
|
19
|
+
|
|
20
|
+
export function assertRuntimeProfileIntentCompatibility(
|
|
21
|
+
profile: Record<string, unknown>,
|
|
22
|
+
requestIntent: ToolingIntent,
|
|
23
|
+
label?: string
|
|
24
|
+
): Readonly<RuntimeProfileMetadata>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { TOOLING_INTENTS } from './tooling.schema.js';
|
|
2
|
+
|
|
3
|
+
const RUNTIME_PROFILE_STABILITIES = Object.freeze([
|
|
4
|
+
'canonical',
|
|
5
|
+
'experimental',
|
|
6
|
+
'deprecated',
|
|
7
|
+
]);
|
|
8
|
+
|
|
9
|
+
function assertNonEmptyString(value, label) {
|
|
10
|
+
if (typeof value !== 'string' || value.trim().length === 0) {
|
|
11
|
+
throw new Error(`DopplerConfigError: ${label} must be a non-empty string.`);
|
|
12
|
+
}
|
|
13
|
+
return value.trim();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function normalizeCompatibleIntents(value, label) {
|
|
17
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
18
|
+
throw new Error(`DopplerConfigError: ${label} must be a non-empty array.`);
|
|
19
|
+
}
|
|
20
|
+
const compatibleIntents = value.map((intent, index) => {
|
|
21
|
+
const normalized = assertNonEmptyString(intent, `${label}[${index}]`);
|
|
22
|
+
if (!TOOLING_INTENTS.includes(normalized)) {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`DopplerConfigError: ${label}[${index}] must be one of ${TOOLING_INTENTS.join(', ')}.`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return normalized;
|
|
28
|
+
});
|
|
29
|
+
if (new Set(compatibleIntents).size !== compatibleIntents.length) {
|
|
30
|
+
throw new Error(`DopplerConfigError: ${label} must not contain duplicates.`);
|
|
31
|
+
}
|
|
32
|
+
return compatibleIntents;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function validateRuntimeProfileMetadata(profile, label = 'runtime profile') {
|
|
36
|
+
if (!profile || typeof profile !== 'object' || Array.isArray(profile)) {
|
|
37
|
+
throw new Error(`DopplerConfigError: ${label} must be an object.`);
|
|
38
|
+
}
|
|
39
|
+
const id = assertNonEmptyString(profile.id, `${label}.id`);
|
|
40
|
+
const name = assertNonEmptyString(profile.name, `${label}.name`);
|
|
41
|
+
const intent = assertNonEmptyString(profile.intent, `${label}.intent`);
|
|
42
|
+
if (!TOOLING_INTENTS.includes(intent)) {
|
|
43
|
+
throw new Error(
|
|
44
|
+
`DopplerConfigError: ${label}.intent must be one of ${TOOLING_INTENTS.join(', ')}.`
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const compatibleIntents = normalizeCompatibleIntents(
|
|
48
|
+
profile.compatibleIntents,
|
|
49
|
+
`${label}.compatibleIntents`
|
|
50
|
+
);
|
|
51
|
+
if (!compatibleIntents.includes(intent)) {
|
|
52
|
+
throw new Error(
|
|
53
|
+
`DopplerConfigError: ${label}.compatibleIntents must include the profile intent "${intent}".`
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
const stability = assertNonEmptyString(profile.stability, `${label}.stability`);
|
|
57
|
+
if (!RUNTIME_PROFILE_STABILITIES.includes(stability)) {
|
|
58
|
+
throw new Error(
|
|
59
|
+
`DopplerConfigError: ${label}.stability must be one of ${RUNTIME_PROFILE_STABILITIES.join(', ')}.`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
const owner = assertNonEmptyString(profile.owner, `${label}.owner`);
|
|
63
|
+
const createdAtUtc = assertNonEmptyString(profile.createdAtUtc, `${label}.createdAtUtc`);
|
|
64
|
+
if (Number.isNaN(Date.parse(createdAtUtc))) {
|
|
65
|
+
throw new Error(`DopplerConfigError: ${label}.createdAtUtc must be an ISO-8601 timestamp.`);
|
|
66
|
+
}
|
|
67
|
+
return Object.freeze({
|
|
68
|
+
id,
|
|
69
|
+
name,
|
|
70
|
+
intent,
|
|
71
|
+
compatibleIntents: Object.freeze([...compatibleIntents]),
|
|
72
|
+
stability,
|
|
73
|
+
owner,
|
|
74
|
+
createdAtUtc,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function assertRuntimeProfileIntentCompatibility(profile, requestIntent, label = 'runtime profile') {
|
|
79
|
+
const metadata = validateRuntimeProfileMetadata(profile, label);
|
|
80
|
+
if (requestIntent === null || requestIntent === undefined) {
|
|
81
|
+
throw new Error(
|
|
82
|
+
`DopplerConfigError: ${label} "${metadata.id}" requires a harness command intent.`
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
if (!metadata.compatibleIntents.includes(requestIntent)) {
|
|
86
|
+
throw new Error(
|
|
87
|
+
`DopplerConfigError: ${label} "${metadata.id}" is not compatible with intent "${requestIntent}". ` +
|
|
88
|
+
`Compatible intents: ${metadata.compatibleIntents.join(', ')}.`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
return metadata;
|
|
92
|
+
}
|
|
@@ -12,7 +12,6 @@ import type { KernelThresholdsConfigSchema } from './kernel-thresholds.schema.js
|
|
|
12
12
|
import type { BufferPoolConfigSchema } from './buffer-pool.schema.js';
|
|
13
13
|
import type { GpuCacheConfigSchema } from './gpu-cache.schema.js';
|
|
14
14
|
import type { MemoryLimitsConfigSchema } from './memory-limits.schema.js';
|
|
15
|
-
import type { TunerConfigSchema } from './tuner.schema.js';
|
|
16
15
|
import type { KernelWarmupConfigSchema } from './kernel-warmup.schema.js';
|
|
17
16
|
import type { HotSwapConfigSchema } from './hotswap.schema.js';
|
|
18
17
|
import type { IntentBundleConfigSchema } from './intent-bundle.schema.js';
|
|
@@ -53,7 +52,7 @@ export interface SharedRuntimeConfigSchema {
|
|
|
53
52
|
kernelRegistry: KernelRegistryConfigSchema;
|
|
54
53
|
/** Kernel selection thresholds */
|
|
55
54
|
kernelThresholds: KernelThresholdsConfigSchema;
|
|
56
|
-
/** Kernel
|
|
55
|
+
/** Kernel prewarming settings */
|
|
57
56
|
kernelWarmup: KernelWarmupConfigSchema;
|
|
58
57
|
/** GPU buffer pool sizing */
|
|
59
58
|
bufferPool: BufferPoolConfigSchema;
|
|
@@ -61,8 +60,6 @@ export interface SharedRuntimeConfigSchema {
|
|
|
61
60
|
gpuCache: GpuCacheConfigSchema;
|
|
62
61
|
/** WASM heap and segment limits */
|
|
63
62
|
memory: MemoryLimitsConfigSchema;
|
|
64
|
-
/** Kernel autotuning settings */
|
|
65
|
-
tuner: TunerConfigSchema;
|
|
66
63
|
/** Hot-swap security policy */
|
|
67
64
|
hotSwap: HotSwapConfigSchema;
|
|
68
65
|
/** Intent bundle gating policy */
|
|
@@ -3,7 +3,6 @@ import { DEFAULT_KERNEL_THRESHOLDS } from './kernel-thresholds.schema.js';
|
|
|
3
3
|
import { DEFAULT_BUFFER_POOL_CONFIG } from './buffer-pool.schema.js';
|
|
4
4
|
import { DEFAULT_GPU_CACHE_CONFIG } from './gpu-cache.schema.js';
|
|
5
5
|
import { DEFAULT_MEMORY_LIMITS_CONFIG } from './memory-limits.schema.js';
|
|
6
|
-
import { DEFAULT_TUNER_CONFIG } from './tuner.schema.js';
|
|
7
6
|
import { DEFAULT_KERNEL_WARMUP_CONFIG } from './kernel-warmup.schema.js';
|
|
8
7
|
import { DEFAULT_HOTSWAP_CONFIG } from './hotswap.schema.js';
|
|
9
8
|
import { DEFAULT_BRIDGE_CONFIG } from './bridge.schema.js';
|
|
@@ -38,7 +37,6 @@ export const DEFAULT_SHARED_RUNTIME_CONFIG = {
|
|
|
38
37
|
bufferPool: DEFAULT_BUFFER_POOL_CONFIG,
|
|
39
38
|
gpuCache: DEFAULT_GPU_CACHE_CONFIG,
|
|
40
39
|
memory: DEFAULT_MEMORY_LIMITS_CONFIG,
|
|
41
|
-
tuner: DEFAULT_TUNER_CONFIG,
|
|
42
40
|
hotSwap: DEFAULT_HOTSWAP_CONFIG,
|
|
43
41
|
intentBundle: DEFAULT_INTENT_BUNDLE_CONFIG,
|
|
44
42
|
bridge: DEFAULT_BRIDGE_CONFIG,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tooling Intent Config Schema Definitions
|
|
3
3
|
*
|
|
4
|
-
* Defines
|
|
5
|
-
*
|
|
4
|
+
* Defines runtime-owned tooling observation and converter configuration.
|
|
5
|
+
* Active command intent lives in ToolingCommandRequest.
|
|
6
6
|
*
|
|
7
7
|
* @module config/schema/tooling
|
|
8
8
|
*/
|
|
@@ -11,19 +11,22 @@ import type { ConverterConfigSchema } from './converter.schema.js';
|
|
|
11
11
|
|
|
12
12
|
export type ToolingIntent = 'verify' | 'investigate' | 'calibrate' | null;
|
|
13
13
|
export type ToolingDiagnosticsMode = 'off' | 'on_failure' | 'always';
|
|
14
|
+
export type RefactorReceiptPolicy = 'off' | 'on_failure' | 'always';
|
|
14
15
|
|
|
15
16
|
export interface ToolingConfigSchema {
|
|
16
|
-
/** High-level tooling intent for the run */
|
|
17
|
-
intent: ToolingIntent;
|
|
18
17
|
/** Diagnostics policy for verification runs */
|
|
19
18
|
diagnostics: ToolingDiagnosticsMode;
|
|
19
|
+
/** Permanent behavior-receipt capture policy */
|
|
20
|
+
refactorReceipts: RefactorReceiptPolicy;
|
|
20
21
|
/** Optional converter config overrides for browser tooling */
|
|
21
22
|
converter?: Partial<ConverterConfigSchema> | null;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
/** Allowed
|
|
25
|
+
/** Allowed command and runtime-profile metadata intents */
|
|
25
26
|
export declare const TOOLING_INTENTS: ToolingIntent[];
|
|
26
27
|
/** Allowed diagnostics modes */
|
|
27
28
|
export declare const TOOLING_DIAGNOSTICS: ToolingDiagnosticsMode[];
|
|
29
|
+
/** Allowed behavior-receipt capture policies */
|
|
30
|
+
export declare const REFACTOR_RECEIPT_POLICIES: RefactorReceiptPolicy[];
|
|
28
31
|
/** Default tooling configuration */
|
|
29
32
|
export declare const DEFAULT_TOOLING_CONFIG: ToolingConfigSchema;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
// Tooling
|
|
2
|
+
// Tooling Observation Config
|
|
3
3
|
// =============================================================================
|
|
4
4
|
|
|
5
5
|
export const TOOLING_INTENTS = ['verify', 'investigate', 'calibrate'];
|
|
6
6
|
export const TOOLING_DIAGNOSTICS = ['off', 'on_failure', 'always'];
|
|
7
|
+
export const REFACTOR_RECEIPT_POLICIES = ['off', 'on_failure', 'always'];
|
|
7
8
|
|
|
8
9
|
export const DEFAULT_TOOLING_CONFIG = {
|
|
9
|
-
intent: null,
|
|
10
10
|
diagnostics: 'on_failure',
|
|
11
|
+
refactorReceipts: 'off',
|
|
11
12
|
converter: null,
|
|
12
13
|
};
|
package/src/debug/tensor.d.ts
CHANGED
package/src/debug/tensor.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { gpuDevice } from './config.js';
|
|
4
4
|
import { log } from './log.js';
|
|
5
5
|
import { computeArrayStats } from './stats.js';
|
|
6
|
+
import { sha256BytesHex } from '../utils/sha256.js';
|
|
6
7
|
|
|
7
8
|
// ============================================================================
|
|
8
9
|
// Internal Helpers
|
|
@@ -251,6 +252,8 @@ export async function snapshotTensor(buffer, shape, dtype = 'f32', options = {})
|
|
|
251
252
|
dtype,
|
|
252
253
|
stats: { min: 0, max: 0, maxAbs: 0, mean: 0, std: 0 },
|
|
253
254
|
sample: [],
|
|
255
|
+
sampleCoordinates: [],
|
|
256
|
+
fullTensorDigest: null,
|
|
254
257
|
hasNaN: false,
|
|
255
258
|
hasInf: false,
|
|
256
259
|
};
|
|
@@ -259,10 +262,24 @@ export async function snapshotTensor(buffer, shape, dtype = 'f32', options = {})
|
|
|
259
262
|
|
|
260
263
|
export function snapshotFromArray(arr, shape, dtype = 'f32', options = {}) {
|
|
261
264
|
const numElements = shape.reduce((a, b) => a * b, 1);
|
|
262
|
-
const
|
|
265
|
+
const capturedElements = Math.min(arr.length, numElements);
|
|
266
|
+
const stats = computeArrayStats(arr, capturedElements);
|
|
263
267
|
const data = options.includeData === true
|
|
264
268
|
? Array.from(arr.slice(0, numElements))
|
|
265
269
|
: undefined;
|
|
270
|
+
const sampleLength = Math.min(8, capturedElements);
|
|
271
|
+
const sampleCoordinates = [];
|
|
272
|
+
for (let flatIndex = 0; flatIndex < sampleLength; flatIndex += 1) {
|
|
273
|
+
let remainder = flatIndex;
|
|
274
|
+
const coordinate = new Array(shape.length);
|
|
275
|
+
for (let axis = shape.length - 1; axis >= 0; axis -= 1) {
|
|
276
|
+
coordinate[axis] = remainder % shape[axis];
|
|
277
|
+
remainder = Math.floor(remainder / shape[axis]);
|
|
278
|
+
}
|
|
279
|
+
sampleCoordinates.push(coordinate);
|
|
280
|
+
}
|
|
281
|
+
const byteLength = capturedElements * arr.BYTES_PER_ELEMENT;
|
|
282
|
+
const digestBytes = new Uint8Array(arr.buffer, arr.byteOffset, byteLength);
|
|
266
283
|
|
|
267
284
|
const snapshot = {
|
|
268
285
|
ok: true,
|
|
@@ -276,7 +293,9 @@ export function snapshotFromArray(arr, shape, dtype = 'f32', options = {}) {
|
|
|
276
293
|
mean: stats.mean,
|
|
277
294
|
std: stats.std,
|
|
278
295
|
},
|
|
279
|
-
sample: Array.from(arr.slice(0,
|
|
296
|
+
sample: Array.from(arr.slice(0, sampleLength)),
|
|
297
|
+
sampleCoordinates,
|
|
298
|
+
fullTensorDigest: `sha256:${sha256BytesHex(digestBytes)}`,
|
|
280
299
|
hasNaN: stats.nanCount > 0,
|
|
281
300
|
hasInf: stats.infCount > 0,
|
|
282
301
|
};
|
|
@@ -157,6 +157,11 @@ export declare class CommandRecorder {
|
|
|
157
157
|
getStats(): {
|
|
158
158
|
opCount: number;
|
|
159
159
|
opLabelCounts: Record<string, number>;
|
|
160
|
+
dispatches: Array<{
|
|
161
|
+
label: string;
|
|
162
|
+
kind: 'direct' | 'indirect';
|
|
163
|
+
workgroups: number[] | null;
|
|
164
|
+
}>;
|
|
160
165
|
computePassCount: number;
|
|
161
166
|
tempBufferCount: number;
|
|
162
167
|
pooledBufferCount: number;
|
|
@@ -43,6 +43,8 @@ export class CommandRecorder {
|
|
|
43
43
|
|
|
44
44
|
#opLabelCounts;
|
|
45
45
|
|
|
46
|
+
#dispatchRecords;
|
|
47
|
+
|
|
46
48
|
#recordLabels;
|
|
47
49
|
|
|
48
50
|
#computePassCount;
|
|
@@ -96,6 +98,7 @@ export class CommandRecorder {
|
|
|
96
98
|
this.#opCount = 0;
|
|
97
99
|
this.#recordLabels = options.recordLabels !== false;
|
|
98
100
|
this.#opLabelCounts = this.#recordLabels ? Object.create(null) : null;
|
|
101
|
+
this.#dispatchRecords = [];
|
|
99
102
|
this.#computePassCount = 0;
|
|
100
103
|
this.#activeComputePass = null;
|
|
101
104
|
// Initialize profiling if requested and available
|
|
@@ -316,6 +319,11 @@ export class CommandRecorder {
|
|
|
316
319
|
throw new Error('[CommandRecorder] Cannot record dispatch after submit');
|
|
317
320
|
}
|
|
318
321
|
const opLabel = this.#recordDispatchOperation(label);
|
|
322
|
+
this.#dispatchRecords.push({
|
|
323
|
+
label: opLabel ?? this.#normalizeOperationLabel(label),
|
|
324
|
+
kind: 'direct',
|
|
325
|
+
workgroups: Array.from(workgroups),
|
|
326
|
+
});
|
|
319
327
|
if (this.#profilingEnabled) {
|
|
320
328
|
const pass = this.#beginRawComputePass(opLabel);
|
|
321
329
|
pass.setPipeline(pipeline);
|
|
@@ -335,6 +343,11 @@ export class CommandRecorder {
|
|
|
335
343
|
throw new Error('[CommandRecorder] Cannot record dispatch after submit');
|
|
336
344
|
}
|
|
337
345
|
const opLabel = this.#recordDispatchOperation(label);
|
|
346
|
+
this.#dispatchRecords.push({
|
|
347
|
+
label: opLabel ?? this.#normalizeOperationLabel(label),
|
|
348
|
+
kind: 'indirect',
|
|
349
|
+
workgroups: null,
|
|
350
|
+
});
|
|
338
351
|
if (this.#profilingEnabled) {
|
|
339
352
|
const pass = this.#beginRawComputePass(opLabel);
|
|
340
353
|
pass.setPipeline(pipeline);
|
|
@@ -524,6 +537,10 @@ export class CommandRecorder {
|
|
|
524
537
|
return {
|
|
525
538
|
opCount: this.#opCount,
|
|
526
539
|
opLabelCounts,
|
|
540
|
+
dispatches: this.#dispatchRecords.map((record) => ({
|
|
541
|
+
...record,
|
|
542
|
+
workgroups: record.workgroups ? [...record.workgroups] : null,
|
|
543
|
+
})),
|
|
527
544
|
computePassCount: this.#computePassCount,
|
|
528
545
|
tempBufferCount: this.#tempBuffers.length,
|
|
529
546
|
pooledBufferCount: this.#pooledBuffers.length,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { prewarmKernels, clearKernelCaches } from './kernels/utils.js';
|
|
4
4
|
import { getRuntimeConfig } from '../config/runtime.js';
|
|
5
5
|
|
|
6
6
|
|
|
@@ -14,26 +14,18 @@ export async function prepareKernelRuntime(
|
|
|
14
14
|
const {
|
|
15
15
|
prewarm = kernelWarmup.prewarm,
|
|
16
16
|
prewarmMode = kernelWarmup.prewarmMode,
|
|
17
|
-
autoTune = kernelWarmup.autoTune,
|
|
18
17
|
clearCaches = false,
|
|
19
|
-
modelConfig = {},
|
|
20
18
|
} = options;
|
|
21
19
|
|
|
22
20
|
if (clearCaches) {
|
|
23
21
|
clearKernelCaches();
|
|
24
22
|
}
|
|
25
23
|
|
|
26
|
-
let tuned = false;
|
|
27
|
-
if (autoTune) {
|
|
28
|
-
await autoTuneKernels(modelConfig);
|
|
29
|
-
tuned = true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
24
|
let warmed = false;
|
|
33
25
|
if (prewarm) {
|
|
34
26
|
await prewarmKernels({ mode: prewarmMode });
|
|
35
27
|
warmed = true;
|
|
36
28
|
}
|
|
37
29
|
|
|
38
|
-
return { warmed
|
|
30
|
+
return { warmed };
|
|
39
31
|
}
|
package/src/gpu/kernels/index.js
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { getKernelCapabilities } from '../device.js';
|
|
2
|
+
import { KERNEL_CONFIGS } from './kernel-configs.js';
|
|
3
|
+
import { createPipeline, clearPipelineCaches } from './pipeline-cache.js';
|
|
4
|
+
import { clearShaderCaches } from './shader-cache.js';
|
|
5
|
+
import { hasRequiredFeatures } from './feature-check.js';
|
|
6
|
+
import { log } from '../../debug/index.js';
|
|
7
|
+
|
|
8
|
+
export async function prewarmKernels(options = {}) {
|
|
9
|
+
const capabilities = getKernelCapabilities();
|
|
10
|
+
const mode = options.mode ?? 'parallel';
|
|
11
|
+
const entries = Object.entries(KERNEL_CONFIGS)
|
|
12
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
13
|
+
.map(([operation, variants]) => [
|
|
14
|
+
operation,
|
|
15
|
+
Object.entries(variants).sort(([left], [right]) => left.localeCompare(right)),
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
if (mode === 'sequential') {
|
|
20
|
+
let count = 0;
|
|
21
|
+
for (const [operation, variants] of entries) {
|
|
22
|
+
for (const [variant, config] of variants) {
|
|
23
|
+
if (config.requires && !hasRequiredFeatures(config.requires, capabilities)) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
await createPipeline(operation, variant);
|
|
28
|
+
count += 1;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
log.warn('KernelPrewarm', `Prewarm failed for ${operation}/${variant}: ${error.message}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
log.debug('KernelPrewarm', `Prewarmed ${count} kernel pipelines`);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const jobs = [];
|
|
39
|
+
for (const [operation, variants] of entries) {
|
|
40
|
+
for (const [variant, config] of variants) {
|
|
41
|
+
if (config.requires && !hasRequiredFeatures(config.requires, capabilities)) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
jobs.push(
|
|
45
|
+
createPipeline(operation, variant)
|
|
46
|
+
.then(() => {})
|
|
47
|
+
.catch((error) => {
|
|
48
|
+
log.warn('KernelPrewarm', `Prewarm failed for ${operation}/${variant}: ${error.message}`);
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
await Promise.all(jobs);
|
|
54
|
+
log.debug('KernelPrewarm', `Prewarmed ${jobs.length} kernel pipelines`);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
clearPipelineCaches();
|
|
57
|
+
clearShaderCaches();
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -62,14 +62,12 @@ export {
|
|
|
62
62
|
} from './feature-check.js';
|
|
63
63
|
|
|
64
64
|
// ============================================================================
|
|
65
|
-
// Re-exports from kernel
|
|
65
|
+
// Re-exports from kernel prewarming
|
|
66
66
|
// ============================================================================
|
|
67
67
|
|
|
68
68
|
export {
|
|
69
|
-
getTunedWorkgroupSize,
|
|
70
|
-
autoTuneKernels,
|
|
71
69
|
prewarmKernels,
|
|
72
|
-
} from './kernel-
|
|
70
|
+
} from './kernel-prewarm.js';
|
|
73
71
|
|
|
74
72
|
// ============================================================================
|
|
75
73
|
// Re-exports from uniform-utils
|
package/src/gpu/kernels/utils.js
CHANGED
|
@@ -81,14 +81,12 @@ export {
|
|
|
81
81
|
} from './feature-check.js';
|
|
82
82
|
|
|
83
83
|
// ============================================================================
|
|
84
|
-
// Re-exports from kernel
|
|
84
|
+
// Re-exports from kernel prewarming
|
|
85
85
|
// ============================================================================
|
|
86
86
|
|
|
87
87
|
export {
|
|
88
|
-
getTunedWorkgroupSize,
|
|
89
|
-
autoTuneKernels,
|
|
90
88
|
prewarmKernels,
|
|
91
|
-
} from './kernel-
|
|
89
|
+
} from './kernel-prewarm.js';
|
|
92
90
|
|
|
93
91
|
// ============================================================================
|
|
94
92
|
// Re-exports from uniform-utils
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
export { DOPPLER_VERSION } from './version.js';
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
doppler,
|
|
4
|
+
doppler as dr,
|
|
5
|
+
generate,
|
|
6
|
+
load,
|
|
7
|
+
open,
|
|
8
|
+
} from './client/doppler-api.js';
|
|
9
|
+
export type {
|
|
10
|
+
DopplerGenerationResult,
|
|
11
|
+
DopplerPromptInput,
|
|
12
|
+
DopplerScopedGenerateOptions,
|
|
13
|
+
DopplerScopedModelSession,
|
|
14
|
+
} from './client/doppler-api.js';
|
|
3
15
|
export { createDopplerProvider } from './client/provider.js';
|
package/src/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export { DOPPLER_VERSION } from './version.js';
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
doppler,
|
|
4
|
+
doppler as dr,
|
|
5
|
+
generate,
|
|
6
|
+
load,
|
|
7
|
+
open,
|
|
8
|
+
} from './client/doppler-api.js';
|
|
3
9
|
export { createDopplerProvider } from './client/provider.js';
|
|
@@ -156,6 +156,7 @@ async function initializeInferenceFromStorage(modelId, options = {}) {
|
|
|
156
156
|
: `Using default shard-store context for "${modelId}"`
|
|
157
157
|
);
|
|
158
158
|
const pipeline = await createPipeline(manifest, {
|
|
159
|
+
commandContext: options.commandContext ?? null,
|
|
159
160
|
gpu: { device },
|
|
160
161
|
runtime: options.runtime,
|
|
161
162
|
...(storage ? { storage } : {}),
|
|
@@ -209,6 +210,7 @@ async function initializeInferenceFromSourcePath(sourcePath, options = {}) {
|
|
|
209
210
|
|
|
210
211
|
onProgress?.('pipeline', 0.3, 'Creating pipeline...');
|
|
211
212
|
const pipeline = await createPipeline(sourceBundle.manifest, {
|
|
213
|
+
commandContext: options.commandContext ?? null,
|
|
212
214
|
gpu: { device },
|
|
213
215
|
runtime: effectiveRuntime,
|
|
214
216
|
storage: sourceBundle.storageContext,
|
|
@@ -345,6 +347,8 @@ export async function initializeSuiteModel(options = {}) {
|
|
|
345
347
|
onProgress: options.onProgress,
|
|
346
348
|
log: options.log,
|
|
347
349
|
loadMode,
|
|
350
|
+
modelId: options.modelId ?? null,
|
|
351
|
+
commandContext: options.commandContext ?? null,
|
|
348
352
|
});
|
|
349
353
|
}
|
|
350
354
|
const modelLoadMs = Math.max(0, performance.now() - loadStart);
|