Update kernel.py

This commit is contained in:
Pushkar Kumar Saini 2025-06-12 10:40:02 +05:30 committed by GitHub
parent 4cc6253d5c
commit a8b6b9184d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,9 +1,21 @@
import sys
import platform
if platform.system() == "Windows":
sys.exit("Triton is not supported on Windows. Please use Linux or a Linux-based Docker container.")
from typing import Tuple from typing import Tuple
import torch try:
import triton import torch
import triton.language as tl except ImportError:
from triton import Config sys.exit("PyTorch is required for this project. Please install torch >=2.1.0.")
try:
import triton
import triton.language as tl
from triton import Config
except ImportError:
sys.exit("Triton is required for this project. Please install it on a supported Linux system with CUDA.")
@triton.jit @triton.jit