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

#include "common.hpp"

using ADataType = F64;
using BDataType = F64;

// clang-format off
using DevicePermuteInstance = ck::tensor_operation::device::DevicePermute
11
12
13
14
// ######|    InData|   OutData| Elementwise| NumDim| 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|
// ######|          |          |            |       |      |      |      |      |          |                     |                          |          |          |                |                |
// ######|          |          |            |       |      |      |      |      |          |                     |                          |          |          |                |                |
15
         < ADataType, BDataType, PassThrough,      3,   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
16
17
18
// clang-format on

#define NUM_ELEMS_IN_BUNDLE 4
19
20
static_assert(std::is_same_v<detail::get_bundled_t<F64, NUM_ELEMS_IN_BUNDLE>, F16>);

Po-Yen, Chen's avatar
Po-Yen, Chen committed
21
22
#include "run_permute_example.inc"

23
24
int main(int argc, char* argv[])
{
Po-Yen, Chen's avatar
Po-Yen, Chen committed
25
    return !run_permute_example(argc, argv, {1, 80, 16000}, {0, 2, 1});
26
}