Skip to content

Commit 728019e

Browse files
MagicalTuxclaude
andcommitted
Add gpu_idx + gpu_name to submit telemetry
FinishedJob now carries the GPU ordinal and device name (from run_on_gpu), and submit_job sends them as gpu_idx (number) and gpu_name (string) alongside the download/run/cubin/version params. So the platform can see exactly which GPU produced each fragment. Prepares 0.1.21 (version bumped); release is held pending sign-off. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9c1b6b6 commit 728019e

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "decryptd"
3-
version = "0.1.20"
3+
version = "0.1.21"
44
edition = "2024"
55
license = "Proprietary"
66
authors = ["Karpeles Lab Inc"]

src/main.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,9 @@ struct FinishedJob {
491491
download_secs: f64,
492492
/// Arch tag of the cubin that ran (`X*10+Y`), reported as `sm<NN>` at submit.
493493
cubin_arch: u32,
494+
/// Which GPU ran it: the ordinal and the device name.
495+
gpu_idx: i32,
496+
gpu_name: String,
494497
}
495498

496499
/// Fragments currently somewhere in the pipeline (claimed → run → submit), mapping
@@ -823,12 +826,10 @@ fn run_on_gpu(ordinal: i32, job: ReadyJob, status: &Status) -> Result<FinishedJo
823826
let gpu = cuda::Gpu::load_first(ordinal, &job.cubins).map_err(|e| anyhow!(e))?;
824827
let (maj, min) = gpu.compute_capability();
825828
let cubin_arch = gpu.cubin_arch();
829+
let gpu_name = gpu.device_name();
826830
eprintln!(
827-
"[decryptd] running [{}, {}) on GPU#{ordinal} {} (sm_{maj}{min}, cubin sm{cubin_arch}): entry={}",
828-
job.start,
829-
job.end,
830-
gpu.device_name(),
831-
job.manifest.entry,
831+
"[decryptd] running [{}, {}) on GPU#{ordinal} {gpu_name} (sm_{maj}{min}, cubin sm{cubin_arch}): entry={}",
832+
job.start, job.end, job.manifest.entry,
832833
);
833834
let t0 = Instant::now();
834835
let output = cuda::run_job(
@@ -870,6 +871,8 @@ fn run_on_gpu(ordinal: i32, job: ReadyJob, status: &Status) -> Result<FinishedJo
870871
run_secs,
871872
download_secs: job.download_secs,
872873
cubin_arch,
874+
gpu_idx: ordinal,
875+
gpu_name,
873876
})
874877
}
875878

@@ -899,6 +902,8 @@ fn submit_job(ctx: &RestContext, response_key: &str, job: &FinishedJob) -> Resul
899902
"cubin".to_string(),
900903
Value::String(format!("sm{}", job.cubin_arch)),
901904
);
905+
params.insert("gpu_idx".to_string(), Value::from(job.gpu_idx));
906+
params.insert("gpu_name".to_string(), Value::String(job.gpu_name.clone()));
902907
params.insert(
903908
"version".to_string(),
904909
Value::String(env!("CARGO_PKG_VERSION").to_string()),

0 commit comments

Comments
 (0)