Support parallel split K mode for porfiling (#277)

* Support parallel split K mode for porfiling

Signed-off-by: Peter Han <fujun.han@iluvatar.ai>

* Parallel Split K support

  1. find gemm kernel by preference key
  2. switch m n for redution kernel

Signed-off-by: Peter Han <fujun.han@iluvatar.ai>

* parallel splitk for fp16 gemm

* add one missing file

Co-authored-by: Haicheng Wu <haichengw@nvidia.com>
This commit is contained in:
Fujun Han
2022-01-27 10:37:37 -05:00
committed by GitHub
co-authored by Haicheng Wu
parent c3353add63
commit 1e4703cbab
13 changed files with 332 additions and 40 deletions
+20 -7
View File
@@ -1,5 +1,5 @@
/***************************************************************************************************
* Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
@@ -242,7 +242,8 @@ public:
/// Gets the device-side workspace
virtual uint64_t get_device_workspace_size(
void const *configuration_ptr) const {
void const *configuration_ptr,
void const *arguments_ptr = nullptr) const {
OperatorArguments args;
@@ -443,7 +444,8 @@ public:
/// Gets the device-side workspace
virtual uint64_t get_device_workspace_size(
void const *configuration_ptr) const {
void const *configuration_ptr,
void const *arguments_ptr = nullptr) const {
OperatorArguments args;
@@ -569,7 +571,7 @@ protected:
operator_args.ldb = (configuration->ldb);
operator_args.ldc = (configuration->ldc);
operator_args.ldd = (configuration->ldd);
return Status::kSuccess;
}
@@ -649,7 +651,8 @@ public:
/// Gets the device-side workspace
virtual uint64_t get_device_workspace_size(
void const *configuration_ptr) const {
void const *configuration_ptr,
void const *arguments_ptr) const {
OperatorArguments args;
@@ -661,6 +664,14 @@ public:
return 0;
}
status = update_arguments_(
args,
static_cast<GemmUniversalArguments const *>(arguments_ptr));
if (status != Status::kSuccess) {
return 0;
}
uint64_t size = Operator::get_workspace_size(args);
return size;
@@ -855,7 +866,8 @@ public:
/// Gets the device-side workspace
virtual uint64_t get_device_workspace_size(
void const *configuration_ptr) const {
void const *configuration_ptr,
void const *arguments_ptr = nullptr) const {
OperatorArguments args;
@@ -1055,7 +1067,8 @@ public:
/// Gets the device-side workspace
virtual uint64_t get_device_workspace_size(
void const *configuration_ptr) const {
void const *configuration_ptr,
void const *arguments_ptr = nullptr) const {
OperatorArguments args;