interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / tests / api_rest_art_fixture.c

12 lines · 627 bytes Raw Blame History
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
6int 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); }
7int REST(layout)(const uint8_t *b,size_t n) { return manifest_layout_ok(b,n); }
8int REST(version)(const char *h,const char *n) { return semver_ge(h,n); }
9size_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}