Skip to content

delay_forward.cu: int64_t T passed to int kernel params without explicit cast #89

@matteospanio

Description

@matteospanio

Bug

delay_forward.cu passes int64_t T (and derived sizes) directly to CUDA kernel parameters typed int (lines ~111 and ~119) without static_cast<int>, unlike the explicit-cast pattern used consistently in parallel_scan.cu, biquad_forward.cu, and compressor_forward.cu. Implicit narrowing is silent today and wrong for signals beyond 2^31 samples.

Fix

Add explicit static_cast<int> plus a TORCH_CHECK(T <= INT_MAX, ...) guard, matching the other kernels. Needs cluster build validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggpuWorking with a GPU

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions