include/ck_tile/host/stream_config.hpp Source File

include/ck_tile/host/stream_config.hpp Source File#

Composable Kernel: include/ck_tile/host/stream_config.hpp Source File
stream_config.hpp
Go to the documentation of this file.
1 // SPDX-License-Identifier: MIT
2 // Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
3 
4 #pragma once
5 
6 #include <hip/hip_runtime.h>
7 
8 namespace 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 
26 {
27  hipStream_t stream_id_ = nullptr;
28  bool time_kernel_ = false;
29  int log_level_ = 0;
30  int cold_niters_ = 3;
31  int nrepeat_ = 10;
32  bool is_gpu_timer_ = true; // keep compatible
33 };
34 } // namespace ck_tile
Definition: cluster_descriptor.hpp:13
Definition: stream_config.hpp:26
hipStream_t stream_id_
Definition: stream_config.hpp:27
int log_level_
Definition: stream_config.hpp:29
int cold_niters_
Definition: stream_config.hpp:30
bool time_kernel_
Definition: stream_config.hpp:28
int nrepeat_
Definition: stream_config.hpp:31
bool is_gpu_timer_
Definition: stream_config.hpp:32