|
|
|
@@ -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
|
|
|
|
|
//
|
|
|
|
|