gdn_chunk_parity: skip (77) on a card whose shared-memory opt-in cannot hold the kkt stage (Pascal), instead of failing
This commit is contained in:
1 parent
dea9b6de5d
commit
4ef3855745
2 files changed
+12
No files matched your search
@@ -935,6 +935,7 @@ if(STRATA_ENABLE_CUDA OR STRATA_ENABLE_HIP)
|
||||
target_include_directories(gdn_chunk_parity PRIVATE ${_strata_gpu_include_directories})
|
||||
target_link_libraries(gdn_chunk_parity PRIVATE strata_prefill ${_strata_gpu_runtime_target})
|
||||
add_test(NAME gdn_chunk_parity COMMAND gdn_chunk_parity --selftest)
|
||||
set_tests_properties(gdn_chunk_parity PROPERTIES SKIP_RETURN_CODE 77)
|
||||
|
||||
# v100/gdn-chunk: the micro benchmark (CUDA events, real GDN shapes): chunked vs recurrent prompt path.
|
||||
add_executable(gdn_chunk_bench bench/gdn_chunk_bench.cpp)
|
||||
|
||||
@@ -258,6 +258,17 @@ int main(int argc, char** argv) {
|
||||
if (std::strcmp(argv[i], "--selftest") == 0) selftest = true;
|
||||
else { std::fprintf(stderr, "usage: gdn_chunk_parity [--selftest]\n"); return 2; }
|
||||
}
|
||||
{
|
||||
// the kkt stage needs 2*64*129 floats (66 KB) of dynamic shared memory: a card whose opt-in limit is lower
|
||||
// (Pascal: 48 KB) cannot launch it, and the engine dispatch never selects the chunked path there
|
||||
int dev = 0, smem = 0;
|
||||
cudaGetDevice(&dev);
|
||||
cudaDeviceGetAttribute(&smem, cudaDevAttrMaxSharedMemoryPerBlockOptin, dev);
|
||||
if (smem < 2 * 64 * 129 * 4) {
|
||||
std::printf("gdn_chunk_parity: the card's shared-memory opt-in (%d B) is below the kkt stage's need, skipped\n", smem);
|
||||
return 77;
|
||||
}
|
||||
}
|
||||
if (!strata::prefill::gdn_chunk_available())
|
||||
std::printf("note: not a V100 (cc 7.0) - the parity still runs; the engine dispatch keeps the recurrence\n");
|
||||
run_case(64, 1);
|
||||
|
||||
Reference in new issue
Block a user