Adds two "launch kernel" tests for lib offload, one testing that global memory works and persists between different kernels, and one verifying that `[[gnu::constructor]]` works correctly. Since we now have tests that contain multiple kernels in the same binary, the test framework has been updated a bit.
14 lines
205 B
C
14 lines
205 B
C
#include <gpuintrin.h>
|
|
#include <stdint.h>
|
|
|
|
uint32_t global[64];
|
|
|
|
[[gnu::destructor]] void dtor() {
|
|
for (unsigned I = 0; I < 64; I++)
|
|
global[I] = 1;
|
|
}
|
|
|
|
__gpu_kernel void global_dtor() {
|
|
// no-op
|
|
}
|