mirror of
https://github.com/tig-foundation/tig-monorepo.git
synced 2026-02-21 18:37:48 +08:00
|
|
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
tig-binary
A Rust crate that wraps an algorithm from tig-algorithm for compilation into a shared object.
TIG uses a forked version of LLVM compiler for injecting runtime signature and fuel tracking into the shared object.
For CUDA, TIG uses nvcc to generate ptx using target version sm_70/compute_70, before injecting runtime signature and fuel tracking into the ptx file.
Getting Started
- Run the appropiate development docker image. Available flavours are:
- amd64 (x86_64 compatible)
- aarch64
- amd64-cuda12.6.3 (x86_64 compatible)
- aarch64-cuda12.6.3
# example
docker run -it -v $(pwd):/app ghcr.io/tig-foundation/tig-monorepo/dev:0.0.1-aarch64
# scripts build_so and build_ptx are on PATH
- Build shared object using
build_soscript:
- Expects
tig_algorithm::<CHALLENGE>::<ALGORITHM>::solve_challengeto be importable - Outputs to
tig-algorithms/lib/<CHALLENGE>/<ARCH>/<ALGORITHM>.so, whereARCHis aarch64 or amd64
# add '--cuda' flag if building cuda algorithm
build_so $CHALLENGE $ALGORITHM
- (Optional) Build ptx using
build_ptxscript:
- Expects
tig_algorithm/src/<CHALLENGE>/<ALGORITHM>.cuortig_algorithm/src/<CHALLENGE>/<ALGORITHM>/benchmarker_outbound.cufile to exist - Outputs to
tig-algorithms/lib/<CHALLENGE>/ptx/<ALGORITHM>.ptx
build_ptx $CHALLENGE $ALGORITHM