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/cmdlist_cost_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 / cmdlist_cost_test.c` 44 lines · 2242 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 /* Count-only replay of existing decode workloads, not measured chip timing. 3 * Sources and deliberately conservative legacy effects: om/cmdlist/README.md. */ 4 #include "cudapp_native.h" 5 #include 6 #include 7 #include 8 static uint64_t p[200704],b[4096]; 9 static void access(unsigned i,unsigned slot,unsigned buffer,unsigned flags) { 10 uint64_t *a=p+i*49;p[i*49]=slot+1;a[1+3*slot]=4096+buffer*4096; 11 a[2+3*slot]=4096;a[3+3*slot]=flags; 12 } 13 static int report(const char *name,unsigned n,unsigned stamps) { 14 uint64_t a[16]={n,4096,0,stamps,16384},o[16],r=1; 15 if(omega_cmdlist_plan(&r,a,16,p,200704,b,4096,o,16)||r) return 1; 16 printf("%s,%u,%u,%u,1,%llu,%llu,%llu\n",name,n,n,n+stamps, 17 (unsigned long long)o[2],(unsigned long long)o[1],(unsigned long long)o[0]); 18 return 0; 19 } 20 int main(void) { 21 puts("program,launches,old_per_kernel_submits,old_list_waits,old_list_submits,new_submits,new_waits,new_words"); 22 for(unsigned n=1;n<=16;n*=2) { 23 memset(p,0,sizeof p); 24 /* gpu_launch_cost_test.c: disjoint weight/output slices, common read-only x. */ 25 for(unsigned i=0;i