permute_HxWx4_fp16.cpp 1.45 KB
Newer Older
Po-Yen, Chen's avatar
Po-Yen, Chen committed
1
2
3
4
5
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.

#include "common.hpp"

Po-Yen, Chen's avatar
Po-Yen, Chen committed
6
7
8
9
using DataType   = F16;
using BundleType = F64;

static_assert(sizeof(BundleType) % sizeof(DataType) == 0);
Po-Yen, Chen's avatar
Po-Yen, Chen committed
10
11

// clang-format off
12
using DevicePermuteInstance = ck::tensor_operation::device::DevicePermuteImpl
13
14
15
16
17
// ######| NumDim|     InData|     OutData| Elementwise| Block|  NPer|  HPer|  WPer|   InBlock|      InBlockTransfer|           InBlockTransfer|       Src|       Dst|             Src|             Dst|
// ######|       |       Type|        Type|   Operation|  Size| Block| Block| Block| LdsExtraW| ThreadClusterLengths| ThreadClusterArrangeOrder| VectorDim| VectorDim| ScalarPerVector| ScalarPerVector|
// ######|       |           |            |            |      |      |      |      |          |                     |                          |          |          |                |                |
// ######|       |           |            |            |      |      |      |      |          |                     |                          |          |          |                |                |
         <       3, BundleType, BundleType, PassThrough,   256,     1,    32,    32,         5,         S<1, 32,  8>,                S<0, 1, 2>,         2,         1,               4,               1>;
Po-Yen, Chen's avatar
Po-Yen, Chen committed
18
19
// clang-format on

20
#include "run_permute_bundle_example.inc"
Po-Yen, Chen's avatar
Po-Yen, Chen committed
21

Po-Yen, Chen's avatar
Po-Yen, Chen committed
22
int main() { return !run_permute_bundle_example({1, 80, 32000}, {0, 2, 1}); }