CUTLASS 3.0.0 (#786)

* CUTLASS 3.0.0
This commit is contained in:
Vijay Thakkar
2023-01-23 20:55:28 -05:00
committed by GitHub
parent 66d9cddc83
commit 277bd6e537
377 changed files with 76396 additions and 1186 deletions
+2 -2
View File
@@ -50,7 +50,7 @@
#include "testbed.h"
#if defined(CUTLASS_ARCH_MMA_SM90_SUPPORTED)
#if defined(CUTLASS_ARCH_MMA_SM90_F64_MMA_ENABLED)
TEST(SM90_warp_gemm_complex_tensor_op_f64, 16x8x4_16x8x4_nt) {
@@ -331,4 +331,4 @@ TEST(SM90_warp_gemm_complex_tensor_op_f64, 64x64x4_16x8x4_tn) {
test::gemm::warp::TestbedComplex<MmaTensorOp, Shape>().run();
}
#endif // if defined(CUTLASS_ARCH_MMA_SM90_SUPPORTED)
#endif // if defined(CUTLASS_ARCH_MMA_SM90_F64_MMA_ENABLED)
+2 -2
View File
@@ -50,7 +50,7 @@
#include "testbed.h"
#if defined(CUTLASS_ARCH_MMA_SM90_SUPPORTED)
#if defined(CUTLASS_ARCH_MMA_SM90_F64_MMA_ENABLED)
TEST(SM90_warp_gemm_tensor_op_congruous_f64, 16x16x4_16x16x4_16x8x4) {
using Shape = cutlass::gemm::GemmShape<16, 16, 4>;
@@ -203,4 +203,4 @@ TEST(SM90_warp_gemm_tensor_op_crosswise_f64, 32x64x16_32x64x16_16x8x4) {
}
////////////////////////////////////////////////////////////////////////////////
#endif // if defined(CUTLASS_ARCH_MMA_SM90_SUPPORTED)
#endif // if defined(CUTLASS_ARCH_MMA_SM90_F64_MMA_ENABLED)
+180
View File
@@ -191,10 +191,47 @@ struct Testbed {
tensor_D_reference.reset(cutlass::make_Coord(Shape::kM, Shape::kN), false);
}
/// Returns true if the CUDA device is sufficient to execute the kernel.
bool sufficient() const {
cudaDeviceProp properties;
int device_idx;
cudaError_t result = cudaGetDevice(&device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDevice() API call failed.");
}
result = cudaGetDeviceProperties(&properties, device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDeviceProperties() failed");
}
if (properties.major == 9) {
// NVIDIA Hopper drops support for several data types
if (
cutlass::sizeof_bits<ElementA>::value < 8 ||
cutlass::sizeof_bits<ElementB>::value < 8 ||
cutlass::sizeof_bits<ElementC>::value < 8) {
return false;
}
}
return true;
}
/// Runs the test
bool run(
cutlass::Distribution::Kind init_A = cutlass::Distribution::Uniform,
cutlass::Distribution::Kind init_B = cutlass::Distribution::Uniform) {
if (!sufficient()) {
return true;
}
//
// initialize device memory
//
@@ -401,10 +438,46 @@ struct TestbedComplex {
tensor_D_reference.reset(cutlass::make_Coord(Shape::kM, Shape::kN), false);
}
/// Returns true if the CUDA device is sufficient to execute the kernel.
bool sufficient() const {
cudaDeviceProp properties;
int device_idx;
cudaError_t result = cudaGetDevice(&device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDevice() API call failed.");
}
result = cudaGetDeviceProperties(&properties, device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDeviceProperties() failed");
}
if (properties.major == 9) {
// NVIDIA Hopper drops support for several data types
if (
cutlass::sizeof_bits<ElementA>::value < 8 ||
cutlass::sizeof_bits<ElementB>::value < 8 ||
cutlass::sizeof_bits<ElementC>::value < 8) {
return false;
}
}
return true;
}
/// Runs the test
bool run(
cutlass::Distribution::Kind init_A = cutlass::Distribution::Uniform,
cutlass::Distribution::Kind init_B = cutlass::Distribution::Uniform) {
if (!sufficient()) {
return true;
}
//
// initialize device memory
//
@@ -676,10 +749,46 @@ struct TransformTestbed {
tensor_D_reference.reset(cutlass::make_Coord(Shape::kM, Shape::kN), false);
}
/// Returns true if the CUDA device is sufficient to execute the kernel.
bool sufficient() const {
cudaDeviceProp properties;
int device_idx;
cudaError_t result = cudaGetDevice(&device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDevice() API call failed.");
}
result = cudaGetDeviceProperties(&properties, device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDeviceProperties() failed");
}
if (properties.major == 9) {
// NVIDIA Hopper drops support for several data types
if (
cutlass::sizeof_bits<ElementA>::value < 8 ||
cutlass::sizeof_bits<ElementB>::value < 8 ||
cutlass::sizeof_bits<ElementC>::value < 8) {
return false;
}
}
return true;
}
/// Runs the test
bool run(
cutlass::Distribution::Kind init_A = cutlass::Distribution::Uniform,
cutlass::Distribution::Kind init_B = cutlass::Distribution::Uniform) {
if (!sufficient()) {
return true;
}
//
// initialize device memory
//
@@ -878,10 +987,46 @@ struct TransformedTestbedComplex {
tensor_D_reference.reset(cutlass::make_Coord(Shape::kM, Shape::kN), false);
}
/// Returns true if the CUDA device is sufficient to execute the kernel.
bool sufficient() const {
cudaDeviceProp properties;
int device_idx;
cudaError_t result = cudaGetDevice(&device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDevice() API call failed.");
}
result = cudaGetDeviceProperties(&properties, device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDeviceProperties() failed");
}
if (properties.major == 9) {
// NVIDIA Hopper drops support for several data types
if (
cutlass::sizeof_bits<ElementA>::value < 8 ||
cutlass::sizeof_bits<ElementB>::value < 8 ||
cutlass::sizeof_bits<ElementC>::value < 8) {
return false;
}
}
return true;
}
/// Runs the test
bool run(
cutlass::Distribution::Kind init_A = cutlass::Distribution::Uniform,
cutlass::Distribution::Kind init_B = cutlass::Distribution::Uniform) {
if (!sufficient()) {
return true;
}
//
// initialize device memory
//
@@ -1199,12 +1344,47 @@ struct SparseTestbed {
Shape::kM, Shape::kK / Sparse / ElementsPerElementE));
}
/// Returns true if the CUDA device is sufficient to execute the kernel.
bool sufficient() const {
cudaDeviceProp properties;
int device_idx;
cudaError_t result = cudaGetDevice(&device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDevice() API call failed.");
}
result = cudaGetDeviceProperties(&properties, device_idx);
if (result != cudaSuccess) {
throw std::runtime_error("cudaGetDeviceProperties() failed");
}
if (properties.major == 9) {
// NVIDIA Hopper drops support for several data types
if (
cutlass::sizeof_bits<ElementA>::value < 8 ||
cutlass::sizeof_bits<ElementB>::value < 8 ||
cutlass::sizeof_bits<ElementC>::value < 8) {
return false;
}
}
return true;
}
/// Runs the test
bool run(
cutlass::Distribution::Kind init_A = cutlass::Distribution::Uniform,
cutlass::Distribution::Kind init_B = cutlass::Distribution::Uniform,
cutlass::Distribution::Kind init_E = cutlass::Distribution::Uniform) {
if (!sufficient()) {
return true;
}
//
// initialize device memory
//