NVIDIA sm_86 and sm_60: the measured bitwise decode switches on by default per architecture (nv_defaults; STRATA_SM86_PERF=0 / STRATA_SM60_PERF=0 turn them off)

This commit is contained in:
Niko1221 committed 2026-10-18 08:05:20 +02:00
1 parent b829a3189d
commit 2725c23f74
7 files changed
+157 -10

No files matched your search

+19
View File
@@ -17,6 +17,7 @@
#include "strata/platform/memory.hpp"
#include "strata/core/arch_defaults.hpp"
#include "strata/core/nv_defaults.hpp"
#include "strata/kernels/gfx_arch.hpp"
#include "strata/core/dma_batch.hpp"
#include "strata/core/device.hpp"
@@ -2646,6 +2647,24 @@ int main(int argc, char** argv) {
else (void) cudaGetLastError();
}
#endif
#if !defined(STRATA_USE_HIP) && !defined(STRATA_GPU_METAL)
{ // CUDA sm_86 / sm_60: the switches that are exact AND faster there are on by default (strata/core/nv_defaults.hpp), when every
// visible card has that one compute capability; before any engine code reads its switches, the user's own settings are kept
int nd = 0;
if (cudaGetDeviceCount(&nd) == cudaSuccess && nd > 0) {
int m0 = 0, n0 = 0;
bool same = cudaDeviceGetAttribute(&m0, cudaDevAttrComputeCapabilityMajor, 0) == cudaSuccess &&
cudaDeviceGetAttribute(&n0, cudaDevAttrComputeCapabilityMinor, 0) == cudaSuccess;
for (int d = 1; same && d < nd; ++d) {
int m = 0, n = 0;
same = cudaDeviceGetAttribute(&m, cudaDevAttrComputeCapabilityMajor, d) == cudaSuccess &&
cudaDeviceGetAttribute(&n, cudaDevAttrComputeCapabilityMinor, d) == cudaSuccess && m == m0 && n == n0;
}
if (same) strata::core::apply_nv_defaults(m0, n0);
}
(void) cudaGetLastError();
}
#endif
#if defined(STRATA_USE_HIP) && !defined(_WIN32)
if (o.prefill_auto_bare && o.prefill_auto_cap == 0) {
// gfx1200 / gfx1201 (RDNA4, Linux): a bare `--prefill auto` may reach 16384 instead of 8192 (R9700, IQ3_S / Q2_0, 16K / 32K /