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 / api_rest_art_fixture.c
| 1 | /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ |
| 2 | #include "../src/omega_native_artifact.c" |
| 3 | #ifndef REST |
| 4 | #define REST(x) om_##x |
| 5 | #endif |
| 6 | int REST(cubin)(const uint8_t *b,size_t n,const char *f,const uint8_t *t,size_t tn) { return cubin_text_matches(b,n,f,t,tn); } |
| 7 | int REST(layout)(const uint8_t *b,size_t n) { return manifest_layout_ok(b,n); } |
| 8 | int REST(version)(const char *h,const char *n) { return semver_ge(h,n); } |
| 9 | size_t REST(json)(unsigned char c,unsigned char out[32]) { |
| 10 | FILE *f=tmpfile(); if(!f) abort(); char s[2]={(char)c,0}; json_str(f,s); |
| 11 | rewind(f);size_t n=fread(out,1,32,f);fclose(f);return n; |
| 12 | } |