Repository navigation
Conversation
Use captured module spans for source locations and the current function definition for generated types, arrays and wrapper calls. Add regressions using the assertion kernel from NVIDIA#1379 and a helper in another file. Co-authored-by: Melih Elibol <1884921+elibol@users.noreply.github.com> Signed-off-by: Arthur031221 <levi74108520963@gmail.com>
Signed-off-by: Melih Elibol <elibol@users.noreply.github.com>
DeviceBuffer::cast_elem, DeviceBuffer::cast_chunks, and Tensor::reinterpret reinterpreted device bytes as any element type of the right size and alignment, which let a u8 buffer become a DeviceBuffer<bool> or Tensor<bool> holding values other than 0 and 1 (NVIDIA#1506). The casts now require bytemuck::AnyBitPattern of their target, so bool is rejected at compile time, and bool implements DeviceCopy: a typed buffer holds valid values by construction, so bool buffers can be allocated, filled, launched, and read back like any other element type. cuda-core re-exports bytemuck, implements Pod for the DType newtypes, and enables half's bytemuck feature for f16 and bf16. The atomic wrappers in cuda-device are not Copy, so they cannot be AnyBitPattern. DeviceBuffer gains wrap_elem and peel_elem, bounded on bytemuck::TransparentWrapper, to view a scalar buffer as its atomic wrapper and back. cuda-device implements TransparentWrapper for its atomic types and Pod for its vector types, and the examples that cast into atomics use the new methods. Every example lock gains the bytemuck dependency of cuda-device. Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
…pression span Short-circuit boolean operations (`a && b`, `a || b`) generate deciding constants when the left-hand operand decides the outcome. Previously, `compile_bool_constant` created constants from synthesized `bool` type spans, resolving to fallback module-header locations. Pass the logical expression's span through `compile_bool_constant` and the shared constant builder (`compile_constant_from_exact_bounds`), ensuring the resulting constant operation receives the exact expression line while preserving inlined helper scopes and call chains. Add regression test in `debug_info.rs` verifying source line attribution and inline caller provenance for both direct and inlined expressions. Part of NVIDIA#1475. Signed-off-by: GiGiKoneti <gigikoneti@gmail.com>
Signed-off-by: Trent Nelson <trent@trent.me>
…nMode
`tileiras` accepts `--device-debug` only at optimization level 0, but
`CompileOptions` kept the level and the debug flag as independent fields.
Debug builds default to full debug, so adding only `.opt_level(3)` produced
`--opt-level 3 --device-debug`, which `tileiras` rejects at JIT time.
Replace `opt_level`, `device_debug`, and `lineinfo` with
`codegen: CodegenMode`, where `Debug` owns level 0 and
`Optimized { level, lineinfo }` covers the rest. Every value now maps to
flags `tileiras` accepts. `debug_info()` and `opt_level()` select a mode,
and the last call wins. The level-0 default rule in
`TileirasOptions::from_compile_options` is gone, and the frontend reads the
same mode to decide check hoisting.
Remove the `device_debug(bool)` and `lineinfo(bool)` setters, which
`debug_info()` covers. The cache key and entry header bytes are unchanged
for every mode; a test pins them against the previous encoding.
Signed-off-by: almightychang (Sam, Joochul Chang) <almightychang@icloud.com>
Nothing could switch an already-built application to a debug or sanitizer build without changing its code. Add three process-wide variables, read once per process: - CUTILE_JIT_DEBUG=none|line|full acts like `debug_info()` - CUTILE_JIT_OPT_LEVEL=0|1|2|3 acts like `opt_level()` - CUTILE_JIT_SANITIZE=memcheck|none acts like `sanitize_memcheck()` Each applies after the code's options, as if its setter were called last. `CompileOptions::with_jit_env_overrides()` applies them once before both compile stages, so the frontend's check placement and the `tileiras` flags always come from the same options. Invalid values, and full debug together with an explicit level, return a JIT error naming the variable. This continues NVlabs/cutile-rs#237, which applied the overrides only to the `tileiras` flags and left the frontend hoisting checks under `CUTILE_JIT_OPTIMIZATION=debug`. Signed-off-by: almightychang (Sam, Joochul Chang) <almightychang@icloud.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
…nd SIMT Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
…uncher Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Retain the source-scope map when line tables are enabled so native debug metadata includes inline call chains without variable debug info. Signed-off-by: Trent Nelson <trent@trent.me>
Check the file, definition line, subprogram and caller chain of the generated constants in the assertion kernel and in a nested cross-file helper, in Line and Full, and that the same locations are present in the serialized bytecode. A user literal in the same kernel must keep its own line. An opt-in test checks the cubin line table with nvdisasm and DWARF. Signed-off-by: Arthur031221 <levi74108520963@gmail.com>
…cesses Every override case now runs in a child process that inherits no CUTILE_JIT_* setting and is selected by a dedicated marker variable. The cases cover explicit none, line with an opt level, full, an invalid value, the full/opt-level conflict, and the read-once rule. The cache-key check compares keys reported by independent processes, each under its own overrides, so a key that dropped the effective mode would let two distinct modes collide. A GPU test runs the normal launcher against one shared disk store and checks the kernel result, the check placement, and whether stage 2 came from tileiras or the store. Signed-off-by: almightychang (Sam, Joochul Chang) <almightychang@icloud.com>
…eBuffers Signed-off-by: nihalpasham <nihalp@nvidia.com>
…viceBox::from_raw_parts and update docs Signed-off-by: nihalpasham <nihalp@nvidia.com>
…NVIDIA#1602) Preserve source locations and inline caller chains for const-generic arrays, generated reduction bodies, and checks relocated to the host. Keep deduplicated check origins private to the compiler and render them through the existing diagnostic API. Part of NVIDIA#1475. The remaining frontend items and debugger/backend fixes remain tracked separately; this does not close the full source-location audit. Validated with the CPU/assembler suites, source-location regressions, live CUDA-GDB tests, GPU host-check enforcement, host/Tile semver checks, and all 25 active CI checks on 825de3e. Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com> (cherry picked from commit 9718b43) Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
elibol
requested review from
binarybana,
kkraus14,
nihalpasham and
rparolin
as code owners
October 22, 2026 22:49
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Collaborator
Author
|
/ok to test c6c5a86 |
…ries Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
…tree Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
…d async tree Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Merge main through NVIDIA#1541, NVIDIA#1683 and NVIDIA#1634. Resolve workflow conflicts using the accepted NVIDIA#1580 copy-pr-bot triggers. Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Collaborator
Author
|
/ok to test dfd6867 |
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Collaborator
Author
|
/ok to test 54be19d |
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Collaborator
Author
|
/ok to test 2c01bfb |
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Collaborator
Author
|
/ok to test e16b73a |
Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
Collaborator
Author
|
/ok to test d2c8120 |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cuTile Rust v0.5.0 integration covering:
CUTILE_JIT_*overrides.These changes are already included in
release/v0.5.x; this PR currently has no remaining file diff.Superseded by #1744, from
elibol:release/v050-tile-featuresintomain.