Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Converts cuTile Python @ct.kernel GPU kernels to Julia cuTile.jl kernels, handling indexing, layout, broadcasting and launch API changes.
Use this skill ↓41% 86%+45 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 9 of 22 without it.
3 of 3 safety checks passed
Not used yet
| Python | Julia | Notes |
|---|---|---|
import cuda.tile as ct | import cuTile as ct | Different package name |
import cupy as cp | using CUDA | GPU array library |
import numpy as np | (stdlib) | Julia has built-in arrays |
from math import ceil | (builtin cld) | Ceiling division |
| Python | Julia | Notes |
|---|---|---|
@ct.kernel | (none) | No decorator needed |
def kernel(a, b, c): | function kernel(a::ct.TileArray{T,N}, ...) where {T} | Typed parameters |
param: ct.Constant[int] | param::Int (+ ct.Constant(val) at launch) | Constant at launch, not signature |
param: ct.Constant[float] | param::Float32 (+ ct.Constant(val) at launch) | Same pattern |
| (implicit return) | return or return nothing | Must be explicit |
| Python | Julia | Notes |
|---|---|---|
ct.launch(stream, grid, kernel, (a, b, c, val)) | ct.launch(kernel, grid, a, b, c, ct.Constant(val)) | No stream; args splatted; constants wrapped |
@ct.kernel(occupancy=N) | ct.@compiler_options occupancy=N (in kernel body) | Replaces launch kwargs |
grid = (M, N, 1) | grid = (M, N) or grid = (M, N, K) | Trailing 1s optional |
cp.cuda.get_current_stream() | (implicit) | Julia uses task-bound stream |
cp.cuda.runtime.deviceSynchronize() | CUDA.synchronize() | Explicit sync |
| Python | Julia | Notes |
|---|---|---|
ct.bid(0) | ct.bid(1) | 1-indexed |
ct.bid(1) | ct.bid(2) | 1-indexed |
ct.bid(2) | ct.bid(3) | 1-indexed |
ct.num_blocks(0) | ct.num_blocks(1) | 1-indexed |
ct.cdiv(a, b) | cld(a, b) | Julia builtin |
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.