mirror of
https://github.com/amd/blis.git
synced 2026-05-13 10:35:38 +00:00
Added Parameter Checks and DTL Trace for Extension APIs
1. Added input parameter checking for the extension APIs 1. gemm_pack_get_size API 2. gemm_pack API 2. Additionally added early returns for these APIs when m or n dimensions are 0. 3. Routines for input parameter check for all the 3 BLAS extension APIs - gemm_pack_get_size, gemm_pack and gemm_compute are defined in: frame/compat/check/bla_gemm_pack_compute_check.h 4. Added AOCL DTL TRACE for all the functions of 1. gemm_pack_get_size 2. gemm_pack 3. gemm_compute AMD-Internal: [CPUPL-3560] Change-Id: I4351b8494d888eae7e7431a7e1e23e442ffc8631
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2023, Advanced Micro Devices, Inc.
|
||||
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
@@ -36,7 +36,7 @@
|
||||
#define BLIS_L3_COMPUTE_DECOR_H
|
||||
|
||||
// Level-3 compute internal function type.
|
||||
typedef err_t (*l3computeint_t)
|
||||
typedef void (*l3computeint_t)
|
||||
(
|
||||
obj_t* a,
|
||||
obj_t* b,
|
||||
@@ -48,7 +48,7 @@ typedef err_t (*l3computeint_t)
|
||||
);
|
||||
|
||||
// Level-3 compute thread decorator prototype.
|
||||
err_t bli_l3_compute_thread_decorator
|
||||
void bli_l3_compute_thread_decorator
|
||||
(
|
||||
l3computeint_t func,
|
||||
opid_t family,
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
void* bli_l3_compute_thread_entry( void* data_void ) { return NULL; }
|
||||
|
||||
err_t bli_l3_compute_thread_decorator
|
||||
void bli_l3_compute_thread_decorator
|
||||
(
|
||||
l3computeint_t func,
|
||||
opid_t family,
|
||||
@@ -50,6 +50,8 @@ err_t bli_l3_compute_thread_decorator
|
||||
rntm_t* rntm
|
||||
)
|
||||
{
|
||||
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_3);
|
||||
|
||||
// Query the total number of threads from the rntm_t object.
|
||||
const dim_t n_threads = bli_rntm_num_threads( rntm );
|
||||
|
||||
@@ -123,7 +125,8 @@ err_t bli_l3_compute_thread_decorator
|
||||
// mutual exclusion.
|
||||
bli_sba_checkin_array( array );
|
||||
|
||||
return BLIS_SUCCESS;
|
||||
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_3);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#if !defined (BLIS_ENABLE_MULTITHREADING) || defined (BLIS_ENABLE_PTHREADS)
|
||||
|
||||
err_t bli_l3_compute_thread_decorator
|
||||
void bli_l3_compute_thread_decorator
|
||||
(
|
||||
l3computeint_t func,
|
||||
opid_t family,
|
||||
@@ -48,6 +48,8 @@ err_t bli_l3_compute_thread_decorator
|
||||
rntm_t* rntm
|
||||
)
|
||||
{
|
||||
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_3);
|
||||
|
||||
const dim_t n_threads = 1;
|
||||
array_t* restrict array = bli_sba_checkout_array( n_threads );
|
||||
bli_sba_rntm_set_pool( 0, array, rntm );
|
||||
@@ -81,7 +83,8 @@ err_t bli_l3_compute_thread_decorator
|
||||
|
||||
bli_sba_checkin_array( array );
|
||||
|
||||
return BLIS_SUCCESS;
|
||||
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_3);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -49,6 +49,8 @@ void bli_pack_full_thread_decorator
|
||||
rntm_t* rntm
|
||||
)
|
||||
{
|
||||
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_3);
|
||||
|
||||
dim_t n_threads = bli_rntm_num_threads( rntm );
|
||||
|
||||
/* Ensure n_threads is always greater than or equal to 1 */
|
||||
@@ -76,6 +78,8 @@ void bli_pack_full_thread_decorator
|
||||
&thread
|
||||
);
|
||||
}
|
||||
|
||||
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_3);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ void bli_pack_full_thread_decorator
|
||||
rntm_t* rntm
|
||||
)
|
||||
{
|
||||
AOCL_DTL_TRACE_ENTRY(AOCL_DTL_LEVEL_TRACE_3);
|
||||
|
||||
thrinfo_t thread = BLIS_GEMM_SINGLE_THREADED;
|
||||
|
||||
{
|
||||
@@ -66,6 +68,8 @@ void bli_pack_full_thread_decorator
|
||||
);
|
||||
}
|
||||
|
||||
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_3);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user