All skills
nvidia avatar

/tilegym-monkey-patch-kernels-to-transformers

@8d74158
by NVIDIA Corporationnvidia/tilegym821 stars
89

Integrate TileGym kernels into Hugging Face `transformers` models by replacing the library's submodule(s) and certain class(es)' implementations, and patching certain class(es)' init/forward/load weight methods prior to instantiating models. Used when the user requires integrating TileGym kernels into `transformers` models.

  • 10 files
  • 1.1 MB
  • CC-BY-4
  • Updated 4 months ago
  • GitHub

Use this Skill: https://skilld.dev/gh/nvidia/tilegym/tilegym-monkey-patch-kernels-to-transformers

This session only. Nothing lands on disk.

referencesenvironment-setup.md

≈415 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Setup GPU environment, Git branch, and Docker container

Work with user to prepare the experiment environment:

  1. Get UUID of GPU(s) available on current node:
    nvidia-smi -L
    # Output: GPU 0: NVIDIA B200 (UUID: GPU-d8ea7ef9-442e-488f-bd23-d6912699e32d)
    If no GPU available, break and ask user instructions for accessing GPU nodes
  2. Create a fresh git branch: Propose a branch name, e.g., auto-kernel-<transformer model name>-20260403 from target Transformer model ID and current date. The git branch <user name>/experiment/<branch name> must not exist. Checkout from current branch git checkout -b <user name>/experiment/<branch name>
  3. Build Docker container for our experiment:
    # Build with source
    cd /path/to/project
    docker build --target source -f modeling/transformers/Dockerfile -t auto-kernel:latest .
  4. Run all subsequent commands inside this Docker container. Do not substitute a host conda/venv. Only use a non-Docker environment if the user explicitly requests it.
    # Use the UUID from nvidia-smi -L output in step 1
    docker run --rm --gpus "device=GPU-d8ea7ef9-442e-488f-bd23-d6912699e32d" \
      -v /path/to/project:/workspace/tilegym \
      auto-kernel:latest \
      <command>
    Never use: --gpus all (potential multi-tenant conflicts) or --gpus 0 (device index, not UUID)
  5. Check these tools exist inside Docker container:
    1. nvidia-smi -L prints same UUID as in step 1
    2. cuda.tile (cuTile in subsequent context) is installed
    3. nsys and ncu CLI available
    4. tileiras and ptxas available and versions match with each other

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at 8d74158. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 4 months ago
Other metadata
compatibility
Verified on Claude Code with Opus-4.6 and onward, CodeX with GPT-5.5 and onward, and Cursor (Agent mode) with GPT-5.3-CodeX and stronger models.
metadata
{
  "author": "TileGym Team <TileGym@nvidia.com>",
  "version": "2026.06.03",
  "tags": [
    "tilegym",
    "transformers",
    "integration",
    "kernel",
    "monkey-patch"
  ]
}

README badge

README badge for nvidia/tilegym/tilegym-monkey-patch-kernels-to-transformers