co-authored by
Aniket Shivam
parent
9b8166e3f0
commit
d572cc1aab
+29
-14
@@ -379,7 +379,10 @@ Status Handle::gemm(
|
||||
element_B,
|
||||
layout_B,
|
||||
transform_B,
|
||||
element_C
|
||||
element_C, // C/D are same type and col major default
|
||||
LayoutTypeID::kColumnMajor,
|
||||
element_C,
|
||||
LayoutTypeID::kColumnMajor
|
||||
);
|
||||
|
||||
auto operators_it = Singleton::get().operation_table.gemm_operations.find(key);
|
||||
@@ -498,26 +501,26 @@ Status Handle::gemm_universal(
|
||||
NumericTypeID element_A, /// Data type of A matrix elements
|
||||
LayoutTypeID layout_A, /// Layout of A matrix
|
||||
ComplexTransform transform_A, /// Complex transformation applied to A matrix - ignored for real-valued matrices
|
||||
|
||||
void const * ptr_A, /// Pointer to A matrix in Global Memory
|
||||
int64_t lda, /// Leading dimension of A matrix
|
||||
int64_t lda, /// Leading dimension of A matrix
|
||||
|
||||
NumericTypeID element_B, /// Data type of B matrix elements
|
||||
LayoutTypeID layout_B, /// Layout of B matrix
|
||||
ComplexTransform transform_B, /// Complex transformation applied to B matrix - ignored for real-valued matrices
|
||||
|
||||
void const * ptr_B, /// Pointer to B matrix in Global Memory
|
||||
int64_t ldb, /// Leading dimension of B matrix
|
||||
int64_t ldb, /// Leading dimension of B matrix
|
||||
|
||||
void const * beta, /// Pointer to beta scalar
|
||||
|
||||
NumericTypeID element_C, /// Data type of C and D matrices
|
||||
|
||||
NumericTypeID element_C, /// Data type of C matrix
|
||||
LayoutTypeID layout_C, /// Layout of D matrix
|
||||
void const * ptr_C, /// Pointer to C matrix
|
||||
int64_t ldc, /// Leading dimension of C matrix
|
||||
int64_t ldc, /// Leading dimension of C matrix
|
||||
|
||||
NumericTypeID element_D, /// Data type of D matrix
|
||||
LayoutTypeID layout_D, /// Layout of D matrix
|
||||
void * ptr_D, /// Pointer to D matrix
|
||||
int64_t ldd, /// Leading dimension of D matrix
|
||||
int64_t ldd, /// Leading dimension of D matrix
|
||||
|
||||
int batch_count, /// Batch count or number of split-K slices
|
||||
|
||||
@@ -542,7 +545,10 @@ Status Handle::gemm_universal(
|
||||
element_B,
|
||||
layout_B,
|
||||
transform_B,
|
||||
element_C
|
||||
element_C,
|
||||
layout_C,
|
||||
element_D,
|
||||
layout_D
|
||||
);
|
||||
|
||||
auto operators_it = Singleton::get().operation_table.gemm_operations.find(key);
|
||||
@@ -741,7 +747,10 @@ Status Handle::gemm_planar_complex(
|
||||
element_B,
|
||||
layout_B,
|
||||
transform_B,
|
||||
element_C
|
||||
element_C, // C/D are same type
|
||||
LayoutTypeID::kColumnMajor,
|
||||
element_C,
|
||||
LayoutTypeID::kColumnMajor
|
||||
);
|
||||
|
||||
auto operators_it = Singleton::get().operation_table.gemm_operations.find(key);
|
||||
@@ -935,7 +944,10 @@ Status Handle::gemm_planar_complex_array(
|
||||
element_B,
|
||||
layout_B,
|
||||
transform_B,
|
||||
element_C
|
||||
element_C, // C/D are same type
|
||||
LayoutTypeID::kColumnMajor,
|
||||
element_C,
|
||||
LayoutTypeID::kColumnMajor
|
||||
);
|
||||
|
||||
auto operators_it = Singleton::get().operation_table.gemm_operations.find(key);
|
||||
@@ -1121,7 +1133,7 @@ Operation const* find_gemm_operation_for_parallel_reduction(Operation const *ope
|
||||
static_cast<GemmDescription const &>(operation->description());
|
||||
|
||||
// if the curren gemm operation accumulator and output data type match return operation
|
||||
if(gemm_desc.tile_description.math_instruction.element_accumulator == gemm_desc.C.element) {
|
||||
if(gemm_desc.tile_description.math_instruction.element_accumulator == gemm_desc.D.element) {
|
||||
return operation;
|
||||
}
|
||||
|
||||
@@ -1137,7 +1149,10 @@ Operation const* find_gemm_operation_for_parallel_reduction(Operation const *ope
|
||||
gemm_desc.B.element,
|
||||
gemm_desc.B.layout,
|
||||
gemm_desc.transform_B,
|
||||
gemm_desc.tile_description.math_instruction.element_accumulator);
|
||||
gemm_desc.tile_description.math_instruction.element_accumulator, // C/D are same type
|
||||
LayoutTypeID::kColumnMajor,
|
||||
gemm_desc.tile_description.math_instruction.element_accumulator,
|
||||
LayoutTypeID::kColumnMajor);
|
||||
|
||||
// gemm operation table
|
||||
auto gemm_operations = Singleton::get().operation_table.gemm_operations;
|
||||
|
||||
Reference in New Issue
Block a user