mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-19 14:29:05 +00:00
* chore(copyright): update copyright header for codegen directory * chore(copyright): update copyright header for example directory
40 lines
1.7 KiB
C++
40 lines
1.7 KiB
C++
// Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#include "common.hpp"
|
|
|
|
using InDataType = F16;
|
|
using OutDataType = F16;
|
|
|
|
// clang-format off
|
|
using DevicePermuteInstance = ck::tensor_operation::device::DevicePermuteImpl
|
|
// ######| 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, InDataType, OutDataType, PassThrough, 128, 4, 16, 8, 6, S<2, 16, 4>, S<0, 1, 2>, 2, 1, 2, 1>;
|
|
// clang-format on
|
|
|
|
#include "run_permute_element_example.inc"
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
bool time_kernel = false;
|
|
|
|
if(argc == 1)
|
|
{
|
|
// use default
|
|
}
|
|
else if(argc == 2)
|
|
{
|
|
time_kernel = std::stoi(argv[1]);
|
|
}
|
|
else
|
|
{
|
|
printf("arg1: time kernel (0=no, 1=yes, default=0)\n");
|
|
exit(0);
|
|
}
|
|
|
|
return !run_permute_element_example({121, 768, 80}, {0, 2, 1}, time_kernel);
|
|
}
|