mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-19 12:30:16 +00:00
Modularize ckProfiler operations (#514)
* Re-structure ckProfiler source files
* Rename profiler.cpp to main.cpp
* Modularize ckProfiler operations
* Add description for profiler operations
* Use longer name to avoid name collision
* Use macro to delay expansion
* Use std::move() to avoid object copying
* Prohibit users from calling dtor
* Use macro to eliminate redundant code
* Make friend function hidden
* Add missing include directive <iostream>
* Fix wrong include directives
* Remove int8 from batchnorm-forward instances since it is not needed for forward training and could fail test
Co-authored-by: Qianfeng Zhang <Qianfeng.Zhang@amd.com>
[ROCm/composable_kernel commit: 8784a72e23]
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "profiler/include/data_type_enum.hpp"
|
||||
#include "profiler/include/profile_groupnorm_impl.hpp"
|
||||
#include "profiler/data_type_enum.hpp"
|
||||
#include "profiler/profile_groupnorm_impl.hpp"
|
||||
#include "profiler_operation_registry.hpp"
|
||||
|
||||
using ck::index_t;
|
||||
|
||||
@@ -43,9 +44,12 @@ struct GroupnormArgParser
|
||||
}
|
||||
};
|
||||
|
||||
#define OP_NAME "groupnorm"
|
||||
#define OP_DESC "Group Normalization"
|
||||
|
||||
void print_help_groupnorm()
|
||||
{
|
||||
std::cout << "arg1: tensor operation (groupnorm: Group normalization)\n"
|
||||
std::cout << "arg1: tensor operation (" OP_NAME ": " OP_DESC ")\n"
|
||||
<< "arg2: data type (0: fp16; 1: fp32)\n"
|
||||
<< "arg3: verification (0: no; 1: yes)\n"
|
||||
<< "arg4: initialization (0: no init; 1: integer value; 2: decimal value)\n"
|
||||
@@ -104,3 +108,5 @@ int profile_groupnorm(int argc, char* argv[])
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
REGISTER_PROFILER_OPERATION(OP_NAME, OP_DESC, profile_groupnorm);
|
||||
|
||||
Reference in New Issue
Block a user