debug: print mhc_sinkhorn CUDA kernel compile errors

This commit is contained in:
2026-06-02 04:02:34 +00:00
parent ca53bdb8e1
commit 668a42e71a

View File

@@ -99,7 +99,8 @@ def sinkhorn_knopp(
from dsv4.kernels.cuda.loader import get_cuda_module
mod = get_cuda_module("mhc_sinkhorn", ["mhc_sinkhorn.cu"])
return mod.mhc_sinkhorn(logits.float(), t_max, eps)
except Exception:
except Exception as e:
import sys; print(f"mhc_sinkhorn CUDA kernel failed: {e}, falling back to Python", file=sys.stderr, flush=True)
pass # Fall back to Python
# Python fallback