A Modern GPGPU API & wip linux RDNA2+ Driver
rdna driver linux gpu
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wip

+11 -3
+7 -3
libvektor/test/02_hello_queue/hello_queue.cpp
··· 17 17 printf("x: %p (%p) (%llu bytes)\n", x.cpu, x.gpu, x.size); 18 18 printf("y: %p (%p) (%llu bytes)\n", y.cpu, y.gpu, y.size); 19 19 20 + // @todo: wait for address ok? 21 + 20 22 auto dma = vektor::create_queue(dev, vektor::QueueType::Transfer); 21 23 22 24 auto l1 = vektor::start_recording(dma); ··· 26 28 27 29 vektor::submit(dma, l1); 28 30 29 - // @todo: how to wait on cpu for DMA transfer? TODO? 31 + // @todo: hacky bussy-wait 30 32 printf("x[0]: %u\n", ((uint32_t *)x.cpu)[0]); 31 - sleep(1); 33 + 34 + while(*((uint32_t *)x.cpu) == 0); 32 35 printf("x[0]: %u\n", ((uint32_t *)x.cpu)[0]); 33 36 *((uint32_t *)y.cpu) = 1337; 34 - sleep(1); 37 + 38 + while(*((uint32_t *)x.cpu) == 1); 35 39 printf("x[0]: %u\n", ((uint32_t *)x.cpu)[0]); 36 40 37 41 vektor::free(dev, x);
+4
libvektor/test/03_hello_2queue/hello_2queue.cpp
··· 45 45 printf("x[0]: %u\n", ((uint32_t *)x.cpu)[0]); 46 46 sleep(1); 47 47 printf("x[0]: %u\n", ((uint32_t *)x.cpu)[0]); 48 + sleep(1); 49 + printf("x[0]: %u\n", ((uint32_t *)x.cpu)[0]); 50 + sleep(1); 51 + printf("x[0]: %u\n", ((uint32_t *)x.cpu)[0]); 48 52 49 53 printf("\n"); 50 54 printf("ts0: %lu\n", ((uint64_t *)ts.cpu)[0]);