test: run DSpark differential against libr4d on device

This commit is contained in:
Constantin committed 2026-11-03 14:22:46 -05:00
1 parent cebf759a36
commit c1c8e40445
2 files changed
+25 -8

No files matched your search

+2
View File
@@ -216,6 +216,8 @@ static void checkpoint_head(Fn head, Fn walk, const char* weights_path) {
}
int main(int argc,char** argv) {
int n_devices = 0;
if (hipGetDeviceCount(&n_devices) != hipSuccess || n_devices == 0) return 77;
check(argc==2 || (argc==4 && !std::strcmp(argv[2],"--head-weights")),"usage: dspark_device_test libr4d.so [--head-weights file]"); void* h=dlopen(argv[1],RTLD_NOW|RTLD_LOCAL);
if(!h) { std::fprintf(stderr,"dlopen: %s\n",dlerror()); return 1; }
Fn fn=symbol(h,"r4d_rad_dflash_markov_greedy");