Merge commit '1acd8e041c8a7b2c95f6f7bf60ee9417eecb924a' into develop

This commit is contained in:
assistant-librarian[bot]
2025-09-04 12:16:45 +00:00
parent c4c6e0d485
commit 5677205f88
21 changed files with 1245 additions and 782 deletions

View File

@@ -5,6 +5,7 @@
#include "ck_tile/ops/elementwise.hpp"
#include "ck_tile/host/reference/reference_transpose.hpp"
#include "json_dump.hpp"
#include "elementwise_common.hpp"
auto create_args(int argc, char* argv[])
{
@@ -32,10 +33,9 @@ bool run(const ck_tile::ArgParser& arg_parser)
if(stride_in < 0)
stride_in = N; // Dense input: stride for M dim is N
std::string data_type = arg_parser.get_str("prec");
int do_validation = arg_parser.get_int("v");
int warmup = arg_parser.get_int("warmup");
int repeat = arg_parser.get_int("repeat");
int do_validation = arg_parser.get_int("v");
int warmup = arg_parser.get_int("warmup");
int repeat = arg_parser.get_int("repeat");
if(stride_in < N)
{
@@ -161,12 +161,19 @@ int main(int argc, char* argv[])
if(!result)
return -1;
const std::string data_type = arg_parser.get_str("prec");
if(data_type == "fp16")
try
{
return run<ck_tile::half_t>(arg_parser) ? 0 : -2;
const auto prec_variant = string_to_datatype(arg_parser.get_str("prec"));
return std::visit(
[&](auto&& dt) -> int {
using DataType = std::decay_t<decltype(dt)>;
return run<DataType>(arg_parser);
},
prec_variant);
}
catch(const std::exception& e)
{
std::cerr << "Error: " << e.what() << std::endl;
return -3;
}
std::cerr << "Unsupported data type: " << data_type << std::endl;
return -3;
}