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
CUDApp / tests / mathlibs_host_om_test.c
| 1 | /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ |
| 2 | /* The default-OFF C branch is compiled in this TU under distinct public names. |
| 3 | * The production archive must still resolve every default Omega entry strongly. */ |
| 4 | #include "../src/omega_gpu_mathlibs_host.h" |
| 5 | #define CUDAPP_MIGRATION_PENDING_C_MATHLIBS_HOST 1 |
| 6 | #define omega_gpu_mathlibs_cache_clear oracle_cache_clear |
| 7 | #define omega_gpu_mathlibs_test_set_mutant oracle_set_mutant |
| 8 | #define omega_gpu_mathlibs_last_error oracle_last_error |
| 9 | #define omega_gpu_rng_codegen oracle_rng_codegen |
| 10 | #define omega_gpu_rng_generate oracle_rng_generate |
| 11 | #define omega_gpu_fft_codegen oracle_fft_codegen |
| 12 | #define omega_gpu_fft_twiddles oracle_fft_twiddles |
| 13 | #define omega_gpu_fft_c2c oracle_fft_c2c |
| 14 | #define omega_gpu_philox_codegen oracle_philox_codegen |
| 15 | #define omega_gpu_philox_generate_dist oracle_philox_dist |
| 16 | #define omega_gpu_philox_generate oracle_philox_generate |
| 17 | #define omega_gpu_fft_plan_walk oracle_walk |
| 18 | #define omega_gpu_fft_r2c oracle_r2c |
| 19 | #define omega_gpu_fft_c2r oracle_c2r |
| 20 | #define omega_gpu_fft_c2c_nd oracle_nd |
| 21 | #define omega_gpu_fft_many_walk oracle_many_walk |
| 22 | #define omega_gpu_fft_many oracle_many |
| 23 | #include "../src/omega_gpu_mathlibs_api.c" |
| 24 | #undef omega_gpu_fft_plan_walk |
| 25 | #undef omega_gpu_fft_many_walk |
| 26 | #undef omega_gpu_fft_c2c |
| 27 | #undef omega_gpu_fft_r2c |
| 28 | #undef omega_gpu_fft_c2r |
| 29 | #undef omega_gpu_fft_c2c_nd |
| 30 | #undef omega_gpu_fft_many |
| 31 | #undef omega_gpu_rng_generate |
| 32 | #undef omega_gpu_philox_generate_dist |
| 33 | extern __typeof__(oracle_rng_generate) omega_gpu_rng_generate; |
| 34 | extern __typeof__(oracle_philox_dist) omega_gpu_philox_generate_dist; |
| 35 | extern __typeof__(oracle_walk) omega_gpu_fft_plan_walk; |
| 36 | extern __typeof__(oracle_many_walk) omega_gpu_fft_many_walk; |
| 37 | extern __typeof__(oracle_fft_c2c) omega_gpu_fft_c2c; |
| 38 | extern __typeof__(oracle_r2c) omega_gpu_fft_r2c; |
| 39 | extern __typeof__(oracle_c2r) omega_gpu_fft_c2r; |
| 40 | extern __typeof__(oracle_nd) omega_gpu_fft_c2c_nd; |
| 41 | extern __typeof__(oracle_many) omega_gpu_fft_many; |
| 42 | #include <stdio.h> |
| 43 | |
| 44 | static unsigned cases; |
| 45 | #define CHECK(c) do { if (!(c)) { fprintf(stderr,"FAIL line %d case %u: %s\n",__LINE__,cases,#c); exit(1); } } while (0) |
| 46 | typedef struct { OmegaGpuFftManyLaunch *v; size_t n,cap; unsigned char *table; size_t bytes; } MC; |
| 47 | static int mc(void *ctx, const OmegaGpuFftManyLaunch *p) { |
| 48 | MC *c=ctx; |
| 49 | if (!c->table && c->bytes) { c->table=malloc(c->bytes); CHECK(c->table); memcpy(c->table,p->table,c->bytes); } |
| 50 | if (c->n==c->cap) { c->cap=c->cap?2*c->cap:64; c->v=realloc(c->v,c->cap*sizeof *c->v); CHECK(c->v); } |
| 51 | c->v[c->n]=*p; c->v[c->n++].table=NULL; |
| 52 | return 0; |
| 53 | } |
| 54 | static void plan(const OmegaGpuFftMany *p,int ip) { |
| 55 | cases++; |
| 56 | size_t a[8]={0},b[8]={0}; |
| 57 | int ra=oracle_many_walk(p,ip,a,NULL,NULL),rb=omega_gpu_fft_many_walk(p,ip,b,NULL,NULL); |
| 58 | if (ra!=rb) fprintf(stderr,"plan rank %u n %u,%u,%u batch %u type %u ip %d rc %d/%d\n",p->rank,p->n[0],p->n[1],p->n[2],p->batch,p->type,ip,ra,rb); |
| 59 | CHECK(ra==rb); |
| 60 | if (ra) return; |
| 61 | CHECK(!memcmp(a,b,sizeof a)); |
| 62 | MC x={.bytes=a[7]},y={.bytes=b[7]}; |
| 63 | CHECK(!oracle_many_walk(p,ip,a,mc,&x)); CHECK(!omega_gpu_fft_many_walk(p,ip,b,mc,&y)); |
| 64 | CHECK(x.n==y.n); CHECK(x.bytes==y.bytes); CHECK(!memcmp(x.table,y.table,x.bytes)); |
| 65 | for (size_t i=0;i<x.n;i++) { |
| 66 | if (memcmp(&x.v[i],&y.v[i],sizeof *x.v)) { |
| 67 | fprintf(stderr,"launch %zu rank %u n %u,%u,%u type %u: kind %u/%u a %u/%u b %u/%u nptr %u/%u nw %u/%u elems %zu/%zu\n",i,p->rank,p->n[0],p->n[1],p->n[2],p->type,x.v[i].kind,y.v[i].kind,x.v[i].a,y.v[i].a,x.v[i].b,y.v[i].b,x.v[i].nptr,y.v[i].nptr,x.v[i].nwords,y.v[i].nwords,x.v[i].elements,y.v[i].elements); |
| 68 | for(int k=0;k<18;k++) if(x.v[i].words[k]!=y.v[i].words[k]) fprintf(stderr,"word%d %u/%u\n",k,x.v[i].words[k],y.v[i].words[k]); |
| 69 | for(int k=0;k<3;k++) if(x.v[i].buf[k]!=y.v[i].buf[k]||x.v[i].off[k]!=y.v[i].off[k]) fprintf(stderr,"buf%d %u/%u off %llu/%llu\n",k,x.v[i].buf[k],y.v[i].buf[k],(unsigned long long)x.v[i].off[k],(unsigned long long)y.v[i].off[k]); |
| 70 | CHECK(0); |
| 71 | } |
| 72 | } |
| 73 | free(x.v);free(y.v);free(x.table);free(y.table); |
| 74 | } |
| 75 | typedef struct { OmegaGpuFftLaunch *v; size_t n,cap; } LC; |
| 76 | static int lc(void *ctx,const OmegaGpuFftLaunch *p) { |
| 77 | LC *c=ctx; |
| 78 | if(c->n==c->cap){ c->cap=c->cap?2*c->cap:16;c->v=realloc(c->v,c->cap*sizeof *c->v);CHECK(c->v); } |
| 79 | c->v[c->n]=*p;c->v[c->n++].tw=NULL; |
| 80 | if(p->tw_n) { float *t=malloc(8*p->tw_n);CHECK(t);memcpy(t,p->tw,8*p->tw_n);c->v[c->n-1].tw=t; } |
| 81 | return 0; |
| 82 | } |
| 83 | static void walk(unsigned mode,unsigned rank,const uint32_t *n,unsigned batch,int inv) { |
| 84 | cases++; size_t a[3]={0},b[3]={0};LC x={0},y={0}; |
| 85 | int ra=oracle_walk(mode,rank,n,batch,inv,a,lc,&x),rb=omega_gpu_fft_plan_walk(mode,rank,n,batch,inv,b,lc,&y); |
| 86 | CHECK(ra==rb); |
| 87 | if(!ra){CHECK(!memcmp(a,b,sizeof a));CHECK(x.n==y.n);for(size_t i=0;i<x.n;i++){ |
| 88 | const float *xt=x.v[i].tw,*yt=y.v[i].tw; x.v[i].tw=y.v[i].tw=NULL; |
| 89 | CHECK(!memcmp(&x.v[i],&y.v[i],sizeof *x.v)); |
| 90 | if(x.v[i].tw_n) CHECK(!memcmp(xt,yt,8*x.v[i].tw_n)); |
| 91 | free((void*)xt);free((void*)yt); |
| 92 | }} |
| 93 | free(x.v);free(y.v); |
| 94 | } |
| 95 | static void scalar(void) { |
| 96 | const uint32_t ns[]={0,1,127,128,129,131071,131072,131073,UINT32_MAX}; |
| 97 | const uint32_t per[]={0,1,2,3,4,5,2047,2048,2049,UINT32_MAX}; |
| 98 | const uint64_t seeds[]={0,1,UINT64_MAX,UINT64_MAX-11400714819323198485ull}; |
| 99 | for(unsigned k=0;k<4;k++) for(size_t i=0;i<sizeof ns/sizeof *ns;i++) for(size_t j=0;j<sizeof per/sizeof *per;j++) { |
| 100 | cases++; CHECK(rng_args_ok(k,ns[i],per[j])==-(int)omega_mh_rng(k,ns[i],per[j],2)); |
| 101 | CHECK(omega_mh_rngval(k,ns[i],per[j],0)==(uint64_t)ns[i]*per[j]); |
| 102 | CHECK(omega_mh_rngval(k,ns[i],per[j],1)==(k==0?8:4)); |
| 103 | CHECK(omega_mh_rngval(k,ns[i],per[j],2)==((uint64_t)ns[i]+127)/128); |
| 104 | } |
| 105 | for(unsigned d=0;d<=4;d++) for(size_t i=0;i<sizeof ns/sizeof *ns;i++) for(size_t j=0;j<sizeof per/sizeof *per;j++) { |
| 106 | cases++; unsigned g=d==3?2:4,esz=d==2||d==3?2:1,r=per[j]%g; |
| 107 | CHECK(omega_mh_phil(d,ns[i],per[j],UINT64_MAX,0)==(uint64_t)ns[i]*per[j]*esz); |
| 108 | CHECK(omega_mh_phil(d,ns[i],per[j],UINT64_MAX,1)==3); |
| 109 | CHECK(omega_mh_phil(d,ns[i],per[j],UINT64_MAX,2)==UINT64_MAX/4); |
| 110 | CHECK(omega_mh_phil(d,ns[i],per[j],UINT64_MAX,3)==per[j]/g+(r!=0)); |
| 111 | CHECK(omega_mh_phil(d,ns[i],per[j],UINT64_MAX,4)==(r?r-g:0u)); |
| 112 | } |
| 113 | for(size_t i=0;i<sizeof seeds/sizeof *seeds;i++)for(size_t j=0;j<sizeof seeds/sizeof *seeds;j++)for(unsigned k=0;k<4;k++) { |
| 114 | cases++; CHECK(omega_mh_seed(seeds[i],seeds[j],k)==seeds[i]+seeds[j]+(k+1)*ML_GOLDEN); |
| 115 | } |
| 116 | const uint32_t lens[]={0,1,2,3,4,5,7,8,9,2047,2048,2049,4095,4096,4097,UINT32_MAX}; |
| 117 | for(size_t i=0;i<sizeof lens/sizeof *lens;i++){cases++;CHECK(lg_in(lens[i],4,2048)==(int)(uint32_t)omega_mh_lg(lens[i],4,2048));} |
| 118 | CHECK(omega_mh_time(123,999999999)==123999999999ull); |
| 119 | CHECK(omega_mh_poison(ML_POISON64,0,1,0)==1);CHECK(!omega_mh_poison(ML_POISON64-1,0,1,0)); |
| 120 | CHECK(omega_mh_poison(ML_POISON32,ML_POISON32_ALT,0,1)==1);CHECK(!omega_mh_poison(ML_POISON32,0,0,1)); |
| 121 | for(uint64_t gap=31;gap<=33;gap++){cases++;CHECK(omega_mh_overlap(4096,32,4096+gap,32)==(gap<32));CHECK(omega_mh_overlap(4096+gap,32,4096,32)==(gap<32));} |
| 122 | CHECK(!omega_mh_overlap(0,8,UINT64_MAX-3,8)); |
| 123 | uint64_t l[8]={7,99,31,7,1},e[4]={2,3,4,1}; |
| 124 | for(uint64_t i=0;i<48;i++){cases++;CHECK(omega_mh_index(l,e,3,i)==7+(i/24)*99+((i/12)%2)*31+((i/4)%3)*7+i%4);} |
| 125 | CHECK(omega_mh_fill(0,7)==128);CHECK(omega_mh_fill(128,7)>255); |
| 126 | uint64_t out[8]; CHECK(omega_mh_fft(4096,4128,4,1,0,out)==0);CHECK(omega_mh_fft(4096,4127,4,1,0,out)==1); |
| 127 | CHECK(omega_mh_fft(4096,8192,4,UINT32_MAX,0,out)==2);CHECK(omega_mh_fft(4096,8192,3,1,0,out)==4); |
| 128 | } |
| 129 | static int stop_many(void *ctx, const OmegaGpuFftManyLaunch *launch) { (void)ctx; (void)launch; return -91; } |
| 130 | static int stop_walk(void *ctx, const OmegaGpuFftLaunch *launch) { (void)ctx; (void)launch; return -92; } |
| 131 | static void admission(void) { |
| 132 | float a[8194]={0}; |
| 133 | uint32_t dims[3]={4,4,4}; |
| 134 | const uint32_t badns[]={0,131073,UINT32_MAX}; |
| 135 | for(size_t i=0;i<sizeof badns/sizeof *badns;i++) { |
| 136 | CHECK(oracle_rng_generate(0,1,2,badns[i],0,1,a,NULL)==omega_gpu_rng_generate(0,1,2,badns[i],0,1,a,NULL)); |
| 137 | CHECK(oracle_philox_dist(0,1,2,badns[i],0,1,a,NULL)==omega_gpu_philox_generate_dist(0,1,2,badns[i],0,1,a,NULL)); |
| 138 | } |
| 139 | CHECK(oracle_rng_generate(3,0,0,1,0,1,a,NULL)==omega_gpu_rng_generate(3,0,0,1,0,1,a,NULL)); |
| 140 | CHECK(oracle_rng_generate(0,0,0,1,0,0,a,NULL)==omega_gpu_rng_generate(0,0,0,1,0,0,a,NULL)); |
| 141 | CHECK(oracle_rng_generate(0,0,0,1,0,1,NULL,NULL)==omega_gpu_rng_generate(0,0,0,1,0,1,NULL,NULL)); |
| 142 | CHECK(oracle_philox_dist(5,0,0,1,0,1,a,NULL)==omega_gpu_philox_generate_dist(5,0,0,1,0,1,a,NULL)); |
| 143 | CHECK(oracle_philox_dist(0,0,0,1,0,0,a,NULL)==omega_gpu_philox_generate_dist(0,0,0,1,0,0,a,NULL)); |
| 144 | CHECK(oracle_philox_dist(0,0,0,1,0,1,NULL,NULL)==omega_gpu_philox_generate_dist(0,0,0,1,0,1,NULL,NULL)); |
| 145 | const uint32_t lens[]={0,1,2,3,4,8,4096,4097,UINT32_MAX}; |
| 146 | for(size_t i=0;i<sizeof lens/sizeof *lens;i++) { |
| 147 | cases++; |
| 148 | CHECK(oracle_fft_c2c(a,a+1,lens[i],1,0,NULL)==omega_gpu_fft_c2c(a,a+1,lens[i],1,0,NULL)); |
| 149 | CHECK(oracle_r2c(a,a+1,lens[i],1,NULL)==omega_gpu_fft_r2c(a,a+1,lens[i],1,NULL)); |
| 150 | CHECK(oracle_c2r(a,a+1,lens[i],1,NULL)==omega_gpu_fft_c2r(a,a+1,lens[i],1,NULL)); |
| 151 | } |
| 152 | CHECK(many_basic(0,0,dims,1,0,a,a+1,NULL)==OMEGA_GPU_ML_BAD_ARGS); |
| 153 | CHECK(many_basic(0,1,dims,1,0,a,a+1,NULL)==OMEGA_GPU_ML_BAD_ARGS); |
| 154 | CHECK(oracle_nd(a,a+1,3,dims,1,0,NULL)==omega_gpu_fft_c2c_nd(a,a+1,3,dims,1,0,NULL)); |
| 155 | const uint32_t bits[]={ML_POISON32,0,0x80000000u,1,0x80000001u,0x7f800000u,0xff800000u,0x7fc00000u,ML_POISON32_ALT}; |
| 156 | ManyScan scan={.dev=bits,.words=1}; |
| 157 | uint64_t count=0; |
| 158 | for(uint32_t i=0;i<sizeof bits/sizeof *bits;i++) { CHECK(!many_scan(&scan,i)); count=omega_mh_add(count,omega_mh_poison(bits[i],0,0,0)); } |
| 159 | CHECK(scan.unwritten==count && count==1); |
| 160 | } |
| 161 | int main(int argc,char **argv) { |
| 162 | scalar(); |
| 163 | admission(); |
| 164 | const uint32_t batches[]={0,1,1023,1024,1025}; |
| 165 | for(uint32_t n=4;n<=2048;n*=2) for(size_t b=0;b<sizeof batches/sizeof *batches;b++) for(int inv=0;inv<2;inv++) { |
| 166 | uint32_t dims[3]={n,4,2};walk(0,1,dims,batches[b],inv);walk(0,2,dims,batches[b],inv); |
| 167 | OmegaGpuFftMany p={.rank=1,.n={n,0,0},.batch=batches[b],.inverse=inv};plan(&p,0); |
| 168 | if(b==1){p.rank=2;p.n[1]=4;plan(&p,1);p.rank=3;p.n[2]=2;plan(&p,0);} |
| 169 | } |
| 170 | const uint32_t shapes[]={2,3,5,6,7,8,11,16,30,64,127,1024,2047,2048,2049,4095,4096}; |
| 171 | for(size_t i=0;i<sizeof shapes/sizeof *shapes;i++) for(unsigned type=0;type<3;type++)for(unsigned rank=1;rank<=3;rank++) { |
| 172 | OmegaGpuFftMany p={.rank=rank,.n={shapes[i],3,2},.batch=2,.type=type}; |
| 173 | plan(&p,0);plan(&p,1); |
| 174 | p.inembed[0]=shapes[i]+1;p.inembed[1]=4;p.inembed[2]=3; |
| 175 | p.onembed[0]=shapes[i]+1;p.onembed[1]=4;p.onembed[2]=3; |
| 176 | p.istride=2;p.ostride=3;p.idist=65536;p.odist=65537;plan(&p,0); |
| 177 | p.odist=0;plan(&p,0);p.odist=1;plan(&p,0);p.ostride=0;plan(&p,0); |
| 178 | } |
| 179 | const uint32_t bad[]={0,1,3,2049,4097,UINT32_MAX}; |
| 180 | for(size_t i=0;i<sizeof bad/sizeof *bad;i++){uint32_t d[3]={bad[i],4,8};walk(0,1,d,1,0);walk(1,1,d,1,0);walk(2,1,d,1,0);OmegaGpuFftMany p={.rank=1,.n={bad[i]},.batch=1};plan(&p,0);} |
| 181 | for(uint32_t n=8;n<=4096;n*=2){uint32_t d[3]={n,8,8};walk(1,1,d,1,0);walk(2,1,d,1025,0);walk(0,3,d,1,0);} |
| 182 | OmegaGpuFftMany p={.rank=3,.n={4096,4096,4096},.batch=UINT32_MAX};plan(&p,0); |
| 183 | p.rank=0;plan(&p,0);p.rank=4;plan(&p,0);p.rank=1;p.n[0]=8;p.batch=1;p.type=3;plan(&p,0);p.type=0;p.inverse=-1;plan(&p,0); |
| 184 | p.inverse=0;p.inembed[0]=8;p.onembed[0]=0;plan(&p,0); |
| 185 | const uint32_t edges[]={0,1,2,3,4,5,15,16,17,4095,4096,4097,UINT32_MAX}; |
| 186 | for(size_t k=0;k<sizeof edges/sizeof *edges;k++) { |
| 187 | OmegaGpuFftMany q={.rank=2,.n={4,4},.batch=2,.inembed={4,4},.onembed={4,4}, |
| 188 | .istride=1,.ostride=1,.idist=16,.odist=16}; |
| 189 | q.istride=edges[k];plan(&q,0);q.istride=1; |
| 190 | q.ostride=edges[k];plan(&q,0);q.ostride=1; |
| 191 | q.idist=edges[k];plan(&q,0);q.idist=16; |
| 192 | q.odist=edges[k];plan(&q,0);q.odist=16; |
| 193 | q.inembed[1]=edges[k];plan(&q,0);q.inembed[1]=4; |
| 194 | q.onembed[1]=edges[k];plan(&q,0); |
| 195 | uint32_t dims[3]={4,4,4};walk(0,edges[k],dims,1,0); |
| 196 | } |
| 197 | for(uint32_t k=268435451;k<=268435453;k++) { |
| 198 | OmegaGpuFftMany q={.rank=1,.n={4},.batch=2,.inembed={4},.onembed={4}, |
| 199 | .istride=1,.ostride=1,.idist=k,.odist=k}; |
| 200 | plan(&q,0); |
| 201 | } |
| 202 | uint32_t vd[3]={4,4,4};walk(0,1,vd,UINT32_MAX,0);walk(0,1,vd,1,-1);walk(1,2,vd,1,0); |
| 203 | walk(3,1,vd,1,0);walk(UINT32_MAX,1,vd,1,0);walk(0,UINT32_MAX,vd,1,0);walk(1,1,vd,1,1); |
| 204 | for(uint32_t axis=0;axis<3;axis++) for(size_t k=0;k<sizeof edges/sizeof *edges;k++) { |
| 205 | uint32_t dims[3]={4,4,4};dims[axis]=edges[k];walk(0,3,dims,1,0); |
| 206 | OmegaGpuFftMany q={.rank=3,.n={4,4,4},.batch=1};q.n[axis]=edges[k];plan(&q,0); |
| 207 | } |
| 208 | for(uint32_t b=33554431;b<=33554433;b++) { |
| 209 | OmegaGpuFftMany q={.rank=1,.n={4},.batch=b};plan(&q,0); |
| 210 | } |
| 211 | OmegaGpuFftMany invalid={.rank=1,.n={4},.batch=1}; |
| 212 | plan(&invalid,-1);plan(&invalid,2);invalid.batch=UINT32_MAX;plan(&invalid,0); |
| 213 | invalid.batch=1;invalid.type=UINT32_MAX;plan(&invalid,0);invalid.type=0;invalid.rank=UINT32_MAX;plan(&invalid,0); |
| 214 | for(uint32_t b=8388607;b<=8388609;b++) { |
| 215 | OmegaGpuFftMany q={.rank=1,.n={11},.batch=b};plan(&q,0); |
| 216 | } |
| 217 | size_t sizes[OMEGA_GPU_FFT_MANY_BUFS]={0}; |
| 218 | invalid.rank=1; |
| 219 | CHECK(oracle_many_walk(NULL,0,sizes,NULL,NULL)==omega_gpu_fft_many_walk(NULL,0,sizes,NULL,NULL)); |
| 220 | CHECK(oracle_many_walk(&invalid,0,NULL,NULL,NULL)==omega_gpu_fft_many_walk(&invalid,0,NULL,NULL,NULL)); |
| 221 | CHECK(oracle_many_walk(&invalid,0,sizes,stop_many,NULL)==-91); |
| 222 | CHECK(omega_gpu_fft_many_walk(&invalid,0,sizes,stop_many,NULL)==-91); |
| 223 | CHECK(oracle_walk(0,1,vd,1,0,sizes,stop_walk,NULL)==-92); |
| 224 | CHECK(omega_gpu_fft_plan_walk(0,1,vd,1,0,sizes,stop_walk,NULL)==-92); |
| 225 | CHECK(oracle_walk(0,1,NULL,1,0,sizes,NULL,NULL)==omega_gpu_fft_plan_walk(0,1,NULL,1,0,sizes,NULL,NULL)); |
| 226 | CHECK(oracle_walk(0,1,vd,1,0,NULL,NULL,NULL)==omega_gpu_fft_plan_walk(0,1,vd,1,0,NULL,NULL,NULL)); |
| 227 | uint32_t oversized[3]={2048,2048,2048};walk(0,3,oversized,1,0); |
| 228 | const uint32_t blue[3][2]={{13,11},{11,31},{31,11}}; |
| 229 | for(size_t i=0;i<3;i++) for(unsigned type=0;type<3;type++) for(int inv=0;inv<2;inv++) { |
| 230 | OmegaGpuFftMany q={.rank=2,.n={blue[i][0],blue[i][1]},.batch=2,.type=type,.inverse=inv};plan(&q,0); |
| 231 | } |
| 232 | if(argc>1 && !strcmp(argv[1],"--red")){ uint64_t l[8]={0,1,1},e[4]={4,1,1,1};CHECK(omega_mh_index(l,e,1,1)==2); } |
| 233 | printf("MATHLIBS-HOST-OM PASS cases=%u\n",cases);return 0; |
| 234 | } |