CUTLASS 3.5.0 (#1411)

This commit is contained in:
Vijay Thakkar
2024-03-19 17:51:04 -04:00
committed by GitHub
parent ffa34e7075
commit 629f4653c3
468 changed files with 48729 additions and 7252 deletions
+3 -3
View File
@@ -117,8 +117,8 @@ public:
void run() {
/// Device memory containing output
cutlass::device_memory::allocation< ArrayTy > output(kThreads);
std::vector< ArrayTy > output_host(kThreads);
cutlass::device_memory::allocation< ArrayTy > output(static_cast<size_t>(kThreads));
std::vector< ArrayTy > output_host(static_cast<size_t>(kThreads));
dim3 grid(1,1);
dim3 block(kThreads, 1, 1);
@@ -138,7 +138,7 @@ public:
ASSERT_EQ(result, cudaSuccess) << "CUDA error: " << cudaGetErrorString(result);
char const *ptr_host = reinterpret_cast<char const *>(output_host.data());
for (int i = 0; i < sizeof(ArrayTy) * kThreads; ++i) {
for (size_t i = 0; i < sizeof(ArrayTy) * kThreads; ++i) {
EXPECT_FALSE(ptr_host[i]);
}
+8 -8
View File
@@ -49,7 +49,7 @@ TEST(complex, f64_to_f32_conversion) {
cutlass::complex<float> dest = cutlass::complex<float>(source); // explicit conversion
EXPECT_TRUE(source.real() == 1.5 && source.imag() == -1.25 &&
EXPECT_TRUE(source.real() == 1.5 && source.imag() == -1.25 &&
dest.real() == 1.5f && dest.imag() == -1.25f);
}
@@ -61,7 +61,7 @@ TEST(complex, f32_to_f64_conversion) {
cutlass::complex<double> dest = source; // implicit conversion
EXPECT_TRUE(source.real() == -1.5f && source.imag() == 1.25f &&
EXPECT_TRUE(source.real() == -1.5f && source.imag() == 1.25f &&
dest.real() == -1.5 && dest.imag() == 1.25);
}
@@ -73,7 +73,7 @@ TEST(complex, s32_to_f64_conversion) {
cutlass::complex<double> dest = source; // implicit conversion
EXPECT_TRUE(source.real() == -2 && source.imag() == 1 &&
EXPECT_TRUE(source.real() == -2 && source.imag() == 1 &&
dest.real() == -2 && dest.imag() == 1);
}
@@ -86,14 +86,14 @@ TEST(complex, f16_to_f32_conversion) {
cutlass::complex<float> dest = cutlass::complex<float>(source); // explicit conversion
EXPECT_TRUE(source.real() == 1.5_hf && source.imag() == -1.25_hf &&
EXPECT_TRUE(source.real() == 1.5_hf && source.imag() == -1.25_hf &&
dest.real() == 1.5f && dest.imag() == -1.25f);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
TEST(complex, exp_f32) {
cutlass::complex<float> Z[] = {
{1, 1},
{2 , cutlass::constants::pi<float>()/2.0f },
@@ -103,16 +103,16 @@ TEST(complex, exp_f32) {
};
cutlass::complex<double> Expected[] = {
{1.4686939399158851, 2.2873552871788423},
{1.4686939399158851, 2.2873552871788423},
{4.524491950137825e-16, 7.38905609893065},
{-1.6487212707001282, 2.019101226849069e-16},
{-1.6487212707001282, 2.019101226849069e-16},
{-0.9079430793557842, 0.9079430793557843},
{1, 0}
};
double tolerance = 0.00001;
for (int i = 0; cutlass::real(Z[i]); ++i) {
for (int i = 0; cutlass::real(Z[i]) != 0.0f; ++i) {
double e_r = cutlass::real(Expected[i]);
double e_i = cutlass::real(Expected[i]);