claude-flow 3.61.1 → 3.63.0
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 +1 -1
- package/package.json +1 -1
- package/v3/@claude-flow/cli/README.md +1 -1
- package/v3/@claude-flow/cli/catalog-manifest.json +3 -3
- package/v3/@claude-flow/cli/dist/src/mcp-tools/managed-agent-tools.d.ts +1 -20
- package/v3/@claude-flow/cli/dist/src/mcp-tools/managed-agent-tools.js +344 -108
- package/v3/@claude-flow/cli/dist/src/mcp-tools/managed-learning-tool.d.ts +4 -0
- package/v3/@claude-flow/cli/dist/src/mcp-tools/managed-learning-tool.js +46 -0
- package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js +6 -3
- package/v3/@claude-flow/cli/dist/src/mcp-tools/rure-tools.js +59 -0
- package/v3/@claude-flow/cli/dist/src/missions/schemas.d.ts +12 -12
- package/v3/@claude-flow/cli/dist/src/rure/cuda-cubin.d.ts +7 -0
- package/v3/@claude-flow/cli/dist/src/rure/cuda-cubin.js +17 -2
- package/v3/@claude-flow/cli/dist/src/rure/cuda-occupancy.d.ts +59 -0
- package/v3/@claude-flow/cli/dist/src/rure/cuda-occupancy.js +69 -0
- package/v3/@claude-flow/cli/dist/src/rure/cuda-plan.d.ts +84 -0
- package/v3/@claude-flow/cli/dist/src/rure/cuda-plan.js +197 -0
- package/v3/@claude-flow/cli/dist/src/services/headless-worker-executor.js +56 -19
- package/v3/@claude-flow/cli/dist/src/services/managed-learning-loop.d.ts +79 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-learning-loop.js +76 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-learning-store.d.ts +187 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-learning-store.js +238 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-learning.d.ts +108 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-learning.js +197 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-memory-client.d.ts +72 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-memory-client.js +236 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-memory-worker.d.ts +56 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-memory-worker.js +161 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-run-collector.d.ts +93 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-run-collector.js +181 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-run-store.d.ts +52 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-run-store.js +119 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-workflows.d.ts +101 -0
- package/v3/@claude-flow/cli/dist/src/services/managed-workflows.js +183 -0
- package/v3/@claude-flow/cli/dist/src/services/worker-daemon.d.ts +1 -0
- package/v3/@claude-flow/cli/dist/src/services/worker-daemon.js +11 -2
- package/v3/@claude-flow/cli/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Learning MCP boundary, kept separate from provider transport and native workers. */
|
|
2
|
+
import { getProjectCwd } from './types.js';
|
|
3
|
+
export const managedLearningTool = {
|
|
4
|
+
inputSchema: { type: 'object', properties: {
|
|
5
|
+
action: { type: 'string', enum: ['status', 'record', 'recommend', 'evaluate', 'index', 'recall', 'cycle'] },
|
|
6
|
+
evidence: { type: 'object', description: 'Closed version1 observation and optional host signature; caller trust labels rejected' },
|
|
7
|
+
scope: { type: 'object', description: 'Exact taskType, policyHash and evaluatorHash cohort' },
|
|
8
|
+
manifest: { type: 'object', description: 'Frozen unique heldout taskHashes and at least three trials' },
|
|
9
|
+
cycle: { type: 'object', description: 'Closed scope/evidence batch, optional index, maxP95Ms and evaluation; no commands, keys or promotion flags' },
|
|
10
|
+
baselineId: { type: 'string' }, candidateId: { type: 'string' }, id: { type: 'string' }, maxP95Ms: { type: 'number' },
|
|
11
|
+
}, required: ['action'] },
|
|
12
|
+
handler: async (input) => {
|
|
13
|
+
if (input.action !== 'status' && process.env.RUFLO_MANAGED_LEARNING !== '1')
|
|
14
|
+
return { success: false, error: 'Managed learning writes require host RUFLO_MANAGED_LEARNING=1' };
|
|
15
|
+
const root = getProjectCwd(), key = process.env.RUFLO_MANAGED_VERIFIER_PUBLIC_KEY;
|
|
16
|
+
const authorize = () => process.env.RUFLO_MANAGED_LEARNING === '1' && process.env.RUFLO_MANAGED_VERIFIER_PUBLIC_KEY === key && getProjectCwd() === root;
|
|
17
|
+
try {
|
|
18
|
+
const learning = await import('../services/managed-learning-store.js');
|
|
19
|
+
if (input.action !== 'status' && !authorize())
|
|
20
|
+
throw new Error('Host learning policy changed');
|
|
21
|
+
if (input.action === 'cycle') {
|
|
22
|
+
if (Object.keys(input).some(k => !['action', 'cycle'].includes(k)))
|
|
23
|
+
throw new Error('Invalid cycle envelope');
|
|
24
|
+
const { cycleLearning } = await import('../services/managed-learning-loop.js');
|
|
25
|
+
return { success: true, ...await cycleLearning(root, input.cycle, key, authorize) };
|
|
26
|
+
}
|
|
27
|
+
if (input.action === 'status')
|
|
28
|
+
return { success: true, ...learning.learningStatus(root, key) };
|
|
29
|
+
if (input.action === 'record')
|
|
30
|
+
return { success: true, ...learning.recordLearning(root, input.evidence, key) };
|
|
31
|
+
if (input.action === 'recommend')
|
|
32
|
+
return { success: true, ...learning.recommendLearning(root, input.scope, key, input.maxP95Ms) };
|
|
33
|
+
if (input.action === 'evaluate')
|
|
34
|
+
return { success: true, ...learning.evaluateLearning(root, { scope: input.scope, manifest: input.manifest, baselineId: String(input.baselineId ?? ''), candidateId: String(input.candidateId ?? '') }, key) };
|
|
35
|
+
if (input.action === 'recall')
|
|
36
|
+
return { success: true, ...await learning.recallLearning(root, input.scope, key, authorize) };
|
|
37
|
+
if (input.action === 'index')
|
|
38
|
+
return { success: true, ...await learning.indexLearning(root, String(input.id ?? ''), key, authorize) };
|
|
39
|
+
return { success: false, error: 'Unknown managed learning action' };
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return { success: false, error: 'Managed learning failed: validate metadata, verifier and store; state may persist, inspect status before retrying; no default changed' };
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=managed-learning-tool.js.map
|
|
@@ -1466,13 +1466,16 @@ export const memoryTools = [
|
|
|
1466
1466
|
}
|
|
1467
1467
|
catch { /* namespace may not exist */ }
|
|
1468
1468
|
}
|
|
1469
|
-
// Sort by score, deduplicate by key, take top N
|
|
1469
|
+
// Sort by score, deduplicate by (namespace, key), take top N. An entry is
|
|
1470
|
+
// identified by both (see #2271), so the same key in another namespace is
|
|
1471
|
+
// a different entry and must not be dropped as a duplicate.
|
|
1470
1472
|
allResults.sort((a, b) => b.score - a.score);
|
|
1471
1473
|
const seen = new Set();
|
|
1472
1474
|
const deduplicated = allResults.filter(r => {
|
|
1473
|
-
|
|
1475
|
+
const id = JSON.stringify([r.namespace, r.key]);
|
|
1476
|
+
if (seen.has(id))
|
|
1474
1477
|
return false;
|
|
1475
|
-
seen.add(
|
|
1478
|
+
seen.add(id);
|
|
1476
1479
|
return true;
|
|
1477
1480
|
}).slice(0, limit);
|
|
1478
1481
|
return {
|
|
@@ -16,6 +16,7 @@ import { parseBinary, extractStrings, MAX_BINARY_BYTES } from '../rure/binary-pa
|
|
|
16
16
|
import { parseDotNet } from '../rure/dotnet-parse.js';
|
|
17
17
|
import { analyzeEvm, parseHex, MAX_EVM_BYTES } from '../rure/evm-parse.js';
|
|
18
18
|
import { analyzeCuda } from '../rure/cuda-parse.js';
|
|
19
|
+
import { planCuda, MAX_BLOCK_SIZES, MAX_DYNAMIC_SHARED_BYTES } from '../rure/cuda-plan.js';
|
|
19
20
|
function fail(error) {
|
|
20
21
|
return { content: [{ type: 'text', text: JSON.stringify({ success: false, error }) }], isError: true };
|
|
21
22
|
}
|
|
@@ -408,5 +409,63 @@ export const rureTools = [
|
|
|
408
409
|
}
|
|
409
410
|
},
|
|
410
411
|
},
|
|
412
|
+
{
|
|
413
|
+
name: 'rure_cuda_launch_plan',
|
|
414
|
+
description: 'Turn the static CUDA inventory of a program into a plan for measuring it (ADR-501): for each kernel of each architecture, its theoretical occupancy at a set of block sizes (blocks and warps resident per multiprocessor, and which resource sets the limit: registers, shared memory, warps or block slots), the block sizes that reach the most, and flags (local memory, register- or shared-memory-limited). The occupancy model reproduces NVIDIA\'s cuda_occupancy.h on every architecture it tabulates (sm_70, 75, 80, 86, 87, 89, 90, 120); any other architecture gets no figure. With includeHarness it also returns the text of a small CUDA driver-API program you can build to check the numbers on your own GPU and, with arguments you supply, to time launches. Nothing is compiled, loaded or run by this tool, and no text from the analyzed file reaches the harness. Occupancy bounds performance and does not predict it. Names from the file are untrusted and screened by AIDefence. Use when you have a CUDA binary, cubin or fatbin and need to decide which kernels and block sizes are worth benchmarking before running anything: rure_analyze_cuda alone lists registers and memory but not what they allow on a given GPU.',
|
|
415
|
+
category: 'rure',
|
|
416
|
+
tags: ['reverse-engineering', 'cuda', 'gpu', 'occupancy', 'benchmark-plan', 'static-analysis'],
|
|
417
|
+
inputSchema: {
|
|
418
|
+
type: 'object',
|
|
419
|
+
properties: {
|
|
420
|
+
path: { type: 'string', description: 'Absolute path to a CUDA host binary (ELF/PE), a .fatbin or a .cubin file' },
|
|
421
|
+
arch: { type: 'string', description: 'Plan only this architecture, for example sm_86 (default: every architecture with compiled code in the file)' },
|
|
422
|
+
blockSizes: { type: 'array', items: { type: 'integer', minimum: 1, maximum: 1024 }, maxItems: MAX_BLOCK_SIZES, description: 'Block sizes to evaluate (default 32, 64, 96, 128, 192, 256, 384, 512, 768, 1024)' },
|
|
423
|
+
dynamicSharedBytes: { type: 'integer', minimum: 0, maximum: MAX_DYNAMIC_SHARED_BYTES, description: 'Dynamic shared memory per block the launch will use; it is not in the file (default 0)' },
|
|
424
|
+
includeHarness: { type: 'boolean', description: 'Also return the text of the occupancy-check / benchmark program (default false)' },
|
|
425
|
+
},
|
|
426
|
+
required: ['path'],
|
|
427
|
+
},
|
|
428
|
+
handler: async (input) => {
|
|
429
|
+
const v = validatePath(input.path, 'path');
|
|
430
|
+
if (!v.valid)
|
|
431
|
+
return fail(v.error);
|
|
432
|
+
if (input.arch !== undefined && (typeof input.arch !== 'string' || !/^sm_\d{2,3}$/.test(input.arch)))
|
|
433
|
+
return fail('arch must look like sm_86');
|
|
434
|
+
if (input.blockSizes !== undefined && !Array.isArray(input.blockSizes))
|
|
435
|
+
return fail('blockSizes must be an array of integers');
|
|
436
|
+
if (input.dynamicSharedBytes !== undefined && typeof input.dynamicSharedBytes !== 'number')
|
|
437
|
+
return fail('dynamicSharedBytes must be an integer');
|
|
438
|
+
try {
|
|
439
|
+
const r = readCapped(v.sanitized, MAX_BINARY_BYTES);
|
|
440
|
+
if (!r.ok)
|
|
441
|
+
return fail(r.error);
|
|
442
|
+
const info = analyzeCuda(r.bytes, { includePtx: false });
|
|
443
|
+
const sc = new Screener();
|
|
444
|
+
const names = await sc.screen(info.kernels.map((k) => k.name));
|
|
445
|
+
const idents = await sc.screen(info.kernels.map((k) => k.identifier ?? ''));
|
|
446
|
+
const screened = { ...info, kernels: info.kernels.map((k, i) => ({ ...k, name: names[i], identifier: k.identifier === null ? null : idents[i] })) };
|
|
447
|
+
const plan = planCuda(screened, {
|
|
448
|
+
...(input.arch !== undefined && { arch: input.arch }),
|
|
449
|
+
...(input.blockSizes !== undefined && { blockSizes: input.blockSizes }),
|
|
450
|
+
...(input.dynamicSharedBytes !== undefined && { dynamicSharedBytes: input.dynamicSharedBytes }),
|
|
451
|
+
includeHarness: input.includeHarness === true,
|
|
452
|
+
});
|
|
453
|
+
const kernels = plan.archs.reduce((n, a) => n + a.kernels.length, 0);
|
|
454
|
+
return ok({
|
|
455
|
+
source: info.source,
|
|
456
|
+
...plan,
|
|
457
|
+
summary: { archs: plan.archs.length, kernels },
|
|
458
|
+
warnings: info.warnings,
|
|
459
|
+
redactedCount: sc.redacted,
|
|
460
|
+
screened: sc.screened,
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
catch (err) {
|
|
464
|
+
if (err instanceof RangeError)
|
|
465
|
+
return fail(err.message);
|
|
466
|
+
return fail(`cuda launch plan failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
},
|
|
411
470
|
];
|
|
412
471
|
//# sourceMappingURL=rure-tools.js.map
|
|
@@ -77,6 +77,10 @@ export declare const missionRecordSchema: z.ZodObject<{
|
|
|
77
77
|
updatedAt: string;
|
|
78
78
|
schemaVersion: 1;
|
|
79
79
|
state: "completed" | "cancelled" | "failed" | "blocked" | "running" | "paused" | "queued" | "draft" | "planned" | "awaitingAuthorization" | "pauseRequested" | "verifying" | "cancelRequested";
|
|
80
|
+
acceptance: {
|
|
81
|
+
revision: number;
|
|
82
|
+
criteriaDigest: string;
|
|
83
|
+
};
|
|
80
84
|
plan: {
|
|
81
85
|
revision: number;
|
|
82
86
|
digest: string;
|
|
@@ -92,10 +96,6 @@ export declare const missionRecordSchema: z.ZodObject<{
|
|
|
92
96
|
budgetRef: string;
|
|
93
97
|
executionMode: "durable-executor" | "session-bound";
|
|
94
98
|
evidenceRefs: string[];
|
|
95
|
-
acceptance: {
|
|
96
|
-
revision: number;
|
|
97
|
-
criteriaDigest: string;
|
|
98
|
-
};
|
|
99
99
|
lastEventSequence: number;
|
|
100
100
|
authorizationRef?: string | undefined;
|
|
101
101
|
}, {
|
|
@@ -103,6 +103,10 @@ export declare const missionRecordSchema: z.ZodObject<{
|
|
|
103
103
|
updatedAt: string;
|
|
104
104
|
schemaVersion: 1;
|
|
105
105
|
state: "completed" | "cancelled" | "failed" | "blocked" | "running" | "paused" | "queued" | "draft" | "planned" | "awaitingAuthorization" | "pauseRequested" | "verifying" | "cancelRequested";
|
|
106
|
+
acceptance: {
|
|
107
|
+
revision: number;
|
|
108
|
+
criteriaDigest: string;
|
|
109
|
+
};
|
|
106
110
|
plan: {
|
|
107
111
|
revision: number;
|
|
108
112
|
digest: string;
|
|
@@ -118,10 +122,6 @@ export declare const missionRecordSchema: z.ZodObject<{
|
|
|
118
122
|
budgetRef: string;
|
|
119
123
|
executionMode: "durable-executor" | "session-bound";
|
|
120
124
|
evidenceRefs: string[];
|
|
121
|
-
acceptance: {
|
|
122
|
-
revision: number;
|
|
123
|
-
criteriaDigest: string;
|
|
124
|
-
};
|
|
125
125
|
lastEventSequence: number;
|
|
126
126
|
authorizationRef?: string | undefined;
|
|
127
127
|
}>;
|
|
@@ -397,11 +397,11 @@ export declare const createInputSchema: z.ZodObject<{
|
|
|
397
397
|
requestId: z.ZodString;
|
|
398
398
|
objective: z.ZodString;
|
|
399
399
|
}, "strict", z.ZodTypeAny, {
|
|
400
|
-
objective: string;
|
|
401
400
|
requestId: string;
|
|
402
|
-
}, {
|
|
403
401
|
objective: string;
|
|
402
|
+
}, {
|
|
404
403
|
requestId: string;
|
|
404
|
+
objective: string;
|
|
405
405
|
}>;
|
|
406
406
|
export declare const planInputSchema: z.ZodObject<{
|
|
407
407
|
requestId: z.ZodString;
|
|
@@ -580,6 +580,7 @@ export declare const planInputSchema: z.ZodObject<{
|
|
|
580
580
|
} | undefined;
|
|
581
581
|
}>;
|
|
582
582
|
}, "strict", z.ZodTypeAny, {
|
|
583
|
+
requestId: string;
|
|
583
584
|
plan: {
|
|
584
585
|
tasks: {
|
|
585
586
|
id: string;
|
|
@@ -616,10 +617,10 @@ export declare const planInputSchema: z.ZodObject<{
|
|
|
616
617
|
baseline?: string | undefined;
|
|
617
618
|
}[];
|
|
618
619
|
};
|
|
619
|
-
requestId: string;
|
|
620
620
|
missionId: string;
|
|
621
621
|
expectedRevision: number;
|
|
622
622
|
}, {
|
|
623
|
+
requestId: string;
|
|
623
624
|
plan: {
|
|
624
625
|
tasks: {
|
|
625
626
|
id: string;
|
|
@@ -656,7 +657,6 @@ export declare const planInputSchema: z.ZodObject<{
|
|
|
656
657
|
capabilities?: string[] | undefined;
|
|
657
658
|
} | undefined;
|
|
658
659
|
};
|
|
659
|
-
requestId: string;
|
|
660
660
|
missionId: string;
|
|
661
661
|
expectedRevision: number;
|
|
662
662
|
}>;
|
|
@@ -29,6 +29,13 @@ export interface CubinInfo {
|
|
|
29
29
|
warnings: string[];
|
|
30
30
|
truncated: boolean;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The SM number in `e_flags`. Where it sits depends on the ABI the toolchain wrote: a cubin from CUDA 12 (ELF OS ABI 51) for sm_70 to sm_90 keeps it in the
|
|
34
|
+
* low byte (sm_70 is 0x460546: 0x46 twice, around the texture and address bits), while CUDA 13, and CUDA 12.8 for sm_120, use OS ABI 65 and the second byte
|
|
35
|
+
* (sm_80 is 0x06005004). Reading the second byte of an ABI 51 cubin gave "sm_5" for every one of them. An OS ABI we have not seen falls back to whichever
|
|
36
|
+
* byte is a plausible SM number.
|
|
37
|
+
*/
|
|
38
|
+
export declare function smOfFlags(flags: number, osAbi: number): number | null;
|
|
32
39
|
export declare const isCubin: (b: Buffer) => boolean;
|
|
33
40
|
/** `_Z5saxpyifPKfPf` -> `saxpy`; anything with a namespace, template or other prefix -> null. */
|
|
34
41
|
export declare function simpleIdentifier(name: string): string | null;
|
|
@@ -11,6 +11,22 @@ const NAME_MAX = 200;
|
|
|
11
11
|
const STO_CUDA_ENTRY = 0x10;
|
|
12
12
|
const EIATTR_REGCOUNT = 0x2f;
|
|
13
13
|
const MAX_INFO_RECORDS = 4096;
|
|
14
|
+
/**
|
|
15
|
+
* The SM number in `e_flags`. Where it sits depends on the ABI the toolchain wrote: a cubin from CUDA 12 (ELF OS ABI 51) for sm_70 to sm_90 keeps it in the
|
|
16
|
+
* low byte (sm_70 is 0x460546: 0x46 twice, around the texture and address bits), while CUDA 13, and CUDA 12.8 for sm_120, use OS ABI 65 and the second byte
|
|
17
|
+
* (sm_80 is 0x06005004). Reading the second byte of an ABI 51 cubin gave "sm_5" for every one of them. An OS ABI we have not seen falls back to whichever
|
|
18
|
+
* byte is a plausible SM number.
|
|
19
|
+
*/
|
|
20
|
+
export function smOfFlags(flags, osAbi) {
|
|
21
|
+
const low = flags & 0xff;
|
|
22
|
+
const second = (flags >>> 8) & 0xff;
|
|
23
|
+
const plausible = (n) => n >= 20 && n <= 199;
|
|
24
|
+
if (osAbi === 65)
|
|
25
|
+
return second;
|
|
26
|
+
if (osAbi === 51)
|
|
27
|
+
return low;
|
|
28
|
+
return plausible(second) ? second : plausible(low) ? low : null;
|
|
29
|
+
}
|
|
14
30
|
export const isCubin = (b) => b.length >= 0x40 && b[0] === 0x7f && b.toString('latin1', 1, 4) === 'ELF' && b[4] === 2 && b[5] === 1 && b.readUInt16LE(0x12) === EM_CUDA;
|
|
15
31
|
const cstr = (b, at, end) => {
|
|
16
32
|
if (at < 0 || at >= end)
|
|
@@ -59,8 +75,7 @@ export function parseCubin(b) {
|
|
|
59
75
|
return info;
|
|
60
76
|
}
|
|
61
77
|
try {
|
|
62
|
-
|
|
63
|
-
info.archFlag = (flags >>> 8) & 0xff;
|
|
78
|
+
info.archFlag = smOfFlags(b.readUInt32LE(0x30), b[7]);
|
|
64
79
|
const shoff = Number(b.readBigUInt64LE(0x28));
|
|
65
80
|
const entsize = b.readUInt16LE(0x3a);
|
|
66
81
|
let count = b.readUInt16LE(0x3c);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ruRE CUDA launch plan, part 1 (ADR-501): theoretical occupancy from what the static reader found. Given an architecture's limits and a
|
|
3
|
+
* kernel's registers, static shared memory and a block size, how many blocks fit on one multiprocessor and which resource stops the next one.
|
|
4
|
+
* Pure arithmetic over a table: no device, no driver, nothing is run. The model is the one CUDA's occupancy calculator uses (warp, block,
|
|
5
|
+
* register and shared-memory limits, each with its allocation granularity); it was written here from that model and is checked, over the whole
|
|
6
|
+
* grid of resource combinations, against NVIDIA's own `cuda_occupancy.h` (rure-cuda-occupancy-oracle.test.ts) and on real devices.
|
|
7
|
+
* Theoretical occupancy bounds how many warps can be resident. It is not a performance number.
|
|
8
|
+
*/
|
|
9
|
+
export type Limiter = 'warps' | 'registers' | 'sharedMemory' | 'blocks' | 'barriers';
|
|
10
|
+
/** Where a table row's numbers come from: read off a device by the CUDA runtime, or taken from NVIDIA's documentation. */
|
|
11
|
+
export type Provenance = 'device-checked' | 'documentation';
|
|
12
|
+
export interface ArchLimits {
|
|
13
|
+
/** `sm_NN`, as the fatbin names it. */
|
|
14
|
+
arch: string;
|
|
15
|
+
major: number;
|
|
16
|
+
minor: number;
|
|
17
|
+
maxThreadsPerSM: number;
|
|
18
|
+
maxBlocksPerSM: number;
|
|
19
|
+
maxThreadsPerBlock: number;
|
|
20
|
+
regsPerSM: number;
|
|
21
|
+
regsPerBlock: number;
|
|
22
|
+
maxRegsPerThread: number;
|
|
23
|
+
sharedPerSM: number;
|
|
24
|
+
sharedPerBlock: number;
|
|
25
|
+
sharedPerBlockOptin: number;
|
|
26
|
+
/** Shared memory the driver reserves in every block (counted against the block's allocation). */
|
|
27
|
+
sharedReservedPerBlock: number;
|
|
28
|
+
/**
|
|
29
|
+
* Whether a kernel's `.nv.shared.<kernel>` section already includes that reservation. From sm_90 it does (the compiler adds it, the driver reports
|
|
30
|
+
* the size without it, and the occupancy calculation adds it back), so the figure to use is the section size less the reservation.
|
|
31
|
+
*/
|
|
32
|
+
cubinSharedIncludesReserve: boolean;
|
|
33
|
+
/** The shared-memory sizes an SM can be configured to, ascending; the SM's allocation rounds up to one of them. */
|
|
34
|
+
carveouts: readonly number[];
|
|
35
|
+
provenance: Provenance;
|
|
36
|
+
}
|
|
37
|
+
/** Architectures with a table. Anything else gets no occupancy figure rather than a guess. */
|
|
38
|
+
export declare const ARCH_LIMITS: Readonly<Record<string, ArchLimits>>;
|
|
39
|
+
export declare const limitsFor: (arch: string | null) => ArchLimits | null;
|
|
40
|
+
export interface Kernel {
|
|
41
|
+
registers: number;
|
|
42
|
+
staticSharedBytes: number;
|
|
43
|
+
dynamicSharedBytes: number;
|
|
44
|
+
blockSize: number;
|
|
45
|
+
}
|
|
46
|
+
export interface Occupancy {
|
|
47
|
+
/** Blocks resident on one multiprocessor; 0 means the block cannot be launched at all. */
|
|
48
|
+
blocks: number;
|
|
49
|
+
/** Every resource that sets that number (ties are all listed). */
|
|
50
|
+
limiters: Limiter[];
|
|
51
|
+
/** What each resource alone would allow. */
|
|
52
|
+
limits: Record<Limiter, number>;
|
|
53
|
+
warpsPerBlock: number;
|
|
54
|
+
activeWarps: number;
|
|
55
|
+
/** activeWarps over the multiprocessor's warp capacity, 0 to 1. */
|
|
56
|
+
occupancy: number;
|
|
57
|
+
}
|
|
58
|
+
export declare function occupancy(l: ArchLimits, k: Kernel): Occupancy;
|
|
59
|
+
//# sourceMappingURL=cuda-occupancy.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ruRE CUDA launch plan, part 1 (ADR-501): theoretical occupancy from what the static reader found. Given an architecture's limits and a
|
|
3
|
+
* kernel's registers, static shared memory and a block size, how many blocks fit on one multiprocessor and which resource stops the next one.
|
|
4
|
+
* Pure arithmetic over a table: no device, no driver, nothing is run. The model is the one CUDA's occupancy calculator uses (warp, block,
|
|
5
|
+
* register and shared-memory limits, each with its allocation granularity); it was written here from that model and is checked, over the whole
|
|
6
|
+
* grid of resource combinations, against NVIDIA's own `cuda_occupancy.h` (rure-cuda-occupancy-oracle.test.ts) and on real devices.
|
|
7
|
+
* Theoretical occupancy bounds how many warps can be resident. It is not a performance number.
|
|
8
|
+
*/
|
|
9
|
+
const K = 1024;
|
|
10
|
+
const WARP = 32;
|
|
11
|
+
const REG_UNIT = 256;
|
|
12
|
+
const SUB_PARTITIONS = 4;
|
|
13
|
+
const base = { maxThreadsPerBlock: 1024, regsPerSM: 65536, regsPerBlock: 65536, maxRegsPerThread: 256, sharedPerBlock: 48 * K };
|
|
14
|
+
const row = (arch, major, minor, o) => ({ arch, major, minor, ...base, ...o });
|
|
15
|
+
/** Architectures with a table. Anything else gets no occupancy figure rather than a guess. */
|
|
16
|
+
export const ARCH_LIMITS = Object.freeze({
|
|
17
|
+
sm_70: row('sm_70', 7, 0, { maxThreadsPerSM: 2048, maxBlocksPerSM: 32, sharedPerSM: 96 * K, sharedPerBlockOptin: 96 * K, sharedReservedPerBlock: 0, cubinSharedIncludesReserve: false, carveouts: [0, 8 * K, 16 * K, 32 * K, 64 * K, 96 * K], provenance: 'documentation' }),
|
|
18
|
+
sm_75: row('sm_75', 7, 5, { maxThreadsPerSM: 1024, maxBlocksPerSM: 16, sharedPerSM: 64 * K, sharedPerBlockOptin: 64 * K, sharedReservedPerBlock: 0, cubinSharedIncludesReserve: false, carveouts: [32 * K, 64 * K], provenance: 'documentation' }),
|
|
19
|
+
sm_80: row('sm_80', 8, 0, { maxThreadsPerSM: 2048, maxBlocksPerSM: 32, sharedPerSM: 164 * K, sharedPerBlockOptin: 163 * K, sharedReservedPerBlock: K, cubinSharedIncludesReserve: false, carveouts: [0, 8 * K, 16 * K, 32 * K, 64 * K, 100 * K, 132 * K, 164 * K], provenance: 'device-checked' }),
|
|
20
|
+
sm_86: row('sm_86', 8, 6, { maxThreadsPerSM: 1536, maxBlocksPerSM: 16, sharedPerSM: 100 * K, sharedPerBlockOptin: 99 * K, sharedReservedPerBlock: K, cubinSharedIncludesReserve: false, carveouts: [0, 8 * K, 16 * K, 32 * K, 64 * K, 100 * K], provenance: 'device-checked' }),
|
|
21
|
+
sm_87: row('sm_87', 8, 7, { maxThreadsPerSM: 1536, maxBlocksPerSM: 16, sharedPerSM: 164 * K, sharedPerBlockOptin: 163 * K, sharedReservedPerBlock: K, cubinSharedIncludesReserve: false, carveouts: [0, 8 * K, 16 * K, 32 * K, 64 * K, 100 * K, 132 * K, 164 * K], provenance: 'documentation' }),
|
|
22
|
+
sm_89: row('sm_89', 8, 9, { maxThreadsPerSM: 1536, maxBlocksPerSM: 24, sharedPerSM: 100 * K, sharedPerBlockOptin: 99 * K, sharedReservedPerBlock: K, cubinSharedIncludesReserve: false, carveouts: [0, 8 * K, 16 * K, 32 * K, 64 * K, 100 * K], provenance: 'device-checked' }),
|
|
23
|
+
sm_90: row('sm_90', 9, 0, { maxThreadsPerSM: 2048, maxBlocksPerSM: 32, sharedPerSM: 228 * K, sharedPerBlockOptin: 227 * K, sharedReservedPerBlock: K, cubinSharedIncludesReserve: true, carveouts: [0, 8 * K, 16 * K, 32 * K, 64 * K, 100 * K, 132 * K, 164 * K, 196 * K, 228 * K], provenance: 'device-checked' }),
|
|
24
|
+
sm_120: row('sm_120', 12, 0, { maxThreadsPerSM: 1536, maxBlocksPerSM: 24, sharedPerSM: 100 * K, sharedPerBlockOptin: 99 * K, sharedReservedPerBlock: K, cubinSharedIncludesReserve: true, carveouts: [0, 8 * K, 16 * K, 32 * K, 64 * K, 100 * K], provenance: 'device-checked' }),
|
|
25
|
+
});
|
|
26
|
+
export const limitsFor = (arch) => (arch !== null && Object.hasOwn(ARCH_LIMITS, arch) ? ARCH_LIMITS[arch] : null);
|
|
27
|
+
const up = (n, unit) => Math.ceil(n / unit) * unit;
|
|
28
|
+
const FOREVER = Number.MAX_SAFE_INTEGER;
|
|
29
|
+
const whole = (v, name, min) => {
|
|
30
|
+
if (!Number.isInteger(v) || v < min || v > 2 ** 31)
|
|
31
|
+
throw new RangeError(`${name} must be an integer from ${min}`);
|
|
32
|
+
};
|
|
33
|
+
/** The block's shared-memory allocation, rounded up to the smallest configuration the multiprocessor offers; null when none is large enough. */
|
|
34
|
+
const carveoutFor = (l, bytes) => l.carveouts.find((size) => bytes <= size && (bytes > 0 || size === 0 || l.major === 7)) ?? null;
|
|
35
|
+
export function occupancy(l, k) {
|
|
36
|
+
whole(k.registers, 'registers', 0);
|
|
37
|
+
whole(k.staticSharedBytes, 'staticSharedBytes', 0);
|
|
38
|
+
whole(k.dynamicSharedBytes, 'dynamicSharedBytes', 0);
|
|
39
|
+
whole(k.blockSize, 'blockSize', 1);
|
|
40
|
+
const warps = Math.ceil(k.blockSize / WARP);
|
|
41
|
+
const warpCapacity = l.maxThreadsPerSM / WARP;
|
|
42
|
+
const byWarps = k.blockSize > l.maxThreadsPerBlock ? 0 : Math.floor(warpCapacity / warps);
|
|
43
|
+
const byBlocks = l.maxBlocksPerSM;
|
|
44
|
+
const perWarp = up(k.registers * WARP, REG_UNIT);
|
|
45
|
+
const perBlock = perWarp * warps;
|
|
46
|
+
const assumed = perWarp * up(warps, SUB_PARTITIONS);
|
|
47
|
+
let byRegisters = FOREVER;
|
|
48
|
+
if (l.regsPerBlock < assumed || l.regsPerBlock < perBlock || k.registers > l.maxRegsPerThread)
|
|
49
|
+
byRegisters = 0;
|
|
50
|
+
else if (perWarp > 0)
|
|
51
|
+
byRegisters = Math.floor((Math.floor(l.regsPerSM / SUB_PARTITIONS / perWarp) * SUB_PARTITIONS) / warps);
|
|
52
|
+
const granule = l.major >= 8 ? 128 : 256;
|
|
53
|
+
const allocated = up(k.staticSharedBytes + l.sharedReservedPerBlock + k.dynamicSharedBytes, granule);
|
|
54
|
+
const blockLimit = l.sharedPerBlock + (l.major >= 8 ? l.sharedReservedPerBlock : 0);
|
|
55
|
+
let bySharedMemory = 0;
|
|
56
|
+
if (allocated <= blockLimit) {
|
|
57
|
+
const preferred = carveoutFor(l, l.sharedPerSM);
|
|
58
|
+
const fits = preferred !== null && preferred >= allocated ? preferred : l.major >= 7 ? carveoutFor(l, allocated) : l.sharedPerSM;
|
|
59
|
+
bySharedMemory = fits === null ? 0 : allocated > 0 ? Math.floor(fits / allocated) : FOREVER;
|
|
60
|
+
}
|
|
61
|
+
// From compute capability 9 each resident block holds a hardware barrier; a kernel using one barrier (the default) is held to the slots there are.
|
|
62
|
+
// On sm_90 there are two per block slot, so this never binds; on sm_120 there is one, so it ties with the block limit and NVIDIA reports both.
|
|
63
|
+
const byBarriers = l.major < 9 ? FOREVER : l.major === 9 ? byBlocks * 2 : byBlocks;
|
|
64
|
+
const limits = { warps: byWarps, registers: byRegisters, sharedMemory: bySharedMemory, blocks: byBlocks, barriers: byBarriers };
|
|
65
|
+
const blocks = Math.min(byWarps, byRegisters, bySharedMemory, byBlocks, byBarriers);
|
|
66
|
+
const order = ['warps', 'registers', 'sharedMemory', 'blocks', 'barriers'];
|
|
67
|
+
return { blocks, limiters: order.filter((name) => limits[name] === blocks), limits, warpsPerBlock: warps, activeWarps: blocks * warps, occupancy: (blocks * warps) / warpCapacity };
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=cuda-occupancy.js.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ruRE CUDA launch plan, part 2 (ADR-501): what `analyzeCuda` found, turned into a plan for measuring. For each kernel of each architecture: the
|
|
3
|
+
* theoretical occupancy at a set of block sizes, what limits it, and a few plain flags; and, on request, a small CUDA driver-API program (as text)
|
|
4
|
+
* that a person can build and run to check those numbers on their own GPU. Pure: data in, data and text out. Nothing here compiles, loads or runs
|
|
5
|
+
* GPU code, and the harness text holds nothing taken from the analyzed file (the kernel name and the file are arguments to the program).
|
|
6
|
+
*/
|
|
7
|
+
import type { CudaInfo } from './cuda-parse.js';
|
|
8
|
+
import { type Limiter, type Provenance } from './cuda-occupancy.js';
|
|
9
|
+
export declare const DEFAULT_BLOCK_SIZES: readonly number[];
|
|
10
|
+
export declare const MAX_BLOCK_SIZES = 24;
|
|
11
|
+
export declare const MAX_DYNAMIC_SHARED_BYTES: number;
|
|
12
|
+
export declare const MAX_PLANNED_KERNELS = 200;
|
|
13
|
+
export interface PlanOptions {
|
|
14
|
+
/** Only this architecture (`sm_86`). */
|
|
15
|
+
arch?: string;
|
|
16
|
+
blockSizes?: readonly number[];
|
|
17
|
+
/** Dynamic shared memory per block the launch will ask for; it is not in the file, so it is a parameter. */
|
|
18
|
+
dynamicSharedBytes?: number;
|
|
19
|
+
includeHarness?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type PlanFlag = 'local-memory' | 'register-limited' | 'shared-memory-limited';
|
|
22
|
+
export interface PlannedBlockSize {
|
|
23
|
+
blockSize: number;
|
|
24
|
+
activeBlocksPerSM: number;
|
|
25
|
+
activeWarpsPerSM: number;
|
|
26
|
+
/** 0 to 1, four places. */
|
|
27
|
+
occupancy: number;
|
|
28
|
+
limitedBy: Limiter[];
|
|
29
|
+
}
|
|
30
|
+
export interface PlannedKernel {
|
|
31
|
+
name: string;
|
|
32
|
+
identifier: string | null;
|
|
33
|
+
/** `staticSharedBytes` is the figure the driver and occupancy calculation use; `sharedSectionBytes` is what the file's section says (cuobjdump's SHARED), which differs on sm_90 and later. */
|
|
34
|
+
resources: {
|
|
35
|
+
registers: number | null;
|
|
36
|
+
staticSharedBytes: number;
|
|
37
|
+
sharedSectionBytes: number;
|
|
38
|
+
localBytes: number;
|
|
39
|
+
constantBytes: number | null;
|
|
40
|
+
codeBytes: number | null;
|
|
41
|
+
};
|
|
42
|
+
/** Absent when the file gave no register count: occupancy cannot be worked out without it. */
|
|
43
|
+
blockSizes?: PlannedBlockSize[];
|
|
44
|
+
best?: {
|
|
45
|
+
blockSizes: number[];
|
|
46
|
+
occupancy: number;
|
|
47
|
+
limitedBy: Limiter[];
|
|
48
|
+
};
|
|
49
|
+
flags: PlanFlag[];
|
|
50
|
+
note?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface PlannedArch {
|
|
53
|
+
arch: string;
|
|
54
|
+
/** False when there is no limits table for this architecture; then there are no kernels below. */
|
|
55
|
+
supported: boolean;
|
|
56
|
+
provenance: Provenance | null;
|
|
57
|
+
limits?: {
|
|
58
|
+
maxThreadsPerSM: number;
|
|
59
|
+
maxBlocksPerSM: number;
|
|
60
|
+
regsPerSM: number;
|
|
61
|
+
sharedPerSM: number;
|
|
62
|
+
sharedReservedPerBlock: number;
|
|
63
|
+
};
|
|
64
|
+
kernels: PlannedKernel[];
|
|
65
|
+
note?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface LaunchPlan {
|
|
68
|
+
archs: PlannedArch[];
|
|
69
|
+
blockSizes: number[];
|
|
70
|
+
dynamicSharedBytes: number;
|
|
71
|
+
assumptions: string[];
|
|
72
|
+
harness?: string;
|
|
73
|
+
truncated: boolean;
|
|
74
|
+
}
|
|
75
|
+
export declare const ASSUMPTIONS: readonly string[];
|
|
76
|
+
export declare function planCuda(info: CudaInfo, options?: PlanOptions): LaunchPlan;
|
|
77
|
+
/**
|
|
78
|
+
* A program a person can build and run. It is text, fixed in this file: it contains nothing from the analyzed file. Run as
|
|
79
|
+
* ./occ_check <file.cubin|file.fatbin> <kernel name as listed> [dynamicSharedBytes]
|
|
80
|
+
* it asks the CUDA driver how many blocks fit per multiprocessor at each block size (compare with the plan), and, if built with -DRURE_BENCH and a
|
|
81
|
+
* rure_bench.h of your own that sets up the kernel's arguments, times launches. It loads the file's code onto the GPU; the benchmark mode runs it.
|
|
82
|
+
*/
|
|
83
|
+
export declare const HARNESS_SOURCE = "// occ_check.cpp: written by ruflo's rure_cuda_launch_plan. ruRE did not build or run this; building and running it is your decision.\n// Build: nvcc -O2 -o occ_check occ_check.cpp -lcuda (add -DRURE_BENCH with your own rure_bench.h to time launches)\n// Run: ./occ_check <file.cubin|file.fatbin> <kernel name> [dynamicSharedBytes]\n// Without RURE_BENCH it loads the code onto device 0 and asks the driver for occupancy; it launches nothing.\n// With RURE_BENCH it LAUNCHES THE KERNEL with the arguments your rure_bench.h gives it. Only do that for code you trust, on a GPU you can spare.\n#include <cuda.h>\n#include <algorithm>\n#include <cstdio>\n#include <cstdlib>\n#include <fstream>\n#include <iterator>\n#include <vector>\n#ifdef RURE_BENCH\n// rure_bench.h must define:\n// bool rure_prepare(void*** kernelParams); allocate buffers, fill an array of pointers to the kernel's arguments\n// unsigned rure_grid(int blockSize); how many blocks to launch at this block size\n// void rure_release();\n#include \"rure_bench.h\"\n#endif\n\n#define CK(call) do { CUresult r_ = (call); if (r_ != CUDA_SUCCESS) { const char* m_ = nullptr; cuGetErrorString(r_, &m_); fprintf(stderr, \"line %d: %s\\n\", __LINE__, m_ ? m_ : \"error\"); return 1; } } while (0)\n\nint main(int argc, char** argv) {\n if (argc < 3) { fprintf(stderr, \"usage: %s <file.cubin|file.fatbin> <kernel name> [dynamicSharedBytes]\\n\", argv[0]); return 2; }\n size_t dyn = argc > 3 ? strtoull(argv[3], nullptr, 10) : 0;\n std::ifstream in(argv[1], std::ios::binary);\n std::vector<char> image((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>());\n if (image.empty()) { fprintf(stderr, \"cannot read %s\\n\", argv[1]); return 2; }\n\n CK(cuInit(0));\n CUdevice dev; CK(cuDeviceGet(&dev, 0));\n CUcontext ctx; CK(cuDevicePrimaryCtxRetain(&ctx, dev)); CK(cuCtxSetCurrent(ctx));\n CUmodule mod; CK(cuModuleLoadData(&mod, image.data()));\n CUfunction fn; CK(cuModuleGetFunction(&fn, mod, argv[2]));\n\n int regs, shared, local, maxThreads, maxThreadsSM, major, minor, blocksSM, regsSM, sharedSM, reserved, optin;\n CK(cuFuncGetAttribute(®s, CU_FUNC_ATTRIBUTE_NUM_REGS, fn));\n CK(cuFuncGetAttribute(&shared, CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES, fn));\n CK(cuFuncGetAttribute(&local, CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES, fn));\n CK(cuFuncGetAttribute(&maxThreads, CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK, fn));\n CK(cuDeviceGetAttribute(&maxThreadsSM, CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, dev));\n CK(cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, dev));\n CK(cuDeviceGetAttribute(&minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, dev));\n CK(cuDeviceGetAttribute(&blocksSM, CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, dev));\n CK(cuDeviceGetAttribute(®sSM, CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR, dev));\n CK(cuDeviceGetAttribute(&sharedSM, CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR, dev));\n CK(cuDeviceGetAttribute(&reserved, CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK, dev));\n CK(cuDeviceGetAttribute(&optin, CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN, dev));\n printf(\"device sm_%d%d: maxThreadsPerSM %d, maxBlocksPerSM %d, regsPerSM %d, sharedPerSM %d, sharedReservedPerBlock %d, sharedPerBlockOptin %d\\n\", major, minor, maxThreadsSM, blocksSM, regsSM, sharedSM, reserved, optin);\n printf(\"kernel: registers %d, static shared %d, local %d, max threads per block %d\\n\", regs, shared, local, maxThreads);\n printf(\"blockSize activeBlocksPerSM activeWarpsPerSM occupancy%s\\n\",\n#ifdef RURE_BENCH\n \" medianMs\");\n#else\n \"\");\n#endif\n\n const int sizes[] = {32, 64, 96, 128, 192, 256, 384, 512, 768, 1024};\n for (int b : sizes) {\n int blocks = 0;\n if (cuOccupancyMaxActiveBlocksPerMultiprocessor(&blocks, fn, b, dyn) != CUDA_SUCCESS) blocks = 0;\n int warps = blocks * ((b + 31) / 32);\n printf(\"%d %d %d %.4f\", b, blocks, warps, (double)warps / (maxThreadsSM / 32));\n#ifdef RURE_BENCH\n double ms = -1;\n if (blocks > 0) {\n void** params = nullptr;\n if (!rure_prepare(¶ms)) { fprintf(stderr, \"rure_prepare failed\\n\"); return 1; }\n CUevent t0, t1; CK(cuEventCreate(&t0, CU_EVENT_DEFAULT)); CK(cuEventCreate(&t1, CU_EVENT_DEFAULT));\n std::vector<float> times;\n for (int i = 0; i < 23; i++) {\n CK(cuEventRecord(t0, 0));\n CK(cuLaunchKernel(fn, rure_grid(b), 1, 1, b, 1, 1, (unsigned)dyn, 0, params, 0));\n CK(cuEventRecord(t1, 0)); CK(cuEventSynchronize(t1));\n float t; CK(cuEventElapsedTime(&t, t0, t1));\n if (i >= 3) times.push_back(t);\n }\n std::sort(times.begin(), times.end());\n ms = times[times.size() / 2];\n rure_release();\n }\n printf(\" %.4f\", ms);\n#endif\n printf(\"\\n\");\n }\n return 0;\n}\n";
|
|
84
|
+
//# sourceMappingURL=cuda-plan.d.ts.map
|