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/platform_linux_effects.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 / platform_linux_effects.c` 31 lines · 1169 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 /* Host differential: omega2_plat_ring_store matches memcpy; over `1048576` refuses. 3 * `1048576` = 2^20 (WolframLanguageEvaluator: 2^20 -> `1048576`). No device is opened. */ 4 #include "cudapp_plat_effects.h" 5 #include 6 #include 7 #include 8 9 int main(void) { 10 unsigned char src[64], dst[64], oracle[64]; 11 uint64_t wrote = 0; 12 for (int i = 0; i < 64; i++) src[i] = (unsigned char)(i * 3 + 1); 13 memset(dst, 0x5a, sizeof dst); 14 memcpy(oracle, src, 64); 15 if (omega2_plat_ring_store(&wrote, dst, 64, src, 64, 64) != 0 || wrote != 64 || memcmp(dst, oracle, 64) != 0) { 16 fprintf(stderr, "FAIL ring-store differential\n"); 17 return 1; 18 } 19 uint64_t fenced = 0; 20 if (omega2_plat_fence(&fenced) != 0 || fenced != 1) { 21 fprintf(stderr, "FAIL fence\n"); 22 return 1; 23 } 24 wrote = 7; 25 if (omega2_plat_ring_store(&wrote, dst, 64, src, 64, 1048577ull) == 0 && wrote == 1048577ull) { 26 fprintf(stderr, "FAIL over-bound store accepted\n"); 27 return 1; 28 } 29 printf("PASS platform linux effects differential\n"); 30 return 0; 31 }