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/gpu_resident_grid.h # 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 / gpu_resident_grid.h` 26 lines · 1173 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 #ifndef GPU_RESIDENT_GRID_H 3 #define GPU_RESIDENT_GRID_H 4 #include "bw_warp_sim_k.h" 5 /* Additive one-warp/block grid scheduler. Unlike ws_run, a polling CTA yields. 6 * Memory is coherent/SC in this simulator; fence/cache hardware remains NOT_RUN. 7 * Both CTA orders and several instruction quanta exercise actual generated spin loops. */ 8 static int resident_grid(WsSim *s, unsigned ctas, unsigned reverse) { 9 (void)ws_run; 10 WsWarp *w=calloc(ctas,sizeof *w); 11 if(!w || !s->quantum || s->threads!=32) { free(w);return WS_E_OP; } 12 for(unsigned c=0;cerr ? s->err:WS_E_STUCK; } 21 } 22 if(!live) { free(w);return s->err; } 23 } 24 free(w);ws_fail(s,WS_E_STEPS,-1,"resident grid scheduling budget");return s->err; 25 } 26 #endif