Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/tests/gemm_ex_policy_test.c # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / tests / gemm_ex_policy_test.c` 60 lines · 3175 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 /* Include the default-OFF host-policy C oracle, never the GX_C numerical path. */ 3 #ifndef CUDAPP_MIGRATION_PENDING_C_GEMM_EX_HOST_POLICY 4 #define CUDAPP_MIGRATION_PENDING_C_GEMM_EX_HOST_POLICY 1 5 #endif 6 #include "../src/omega_gpu_gemm_ex.c" 7 #include 8 #include 9 10 static unsigned long cases; 11 static void ck(uint64_t op, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t want) { 12 uint64_t got = 0; 13 if (getenv("GEMM_POLICY_RED")) want ^= 1; 14 if (omega_gemm_ex_policy(&got, op, a, b, c, d) || got != want) { 15 fprintf(stderr, "FAIL policy op=%llu a=%llu b=%llu c=%llu d=%llu got=%llu want=%llu\n", 16 (unsigned long long)op, (unsigned long long)a, (unsigned long long)b, (unsigned long long)c, 17 (unsigned long long)d, (unsigned long long)got, (unsigned long long)want); 18 exit(1); 19 } 20 cases++; 21 } 22 int main(void) { 23 static const uint64_t v[] = {0,1,2,3,4,5,6,7,8,15,16,17,31,32,33,4095,4096,4097,16383,16384,16385, 24 32767,32768,32769,65535,65536,65537,UINT32_MAX-1,UINT32_MAX,UINT64_MAX}; 25 Gx g = {0}; 26 for (size_t i=0;i