stream_config.hpp Source File

stream_config.hpp Source File#

Composable Kernel: stream_config.hpp Source File
ck_tile/host/stream_config.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2018-2025, Advanced Micro Devices, Inc. All rights reserved.
3
4#pragma once
5
6#include <hip/hip_runtime.h>
7
8namespace ck_tile {
9/*
10 * construct this structure with behavior as:
11 *
12 * // create stream config with default stream(NULL), and not timing the kernel
13 * stream_config s = stream_config{};
14 *
15 * // create stream config with _some_stream_id_, and not timing the kernel
16 * stream_config s = stream_config{_some_stream_id_};
17 *
18 * // create stream config with _some_stream_id_, and benchmark with warmup/repeat as default
19 * stream_config s = stream_config{_some_stream_id_, true};
20 *
21 * // create stream config with _some_stream_id_, and benchmark using cpu timer
22 * stream_config s = stream_config{_some_stream_id_, true, 0, 3, 10, false};
23 *
24 * // create stream config with _some_stream_id_, and enable gpu timer for rotating buffer with
25 *rotating buffer count stream_config s = stream_config{_some_stream_id_, true, 0, 3, 10, true,
26 *true, 1};
27 **/
28
30{
31 hipStream_t stream_id_ = nullptr;
32 bool time_kernel_ = false;
33 int log_level_ = 0;
34 int cold_niters_ = 3;
35 int nrepeat_ = 10;
36 bool is_gpu_timer_ = true; // keep compatible
37 bool flush_cache_ = false;
39};
40} // namespace ck_tile
Definition tile/core/algorithm/cluster_descriptor.hpp:13
Definition ck_tile/host/stream_config.hpp:30
int rotating_count_
Definition ck_tile/host/stream_config.hpp:38
hipStream_t stream_id_
Definition ck_tile/host/stream_config.hpp:31
bool flush_cache_
Definition ck_tile/host/stream_config.hpp:37
int log_level_
Definition ck_tile/host/stream_config.hpp:33
int cold_niters_
Definition ck_tile/host/stream_config.hpp:34
bool time_kernel_
Definition ck_tile/host/stream_config.hpp:32
int nrepeat_
Definition ck_tile/host/stream_config.hpp:35
bool is_gpu_timer_
Definition ck_tile/host/stream_config.hpp:36