Skip to content

Commit a88950e

Browse files
committed
review changes: code cleanup
1 parent 284aaaf commit a88950e

File tree

9 files changed

+23
-11
lines changed

9 files changed

+23
-11
lines changed

projects/composablekernel/test/ck_tile/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ add_subdirectory(core)
3838
add_subdirectory(epilogue)
3939
add_subdirectory(atomic_add_op)
4040
add_subdirectory(fmha)
41+
# TODO: The Universal GEMM tile engine test will be either removed
42+
# or moved to the appropriate location in future work.
4143
# add_subdirectory(gemm_tile_engine)
4244
add_subdirectory(pooling)
4345
add_subdirectory(grouped_conv)

projects/composablekernel/tile_engine/ops/common/utils.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <sstream>
1010
#include <vector>
1111
#include <string>
12+
#include <cstdlib>
1213

1314
#include "ck_tile/core.hpp"
1415
#include "ck_tile/host.hpp"
@@ -106,7 +107,9 @@ struct Setting
106107

107108
inline std::string get_rocm_version()
108109
{
109-
std::ifstream version_file("/opt/rocm/.info/version");
110+
const char* path = std::getenv("ROCM_PATH");
111+
std::string file_name = std::string(path) + "/.info/version";
112+
std::ifstream version_file(file_name);
110113
if(version_file.is_open())
111114
{
112115
std::string version;

projects/composablekernel/tile_engine/ops/gemm/gemm_multi_d/gemm_multi_d_benchmark.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "gemm/gemm_benchmark.hpp"
1515

1616
#pragma clang diagnostic push
17-
#pragma clang diagnostic ignored "-Wlifetime-safety-intra-tu-seggestions"
17+
#pragma clang diagnostic ignored "-Wlifetime-safety-intra-tu-suggestions"
1818

1919
// Data types and Layouts are defined by the generated kernel headers
2020
// No hardcoded type definitions here to avoid conflicts

projects/composablekernel/tile_engine/ops/gemm/gemm_multi_d/gemm_multi_d_benchmark.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
23
# SPDX-License-Identifier: MIT
34

@@ -9,7 +10,7 @@
910

1011

1112
def _import_gemm_benchmark():
12-
"""Import validation utilities from commons directory."""
13+
"""Import gemm benchmark from parent directory."""
1314
current_dir = os.path.dirname(os.path.abspath(__file__))
1415
parent_dir = os.path.dirname(current_dir)
1516

projects/composablekernel/tile_engine/ops/gemm/gemm_multi_d/gemm_multi_d_profiler.hpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,15 @@ class GemmMultiDProfiler : public GemmProfiler<GemmMultiDProfiler,
149149

150150
for(auto& callable : callables)
151151
{
152-
auto kernel_run_result =
153-
callable(gemm_multi_d_args,
154-
ck_tile::stream_config{
155-
nullptr, true, setting_.log_, setting_.n_warmup_, setting_.n_repeat_});
152+
auto kernel_run_result = callable(gemm_multi_d_args,
153+
ck_tile::stream_config{nullptr,
154+
true,
155+
setting_.log_,
156+
setting_.n_warmup_,
157+
setting_.n_repeat_,
158+
setting_.is_gpu_timer_,
159+
setting_.flush_cache_,
160+
setting_.rotating_count_});
156161
process_result(gemm_multi_d_problem,
157162
c_m_n_dev_buf,
158163
c_m_n_host_result,

projects/composablekernel/tile_engine/ops/gemm/gemm_preshuffle/gemm_preshuffle_benchmark.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
23
# SPDX-License-Identifier: MIT
34

@@ -9,7 +10,7 @@
910

1011

1112
def _import_gemm_benchmark():
12-
"""Import validation utilities from commons directory."""
13+
"""Import gemm benchmark from parent directory."""
1314
current_dir = os.path.dirname(os.path.abspath(__file__))
1415
parent_dir = os.path.dirname(current_dir)
1516

projects/composablekernel/tile_engine/ops/gemm/gemm_preshuffle/gemm_preshuffle_profiler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class GemmPreshuffleProfiler
8989
gemm_problem.stride_c_);
9090
}
9191

92-
// Kerenl Execution
92+
// Kernel Execution
9393

9494
a_m_k_dev_buf.ToDevice(a_m_k.data());
9595
c_m_n_dev_buf.SetZero();

projects/composablekernel/tile_engine/ops/gemm/gemm_profiler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class GemmProfiler
6868
ck_tile::static_for<0, DDataType::size(), 1>{}([&](auto i) {
6969
using DType = ck_tile::remove_cvref_t<std::tuple_element_t<i, DDataType>>;
7070
num_byte += sizeof(DType) * gemm_problem.m_ * gemm_problem.n_;
71-
flop += sizeof(DType) * gemm_problem.m_ * gemm_problem.n_;
71+
flop += gemm_problem.m_ * gemm_problem.n_;
7272
});
7373
}
7474

projects/composablekernel/tile_engine/ops/gemm/gemm_universal/gemm_universal_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
def _import_gemm_benchmark():
13-
"""Import validation utilities from commons directory."""
13+
"""Import gemm benchmark from parent directory."""
1414
current_dir = os.path.dirname(os.path.abspath(__file__))
1515
parent_dir = os.path.dirname(current_dir)
1616

0 commit comments

Comments
 (0)