Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions example/14_gemm_quantization/gemm_wmma_quantization_int8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ using ::ck::Tensor;
template <ck::index_t... Is>
using S = ck::Sequence<Is...>;

using I8 = int8_t;
using I32 = int32_t;
using Row = ck::tensor_layout::gemm::RowMajor;
using Col = ck::tensor_layout::gemm::ColumnMajor;
using I8 = int8_t;
using I32 = int32_t;
using Row = ck::tensor_layout::gemm::RowMajor;
using Col = ck::tensor_layout::gemm::ColumnMajor;
using Bypass = ck::tensor_layout::BypassLayoutVerification;

using PassThrough = ck::tensor_operation::element_wise::PassThrough;
using ActivationOp = PassThrough;
Expand Down Expand Up @@ -125,11 +126,11 @@ int main(int /* argc */, char* /* argv */[])

if(std::is_same<decltype(layout), ck::tensor_layout::gemm::RowMajor>::value)
{
return HostTensorDescriptor({row, col}, {stride, 1_uz});
return HostTensorDescriptor({row, col}, {stride, 1_uz}, Bypass{});
}
else
{
return HostTensorDescriptor({row, col}, {1_uz, stride});
return HostTensorDescriptor({row, col}, {1_uz, stride}, Bypass{});
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ using S = ck::Sequence<Is...>;
using F16 = ck::half_t;
using F32 = float;

using Row = ck::tensor_layout::gemm::RowMajor;
using Col = ck::tensor_layout::gemm::ColumnMajor;
using Row = ck::tensor_layout::gemm::RowMajor;
using Col = ck::tensor_layout::gemm::ColumnMajor;
using Bypass = ck::tensor_layout::BypassLayoutVerification;

using A0DataType = F16;
using B0DataType = F16;
Expand Down Expand Up @@ -139,11 +140,11 @@ int main(int argc, char* argv[])

if(std::is_same<decltype(layout), ck::tensor_layout::gemm::RowMajor>::value)
{
return HostTensorDescriptor({row, col}, {stride, 1_uz});
return HostTensorDescriptor({row, col}, {stride, 1_uz}, Bypass{});
}
else
{
return HostTensorDescriptor({row, col}, {1_uz, stride});
return HostTensorDescriptor({row, col}, {1_uz, stride}, Bypass{});
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

int run_gemm_example(int argc, char* argv[])
{
using Bypass = ck::tensor_layout::BypassLayoutVerification;

bool do_verification = true;
int init_method = 1;
bool time_kernel = false;
Expand Down Expand Up @@ -64,11 +66,11 @@ int run_gemm_example(int argc, char* argv[])

if(std::is_same<decltype(layout), ck::tensor_layout::gemm::RowMajor>::value)
{
return ck::HostTensorDescriptor({row, col}, {stride, 1_uz});
return ck::HostTensorDescriptor({row, col}, {stride, 1_uz}, Bypass{});
}
else
{
return ck::HostTensorDescriptor({row, col}, {1_uz, stride});
return ck::HostTensorDescriptor({row, col}, {1_uz, stride}, Bypass{});
}
};

Expand Down
2 changes: 1 addition & 1 deletion example/68_gemm_add/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ parse_cmd_args(int argc, char* argv[], ProblemSize& problem_size, ExecutionConfi
config.init_method = std::stoi(argv[2]);
config.time_kernel = std::stoi(argv[3]);
}
else if(argc == 13)
else if(argc == 11)
{
config.do_verification = std::stoi(argv[1]);
config.init_method = std::stoi(argv[2]);
Expand Down
5 changes: 3 additions & 2 deletions example/68_gemm_add/run_gemm_add_example_wmma.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
bool run_gemm_add(const ProblemSize& problem_size, const ExecutionConfig& config)
{
using namespace ck::literals;
using Bypass = ck::tensor_layout::BypassLayoutVerification;

auto& [M, N, K, StrideA, StrideB, StrideD, StrideE] = problem_size;

auto f_host_tensor_descriptor =
[](std::size_t row, std::size_t col, std::size_t stride, auto layout) {
if(std::is_same<decltype(layout), ck::tensor_layout::gemm::RowMajor>::value)
{
return HostTensorDescriptor({row, col}, {stride, 1_uz});
return HostTensorDescriptor({row, col}, {stride, 1_uz}, Bypass{});
}
else
{
return HostTensorDescriptor({row, col}, {1_uz, stride});
return HostTensorDescriptor({row, col}, {1_uz, stride}, Bypass{});
}
};

Expand Down
5 changes: 3 additions & 2 deletions example/68_gemm_add/run_gemm_add_example_xdl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
bool run_gemm_add(const ProblemSize& problem_size, const ExecutionConfig& config)
{
using namespace ck::literals;
using Bypass = ck::tensor_layout::BypassLayoutVerification;

auto& [M, N, K, StrideA, StrideB, StrideD, StrideE] = problem_size;

auto f_host_tensor_descriptor =
[](std::size_t row, std::size_t col, std::size_t stride, auto layout) {
if(std::is_same<decltype(layout), ck::tensor_layout::gemm::RowMajor>::value)
{
return HostTensorDescriptor({row, col}, {stride, 1_uz});
return HostTensorDescriptor({row, col}, {stride, 1_uz}, Bypass{});
}
else
{
return HostTensorDescriptor({row, col}, {1_uz, stride});
return HostTensorDescriptor({row, col}, {1_uz, stride}, Bypass{});
}
};

Expand Down
2 changes: 1 addition & 1 deletion example/69_gemm_add_relu/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ parse_cmd_args(int argc, char* argv[], ProblemSize& problem_size, ExecutionConfi
config.init_method = std::stoi(argv[2]);
config.time_kernel = std::stoi(argv[3]);
}
else if(argc == 13)
else if(argc == 11)
{
config.do_verification = std::stoi(argv[1]);
config.init_method = std::stoi(argv[2]);
Expand Down
5 changes: 3 additions & 2 deletions example/69_gemm_add_relu/run_gemm_add_relu_example_wmma.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
bool run_gemm_add_relu(const ProblemSize& problem_size, const ExecutionConfig& config)
{
using namespace ck::literals;
using Bypass = ck::tensor_layout::BypassLayoutVerification;

auto& [M, N, K, StrideA, StrideB, StrideD, StrideE] = problem_size;

auto f_host_tensor_descriptor =
[](std::size_t row, std::size_t col, std::size_t stride, auto layout) {
if(std::is_same<decltype(layout), ck::tensor_layout::gemm::RowMajor>::value)
{
return HostTensorDescriptor({row, col}, {stride, 1_uz});
return HostTensorDescriptor({row, col}, {stride, 1_uz}, Bypass{});
}
else
{
return HostTensorDescriptor({row, col}, {1_uz, stride});
return HostTensorDescriptor({row, col}, {1_uz, stride}, Bypass{});
}
};

Expand Down
5 changes: 3 additions & 2 deletions example/69_gemm_add_relu/run_gemm_add_relu_example_xdl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
bool run_gemm_add_relu(const ProblemSize& problem_size, const ExecutionConfig& config)
{
using namespace ck::literals;
using Bypass = ck::tensor_layout::BypassLayoutVerification;

auto& [M, N, K, StrideA, StrideB, StrideD, StrideE] = problem_size;

auto f_host_tensor_descriptor =
[](std::size_t row, std::size_t col, std::size_t stride, auto layout) {
if(std::is_same<decltype(layout), ck::tensor_layout::gemm::RowMajor>::value)
{
return HostTensorDescriptor({row, col}, {stride, 1_uz});
return HostTensorDescriptor({row, col}, {stride, 1_uz}, Bypass{});
}
else
{
return HostTensorDescriptor({row, col}, {1_uz, stride});
return HostTensorDescriptor({row, col}, {1_uz, stride}, Bypass{});
}
};

Expand Down