This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/core/main.cpp
T
redxherring 7e796642e6 serve: --model takes an HF repo id, fetched to $RADIANCE_HOME/hf via hfget.sh
A non-path owner/name is downloaded before bring-up and the model path
rewritten to the cached dir, so a new user points --model at a repo link
instead of a pre-fetched checkpoint. hfget.sh now keys its re-run skip on
lfs.oid (sha256) for LFS files and size for the rest, recorded in a
.hfget-manifest, so a same-size weight update is caught and re-fetched
while a warm cache stays a no-rehash no-op.
2026-10-08 17:47:27 +02:00

22 lines
770 B
C++

/* main.cpp -- the entry point. Everything it does is in engine.h's comment; this file only turns
* a command line into that sequence and a status into an exit code.
*/
#include "engine.h"
int main(int argc, char** argv) {
rad::Config cfg;
int s = rad::config_parse(argc, argv, &cfg);
if (s == 1) { rad::config_usage(argv[0]); return 0; }
if (s < 0) { rad::config_usage(argv[0]); return 2; }
if (!rad::resolve_hf_model(cfg)) return 2; /* --model given as an HF repo id: fetch + rewrite */
rad::Engine engine(std::move(cfg));
s = engine.start();
if (s < 0) return 1; /* start() already said what and why */
if (engine.config().debug_graph) return engine.dump();
return engine.serve() < 0 ? 1 : 0;
}