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/regalloc_om/checkers.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 / regalloc_om / checkers.c` 118 lines · 6391 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 /* Compile twice: default Omega wrappers and C_EM/C_RECONV reference. The append 3 * double injects success/failure after the pure state change, with no device. */ 4 #include "omega_bw_em.h" 5 #include "omega_bw_em_q.h" 6 #include "omega_bw_reconv.h" 7 #include 8 #include 9 #include 10 static BlackwellIRProgram p; 11 static int fail_append; 12 #define ins (p.insns) 13 int omega_bw_ir_append(BlackwellIRProgram *prog, const BlackwellIRInsn *in) { 14 if (fail_append) return -1; 15 if (prog->count >= 64) abort(); 16 ins[prog->count++] = *in; 17 return 0; 18 } 19 int omega_bw_ir_alloc_vreg(BlackwellIRProgram *q) { (void)q; return fail_append ? -1 : 0; } 20 int omega_bw_ir_alloc_vreg64(BlackwellIRProgram *q) { (void)q; return fail_append ? -1 : 0; } 21 int omega_bw_ir_alloc_vreg128(BlackwellIRProgram *q) { (void)q; return fail_append ? -1 : 0; } 22 int omega_bw_ir_alloc_uvreg64(BlackwellIRProgram *q) { (void)q; return fail_append ? -1 : 0; } 23 static void reset(void) { memset(&p, 0, sizeof p); } 24 static void emout(const Em *e) { 25 printf("e %u %u %d %d %zu", e->pending, e->held, e->err, e->depth, p.count); 26 for (int d=0;dopen_start[d]); 27 for (size_t j=0;jdepth,r->peak,r->opened); 32 for(int d=0;dbssy_at[d],r->n_exits[d]); 34 for(int j=0;jexits[d][j]); 35 } 36 for(int j=0;j<8;j++) printf(" %u",ins[j].imm); 37 puts(""); 38 } 39 static void emcases(void) { 40 const uint32_t bits[]={0,1,2,3,4,63,64,UINT32_MAX}; 41 for(unsigned j=0;j1 && strcmp(argv[1],"--log-overflow")==0) { 113 printf("log-overflow %d\n", log2u(UINT32_MAX)); return 0; 114 } 115 (void)argv; emcases(); rcases(); 116 if(argc>1) puts("red-control"); 117 puts("CHECKERS source partition complete"); return 0; 118 }