CUDA backend: compile (#2276)

* CUDA backend: compile

* Rename kernels/ to device/
This commit is contained in:
Cheng
2025-06-13 09:08:39 +09:00
committed by GitHub
parent f5f65ef48c
commit a4fc671d3e
27 changed files with 910 additions and 27 deletions

View File

@@ -0,0 +1,12 @@
// Copyright © 2025 Apple Inc.
// This file is used by both CUDA kernel code and host-only C++ code.
#pragma once
// The maximum dimensions of shape/strides passed as kernel parameters.
#define MAX_NDIM 8
// All existing NVIDIA hardware has a fixed 32 warp size. Though a built-in
// warpSize variable exists, using it would prevent compile-time optimizations.
#define WARP_SIZE 32