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/omega-mv/blob/main/bench/m1/block2_gpu_submit.c # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / bench / m1 / block2_gpu_submit.c` 54 lines ยท 3394 bytes Raw Blame History 1 /* M1 block 2 (omega-mv#575): GPU submit/complete round trip through omega_gpu_execute, 2 * the full lifecycle Omega runs per job (open, upload, submit, wait, readback, free, close). 3 * Reports wall per job (p50/p95/p99/max) and thread CPU time per job (the polling cost). 4 * Usage: block2 --chip [N] ; must run under flock /tmp/aien-gb10.lock. */ 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include "omega_gpu_engine.h" 11 #include "omega_blackwell_engine.h" 12 #include "omega_blackwell_encoder.h" 13 14 static double now(clockid_t c){struct timespec t;clock_gettime(c,&t);return t.tv_sec+t.tv_nsec*1e-9;} 15 static int cmpd(const void*a,const void*b){double x=*(const double*)a,y=*(const double*)b;return xy;} 16 17 static int run_case(const char*label,uint32_t n,int no_store,long N){ 18 uint8_t code[OMEGA_BW_VECADD_CODE_SIZE];size_t code_bytes=0; 19 if(omega_blackwell_encode_vecadd(code,sizeof code,&code_bytes)||code_bytes<0x140u){fprintf(stderr,"encode fail\n");return 1;} 20 if(no_store)memcpy(code+0x120,code+0x130,OMEGA_BW_INSTRUCTION_BYTES); 21 uint32_t*a=malloc(n*4),*b=malloc(n*4),*out=malloc(n*4),*poison=malloc(n*4); 22 for(uint32_t i=0;i2?atol(argv[2]):1000; 46 omega_gpu_engine_set_backend(omega_blackwell_engine_backend()); 47 printf("case,elements,n_jobs,failed,wall_mean_us,wall_p50_us,wall_p95_us,wall_p99_us,wall_max_us,cpu_mean_us,cpu_over_wall\n"); 48 int r=0; 49 r|=run_case("vecadd_no_store",65,1,N); 50 r|=run_case("vecadd",65,0,N); 51 r|=run_case("vecadd",4096,0,N); 52 r|=run_case("vecadd",65537,0,N/4); 53 return r; 54 }