mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-03-29 03:27:39 +00:00
* [Compiler] Addressing new compiler warnings Clang enables new lifetime warnings in production and we see build errors due to this with the staging compiler. The attributes added in this PR are suggested by the compiler. However, I'm not very familiar with the code base, so the changes may be incorrect. * Update some more instances * Adds file-level ignores via clang diagnostic pragma The number of instances was large, so I decided to use file-level scope to disable the warning via pragma clang diagnostic ignored. It also showed this warning coming from the gtest dependency. For that, I did add the respective command line flag to the CMake variables. I don't know if this is acceptable or not. * This adds the remaining instances For a build on gfx90a. * fix clang format * Adding couple more instances from gfx1200 build * Fixed another few instances --------- Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com> Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com>
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
// Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#pragma once
|
|
|
|
#if !defined(__HIPCC_RTC__) || !defined(CK_CODE_GEN_RTC)
|
|
#include <ostream>
|
|
#endif
|
|
|
|
namespace ck {
|
|
|
|
/// @brief Pipeline version enumeration for GEMM kernels
|
|
/// @details Defines different pipeline strategies for data movement and computation overlap
|
|
/// in GEMM kernels. This is a lightweight header containing only the enum definition,
|
|
/// extracted from gridwise_gemm_pipeline_selector.hpp to minimize dependencies.
|
|
enum struct PipelineVersion
|
|
{
|
|
v1, ///< Version 1 pipeline
|
|
v2, ///< Version 2 pipeline
|
|
// v3 is only used in the Stream-K implementation.
|
|
v4, ///< Version 4 pipeline
|
|
weight_only, ///< Weight-only specialized pipeline
|
|
};
|
|
|
|
} // namespace ck
|
|
|
|
#if !defined(__HIPCC_RTC__) || !defined(CK_CODE_GEN_RTC)
|
|
inline std::ostream& operator<<([[clang::lifetimebound]] std::ostream& os,
|
|
const ck::PipelineVersion& p)
|
|
{
|
|
switch(p)
|
|
{
|
|
case ck::PipelineVersion::v1: os << "PipelineVersion::v1"; break;
|
|
case ck::PipelineVersion::v2: os << "PipelineVersion::v2"; break;
|
|
case ck::PipelineVersion::v4: os << "PipelineVersion::v4"; break;
|
|
case ck::PipelineVersion::weight_only: os << "PipelineVersion::weight_only"; break;
|
|
default: os << "";
|
|
}
|
|
return os;
|
|
}
|
|
#endif
|