Skip to content

fix: suppress host-only cuTile lints - #1389

Open
efegokdemir wants to merge 1 commit into
NVIDIA:mainfrom
efegokdemir:fix/cutile-host-lint-warnings
Open

efegokdemir wants to merge 1 commit into
NVIDIA:mainfrom
efegokdemir:fix/cutile-host-lint-warnings

Conversation

@efegokdemir

Copy link
Copy Markdown

Summary

#[cutile::module] emits host-side Rust for device kernels, where lints such as unused variables and unreachable statements do not reflect device execution. Allow these lints within generated modules so strict host builds do not fail on device-only code.

Changes

  • Add the host-only lint allowances to both generated module forms.
  • Add a strict-lint integration regression case for a print followed by device code.

Testing

  • cargo fmt --all --check
  • git diff --check
  • cargo test -p cutile --test basics_and_inlining --no-run could not reach compilation: cuda-bindings requires a CUDA 13.0+ toolkit, which is not installed here.

Checklist

  • All commits signed off (git commit -s)
  • SPDX headers on new source files (no new source files added)

Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
@efegokdemir
efegokdemir requested a review from elibol as a code owner October 5, 2026 23:10
@copy-pr-bot

copy-pr-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@GiGiKoneti

Copy link
Copy Markdown

Hi @efegokdemir & @elibol! 👋

Just wanted to link my original PR (NVlabs/cutile-rs#321, tracked in #1442). My patch adds the full set of inner-module lint allowances (unused_variables, unreachable_code, unused_mut, nonstandard_style, dead_code) to both macro expansion branches (entry_functions.is_empty() and non-empty) in cutile-macro.

Feel free to pull or cherry-pick those missing allowances into this PR if helpful so all host warning paths are covered!

Signed-off-by: GiGiKoneti <gigikoneti@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants