rich7420 commented on PR #1283:
URL: https://github.com/apache/mahout/pull/1283#issuecomment-4427124971

   tested locally on a host with cuda 12.5 + rtx 2080 ti (sm_75). all green.
   
   **default path (no `QDP_CUDA_ARCH_LIST`)**
   `cuobjdump --list-elf` on the built amplitude object:
   ```
   amplitude.sm_75.cubin
   amplitude.sm_80.cubin
   amplitude.sm_86.cubin
   amplitude.sm_89.cubin
   amplitude.sm_90.cubin
   PTX: amplitude.sm_90.ptx
   ```
   nvcc 12.5 correctly filtered `sm_100` and `sm_120` out of 
`DEFAULT_CUBIN_ARCHES` since they're not yet supported by this toolchain — 
exactly the intended behavior. ptx falls back to the highest supported (sm_90).
   
   **explicit list `QDP_CUDA_ARCH_LIST=75,80`** → only `sm_75` + `sm_80` 
cubins, no ptx.
   
   **`QDP_CUDA_ARCH_LIST=75+PTX,80`** → `sm_75` cubin + `sm_75` ptx + `sm_80` 
cubin. `+PTX` suffix parser works.
   
   **invalid input `QDP_CUDA_ARCH_LIST=invalid!!`** → clean panic at build time:
   ```
   Invalid CUDA architecture 'invalid!!' in QDP_CUDA_ARCH_LIST.
   Expected entries like '89', '90a', or '120+PTX'.
   ```
   
   **empty after parse `QDP_CUDA_ARCH_LIST=,,,`** → also a clean panic.
   
   **`QDP_NO_CUDA=1`** → bypasses arch detection entirely; no-cuda stub build 
still succeeds even with an invalid arch list set.
   
   **runtime smoke (after default rebuild)**: `cargo test --test gpu_fidelity 
--release` → 17/17 pass. f32 vs f64 fidelity at 8/12/16/20 qubits stays 
≥0.9999996.
   
   minor nit (optional, not blocking):
   - the `parse_arch_name` regex allows trailing letters (so `90a` is accepted) 
— looks intentional for the `sm_90a` variant. worth a comment in the 
doc-comment to confirm that's deliberate vs accidental, since `120+PTX` is 
mentioned in the error but `90a` only shows up in the error text without a 
corresponding test.
   
   happy to approve. nice work :)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to