[FEA]: Efficient Intra-Tile Shift/Shuffle or Relaxed extract/cat Constraints
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- performance
Rechercherichtung
Das Issue nennt keine Implementierungsdateien oder Tests; beginne damit, die Python-Tile-APIs für ct.extract und ct.cat sowie deren Validierung von Zweierpotenz-Formen nachzuverfolgen. Vergleiche diesen Pfad mit der vorgeschlagenen ct.shift-API und definiere die Fertigstellung so, dass entweder die beschriebene Verschiebung innerhalb eines Tiles oder die Alternative mit beliebiger Form mit angemessener Testabdeckung unterstützt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is this a new feature, an improvement, or a change to existing functionality?
New Feature
How would you describe the priority of this feature request?
Critical (currently preventing usage)
Please provide a clear description of problem this feature solves
I am implementing a wavefront-style parallel algorithm where each thread needs to access the value computed by its neighbor in the previous step. Mathematically, this represents a "Shift Right" operation on a 1D Tile residing in registers: new_vec[i] = old_vec[i-1].
Currently, cuTile enforces strict Power-of-2 shape constraints on extract and cat. This makes it impossible to implement a shift by extracting the first $N-1$ elements and concatenating a boundary value (e.g., splitting a size-128 tile into a size-1 boundary and a size-127 slice is forbidden).
Real usage example:
In stencil computations or dynamic programming wavefronts, data often flows diagonally or horizontally between threads. Without a register-level shift, developers are forced to use high-overhead workarounds:
- Global Memory: Writing to global memory and reading back with an offset (scatter gather).
- Matrix Multiplication: Constructing a shift matrix and using
mmato perform the shift. This works but is computationally expensive (overkill) for a simple data movement operation.
Feature Description
As a high-performance kernel developer,
I want to efficiently shift or rotate elements within a Tile (intra-tile communication),
So that I can implement stencil and wavefront dependencies entirely within registers without incurring global memory latency or Tensor Core overhead.
Describe your ideal solution
I propose adding a dedicated primitive for intra-tile communication, which maps to efficient hardware instructions (like __shfl_up_sync or __shfl_down_sync in CUDA).
Proposed API:
# Shift elements to the right by 'shift_amount'.
# Elements shifted in are filled with 'fill_value'.
output_tile = ct.shift(input_tile, shift_amount=1, fill_value=0)
Alternative Solution:
Relax the Power-of-2 constraint for ct.extract and ct.cat. If the library allowed operations on arbitrary shapes (e.g., extracting a size-127 tile), users could manually implement shifts via slicing and concatenation:
# Ideally, this should be allowed:
slice = ct.extract(val, index=(0,), shape=(127,))
boundary = ct.full((1,), 0, dtype=ct.int32)
shifted = ct.cat(boundary, slice, axis=0)
Describe any alternatives you have considered
No response
Additional context
No response
Contributing Guidelines
- I agree to follow cuTile Python's contributing guidelines
- I have searched the open feature requests and have found no duplicates for this feature request
- Vorherrschende Sprache
- Python
- Sterne
- 2.2k
- Forks
- 155
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NVIDIA/cutile-python
-
[BUG]: check_dtype_support rejects family-conditional (sm_XXXa) gpu_code targetsEvtl. vergeben @sylvesterkaczmarek hat das vor 32 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
NVIDIA/cutile-python#105 · 2 Kommentare ·
-
nvidia-runners
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 25/100
NVIDIA/cutile-python#108 ·
-
[BUG]: FFT sample launches `Batch` blocks that each process the full batchEvtl. vergeben @AntonOresten hat das vor 140 Tagen übernommen. Offenbug status: needs-triage
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
NVIDIA/cutile-python#102 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
NVIDIA/cutile-python#101 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
NVIDIA/cutile-python#97 · 1 Kommentar ·
Alle Issues in NVIDIA/cutile-python
Ähnliche Issues
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
openwisp/openwisp-utils#777 ·
-
Boolean statistics (Covered, Confident, JaccardDistant) aggregate to 1.0 without float weightsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
google-research/weatherbenchX#310 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
huggingface/peft#3955 ·
Maintainer antworten meist innerhalb von 1 Tag
-
author-page correction
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 60/100
acl-org/acl-anthology#10313 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
AOSSIE-Org/Gitcord-GithubDiscordBot#147 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag