CUDALibraryProfile, CUDASymbolCatalog, ProjectStackDeclarator, ProofPipelineRunner, Sprint290IntegrationSummary. 25/25 tests passing. End-to-end proof: "GPU matrix multiply. JSON result serialization." -> cublas for compute.matrix, nlohmann_json for serialization.json. Phase 6: Library Dispatch COMPLETE (Sprints 286-290, steps 1958-1982). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
67 lines
2.9 KiB
C++
67 lines
2.9 KiB
C++
#pragma once
|
|
// Step 1978: CUDALibraryProfile
|
|
// Full CUDA capability ledger: cublas, cufft, thrust, cudnn.
|
|
// Scores, preferredAPIs, and knownWeaknesses for each (library, domain) pair.
|
|
|
|
#include "LibraryCapabilityLedger.h"
|
|
|
|
namespace whetstone {
|
|
|
|
class CUDALibraryProfile {
|
|
public:
|
|
static LibraryCapabilityLedger buildLedger() {
|
|
LibraryCapabilityLedger ledger;
|
|
|
|
// --- cublas ---
|
|
ledger.set({"cublas", "compute.matrix", 0.99f,
|
|
{"cublasSgemm()", "cublasDgemm()", "cublasSgemv()",
|
|
"cublasCreate()", "cublasDestroy()"},
|
|
{"requires-device-memory-management",
|
|
"no-automatic-handle-lifecycle",
|
|
"single-gpu-only-without-multi-gpu-wrappers"},
|
|
false, "2026-03-02", "benchmark+api-analysis"});
|
|
ledger.set({"cublas", "compute.statistics", 0.00f,
|
|
{},
|
|
{"not-applicable-for-statistics"},
|
|
true, "2026-03-02", "api-analysis"});
|
|
|
|
// --- cufft ---
|
|
ledger.set({"cufft", "compute.fft", 0.99f,
|
|
{"cufftPlan1d()", "cufftExecC2C()", "cufftDestroy()",
|
|
"cufftPlanMany()"},
|
|
{"requires-separate-cufft-handle-lifecycle",
|
|
"complex-plan-setup-for-batched-transforms"},
|
|
false, "2026-03-02", "benchmark"});
|
|
|
|
// --- thrust ---
|
|
ledger.set({"thrust", "compute.parallel", 0.97f,
|
|
{"thrust::transform()", "thrust::reduce()", "thrust::copy()",
|
|
"thrust::fill()", "thrust::for_each()"},
|
|
{"host-device-copy-required-for-mixed-workloads"},
|
|
false, "2026-03-02", "benchmark"});
|
|
ledger.set({"thrust", "compute.sort", 0.97f,
|
|
{"thrust::sort()", "thrust::stable_sort()",
|
|
"thrust::sort_by_key()", "thrust::stable_sort_by_key()"},
|
|
{"comparator-must-be-device-compatible"},
|
|
false, "2026-03-02", "benchmark"});
|
|
|
|
// --- cudnn ---
|
|
ledger.set({"cudnn", "compute.ml.inference", 0.99f,
|
|
{"cudnnConvolutionForward()", "cudnnActivationForward()",
|
|
"cudnnPoolingForward()", "cudnnCreate()", "cudnnDestroy()"},
|
|
{"workspace-memory-must-be-pre-allocated",
|
|
"descriptor-setup-verbose"},
|
|
false, "2026-03-02", "benchmark"});
|
|
ledger.set({"cudnn", "compute.ml.training", 0.97f,
|
|
{"cudnnConvolutionBackwardData()", "cudnnConvolutionBackwardFilter()",
|
|
"cudnnActivationBackward()"},
|
|
{"workspace-memory-must-be-pre-allocated",
|
|
"gradient-accumulation-manual"},
|
|
false, "2026-03-02", "benchmark"});
|
|
|
|
return ledger;
|
|
}
|
|
};
|
|
|
|
} // namespace whetstone
|