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/codegen_tc_diff.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 / codegen_tc_diff.c` 103 lines · 7860 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 #include 3 #include 4 #include 5 #include 6 #include "omega_blackwell_codegen_tc.h" 7 #include "omega_blackwell_codegen_tc2.h" 8 #include "omega_gpu_om_ir.h" 9 #include "cudapp_native.h" 10 extern int oracle_omega_blackwell_codegen_tc_probe_prog(int,BlackwellIRProgram *); 11 extern int oracle_omega_blackwell_codegen_tc_peak_prog(uint32_t,uint32_t,uint32_t,uint32_t,BlackwellIRProgram *); 12 extern int oracle_omega_blackwell_codegen_tc_bw_prog(uint32_t,uint32_t,uint32_t,BlackwellIRProgram *); 13 extern int oracle_omega_blackwell_codegen_tcgemm_prog(const OmegaTcGemmSpec *,BlackwellIRProgram *); 14 extern int oracle_omega_blackwell_codegen_tc2_prog(const OmegaTc2Spec *,BlackwellIRProgram *); 15 static BlackwellIRProgram a,b; 16 static unsigned cases,refused; 17 static int equal(int ca,int cb,const char *label) { 18 static uint8_t x[BW_MAX_IR_INSNS*16],y[BW_MAX_IR_INSNS*16]; size_t nx=0,ny=0; 19 if ((ca==0)!=(cb==0)) {fprintf(stderr,"%s refusal C=%d Omega=%d counts=%zu/%zu\n",label,ca,cb,a.count,b.count);return 0;} 20 if(ca){refused++;return 1;} 21 if(a.count!=b.count || memcmp(a.insns,b.insns,a.count*sizeof a.insns[0]) || memcmp(&a.regalloc,&b.regalloc,sizeof a.regalloc)) { 22 fprintf(stderr,"%s IR differs %zu/%zu\n",label,a.count,b.count); 23 for(size_t i=0;i