[CK_TILE] Add pooling to ckTileEngine part2

This commit is contained in:
Aleksander Dudek
2025-11-28 08:56:17 +00:00
parent 99f5c2fcf7
commit 990f13229f
2 changed files with 58 additions and 1 deletions

View File

@@ -187,7 +187,8 @@ python gemm_instance_builder.py \
--datatype fp16 \
--layout rcr \
--config_json configs/user_provided_config.json \
--gen_all_individual
--gen_all_individual \
--gpu_target gfx942
```
#### gemm_instance_builder_parallel.py

View File

@@ -0,0 +1,56 @@
// Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
// SPDX-License-Identifier: MIT
#pragma once
#include <iostream>
#include <fstream>
#include <iomanip>
#include "ck_tile/host/device_prop.hpp"
#include "ck_tile/ops/pooling.hpp"
#include "pool_benchmark.hpp"
class PoolProfiler
{
public:
static PoolProfiler& instance(Settings settings)
{
static PoolProfiler instance{settings};
return instance;
}
// Overload for single kernel benchmarking
void benchmark(PoolProblem& pool_problem,
std::function<float(const ck_tile::PoolHostArgs&, const ck_tile::stream_config&)>
kernel_func)
{
// Create a vector with a single callable that returns both name and time
std::vector<std::function<std::tuple<std::string, float>(ck_tile::PoolHostArgs&,
const ck_tile::stream_config&)>>
callables;
callables.push_back(
[kernel_func](ck_tile::PoolHostArgs& args, const ck_tile::stream_config& stream) {
float time = kernel_func(args, stream);
return std::make_tuple(std::string(KERNEL_NAME), time);
});
benchmark(pool_problem, callables);
}
////
////
PoolProfiler(const PoolProfiler&) = delete;
PoolProfiler& operator=(const PoolProfiler&) = delete;
private:
~PoolProfiler() { kernel_instances_.clear(); }
PoolProfiler(Settings settings) : settings_(settings) {}
Settings settings_;
std::vector<KernelInstance> kernel_instances_;
}