mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-04 21:51:28 +00:00
[CK_TILE] add generic_permute (#1607)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ck_tile/core/utility/type_traits.hpp"
|
||||
|
||||
namespace ck_tile {
|
||||
|
||||
template <typename DataType_,
|
||||
index_t kBlockSize_ = 256,
|
||||
index_t kMaxRanks_ = 8,
|
||||
bool KeepLastDim_ = false>
|
||||
struct GenericPermuteProblem
|
||||
{
|
||||
using DataType = remove_cvref_t<DataType_>;
|
||||
static constexpr index_t kBlockSize = kBlockSize_;
|
||||
static constexpr index_t kMaxRanks = kMaxRanks_;
|
||||
/* KeepLastDim:
|
||||
* if last dim keep the same? this can help enable vector load
|
||||
* permute(0, 2, 4, 1, 3, 5) -> true
|
||||
* permute(0, 3, 2, 1) -> false
|
||||
*/
|
||||
static constexpr bool KeepLastDim = KeepLastDim_;
|
||||
// TODO: not used(?)
|
||||
};
|
||||
|
||||
} // namespace ck_tile
|
||||
Reference in New Issue
Block a user