Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kernel/arm64/KERNEL.A64FX
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ DGEMVNKERNEL = gemv_n_sve_v4x3.c
SGEMVTKERNEL = gemv_t_sve_v4x3.c
DGEMVTKERNEL = gemv_t_sve_v4x3.c

DDOTKERNEL = dot_sve_v8.c
SDOTKERNEL = dot_sve_v8.c
DDOTKERNEL = dot.c
SDOTKERNEL = dot.c

SAXPYKERNEL = axpy_sve.c
DAXPYKERNEL = axpy_sve.c
Expand Down
37 changes: 34 additions & 3 deletions kernel/arm64/dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef USE_SVE
#ifdef DOT_KERNEL_SVE
#include DOT_KERNEL_SVE
#elif defined(A64FX)
#include "dot_kernel_sve_v8.c"
#else
#include "dot_kernel_sve.c"
#endif
Expand Down Expand Up @@ -82,14 +84,43 @@ static inline int get_dot_optimal_nthreads_neoversev1(BLASLONG N, int ncpu) {
}
#endif

#if defined(DYNAMIC_ARCH) || defined(A64FX)
static inline int get_dot_optimal_nthreads_a64fx(BLASLONG N, int ncpu) {
#ifdef DOUBLE
return (N <= 11000L) ? 1
: (N <= 20000L) ? MIN(ncpu, 2)
: (N <= 35000L) ? MIN(ncpu, 4)
: (N <= 50000L) ? MIN(ncpu, 6)
: (N <= 440000L) ? MIN(ncpu, 8)
: (N <= 880000L) ? MIN(ncpu, 16)
: (N <= 1020000L) ? MIN(ncpu, 24)
: ncpu;
#else
return (N <= 22000L) ? 1
: (N <= 39000L) ? MIN(ncpu, 2)
: (N <= 79000L) ? MIN(ncpu, 4)
: (N <= 120000L) ? MIN(ncpu, 6)
: (N <= 1020000L) ? MIN(ncpu, 8)
: ncpu;
#endif
}
#endif

static inline int get_dot_optimal_nthreads(BLASLONG n) {
int ncpu = num_cpu_avail(1);

#if defined(NEOVERSEV1) && !defined(COMPLEX) && !defined(BFLOAT16)
#if defined(A64FX) && !defined(COMPLEX) && !defined(BFLOAT16)
return get_dot_optimal_nthreads_a64fx(n, ncpu);
#elif defined(NEOVERSEV1) && !defined(COMPLEX) && !defined(BFLOAT16)
return get_dot_optimal_nthreads_neoversev1(n, ncpu);
#elif defined(DYNAMIC_ARCH) && !defined(COMPLEX) && !defined(BFLOAT16)
if (strcmp(gotoblas_corename(), "neoversev1") == 0) {
return get_dot_optimal_nthreads_neoversev1(n, ncpu);
{
const char *core = gotoblas_corename();
if (strcmp(core, "a64fx") == 0) {
return get_dot_optimal_nthreads_a64fx(n, ncpu);
} else if (strcmp(core, "neoversev1") == 0) {
return get_dot_optimal_nthreads_neoversev1(n, ncpu);
}
}
#endif

Expand Down
34 changes: 0 additions & 34 deletions kernel/arm64/dot_sve_v8.c

This file was deleted.

Loading