Hi,
I am running MAGMA and I am getting much worse performance than cuBLAS.
Can you tell me what changes to make to improve the performance of MAGMA..
Here is the snapshot of the results that I am getting out of SGEMM
% MAGMA 2.0.2 compiled for CUDA capability >= 2.0, 32-bit magma_int_t, 64-bit pointer.
% CUDA runtime 7000, driver 7050. ndevices 1
OpenMP threads 1.
% device 0: Tesla K20Xm, 732.0 MHz clock, 5759.6 MB memory, capability 3.5
% Fri Oct 21 14:02:16 2016
% Usage: testing_sgemm [options] [-h|--help]
% If running lapack (option --lapack), MAGMA and cuBLAS error are both computed
% relative to CPU BLAS result. Else, MAGMA error is computed relative to cuBLAS result.
% transA = No transpose, transB = No transpose
% M N K MAGMA Gflop/s (ms) cuBLAS Gflop/s (ms) CPU Gflop/s (ms) MAGMA error cuBLAS error
%========================================================================================================
1088 1088 1088 808.73 ( 3.19) 1692.59 ( 1.52) --- ( --- ) 4.42e-08 --- ok
2112 2112 2112 1106.56 ( 17.03) 2464.57 ( 7.64) --- ( --- ) 4.99e-08 --- ok
3136 3136 3136 1133.09 ( 54.44) 2696.72 ( 22.87) --- ( --- ) 3.18e-08 --- ok
4160 4160 4160 1128.75 ( 127.56) 2779.53 ( 51.80) --- ( --- ) 4.69e-08 --- ok
Thanks & Regards,
MAGMA Performance...
Re: MAGMA Performance...
This is expected. The MAGMABLAS gemm was written some 6 years ago for the Fermi architecture. It was later incorporated into cuBLAS, and NVIDIA has continued to optimize it for subsequent architectures like Kepler, using hand-coded assembly optimizations.
All of the higher-level MAGMA routines (getrf, potrf, etc.) use cuBLAS gemm.
The MAGMABLAS gemm is kept for historical reasons as an open source implementation, but code should use the vendor supplied cuBLAS gemm. (Note magma_dgemm is a wrapper around cuBLAS gemm, while magmablas_dgemm is our implementation.)
-mark
All of the higher-level MAGMA routines (getrf, potrf, etc.) use cuBLAS gemm.
The MAGMABLAS gemm is kept for historical reasons as an open source implementation, but code should use the vendor supplied cuBLAS gemm. (Note magma_dgemm is a wrapper around cuBLAS gemm, while magmablas_dgemm is our implementation.)
-mark