Compare commits

..

1242 Commits

Author SHA1 Message Date
Martin Kroeker
efe42481e2 Update version to 0.3.18 2021-10-02 19:38:09 +02:00
Martin Kroeker
c75759876c Merge pull request #3394 from xianyi/develop
Merge from develop for 0.3.18
2021-10-02 19:35:27 +02:00
Martin Kroeker
9549167357 Merge branch 'release-0.3.0' into develop 2021-10-02 19:35:03 +02:00
Martin Kroeker
686e1f0052 Update version to 0.3.18 2021-10-02 19:29:59 +02:00
Martin Kroeker
5a468ae87a Update Changelog for 0.3.18 (#3388)
* Update Changelog for 0.3.18
2021-10-02 19:25:58 +02:00
Martin Kroeker
f0e8560660 Merge pull request #3393 from martin-frbg/azurealpine
Update Alpine version used in Azure CI
2021-10-02 19:07:04 +02:00
Martin Kroeker
ad87d62748 Update Alpine version 2021-10-02 16:27:34 +02:00
Martin Kroeker
4f86650979 Merge pull request #3392 from martin-frbg/lapack625
Fix out of bounds read in ?llarv (Reference-LAPACK PR 625)
2021-10-01 14:56:09 +02:00
Martin Kroeker
337b65133d Fix out of bounds read in ?llarv (Reference-LAPACK PR 625) 2021-10-01 11:19:53 +02:00
Martin Kroeker
ddb0ff5353 Fix out of bounds read in ?llarv (Reference-LAPACK PR 625) 2021-10-01 11:19:07 +02:00
Martin Kroeker
fe497efa05 Fix out of bounds read in ?llarv (Reference-LAPACK PR 625) 2021-10-01 11:18:20 +02:00
Martin Kroeker
2be5ee3cca Fix out of bounds read in ?llarv (Reference-LAPACK PR 625) 2021-10-01 11:17:21 +02:00
Martin Kroeker
c34e63ff2f Merge pull request #3390 from Keno/patch-4
Make sure that Netlib LAPACK respects FFLAGS
2021-10-01 09:11:12 +02:00
Keno Fischer
2d33e12a11 Make sure that Netlib LAPACK respects FFLAGS
OpenBLAS allows users to specify `FFLAGS` and then uses `override` to append additional
options. However, without such an override in lapack's make.inc, lapack would use the external
FFLAGS, rather than the ones being computed by OpenBLAS. For example the `DEBUG=1` flag
would not apply to LAPACK code. This is all a bit messy but forced by the integration with netlib
lapack. Note that `CFLAGS` already has this override for the same reason. It is possible that
other variables here should have a similar override, but I think for most of the other ones, OpenBLAS's
build system does not append to the flags passed in by the user.
2021-09-30 03:14:15 -04:00
Martin Kroeker
240555033b Merge pull request #3389 from guowangy/bf16-build-warn-fix
x86_64: BFLOAT16: fix build warning
2021-09-28 19:44:36 +02:00
Wangyang Guo
ee5ca8a328 x86_64: BFLOAT16: fix build warning 2021-09-28 18:30:06 +08:00
Martin Kroeker
9f52abf12c Merge pull request #3387 from commodo/adjust-mips-el-archs
Makefile.system: adjust mipsel/mips64el ARCH variables
2021-09-26 14:16:50 +02:00
Alexandru Ardelean
b7bb2e36b8 Makefile.system: adjust mipsel/mips64el ARCH variables
When building for MIPS{64} little-endian variants, the included makefiles
should be the same as for the big-endian.

There are already some adjustments being done for some ARCH names.
This change adds the ones for the `mipsel` and `mips64el` names, so that
the Makefile.mips{64} files get included.

This comes as a result of: https://github.com/openwrt/packages/issues/16649

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2021-09-26 12:20:16 +03:00
Martin Kroeker
e76ff6a44e Merge pull request #3385 from martin-frbg/update_readme
Update README.md
2021-09-19 18:16:02 +02:00
Martin Kroeker
5c537a5de0 Update README.md 2021-09-19 14:54:35 +02:00
Martin Kroeker
5edd88c919 Merge pull request #3384 from martin-frbg/issue3383
Modify ARMV8 kernels to leave x18 unused as it is reserved on OSX
2021-09-17 14:53:39 +02:00
Martin Kroeker
90cc944625 Move alphaI to x22 to leave x18 unused (reserved on OSX) 2021-09-17 09:53:18 +02:00
Martin Kroeker
590fbff06e move alpha to x19/x20 to leave x18 unused for OSX 2021-09-17 09:42:17 +02:00
Martin Kroeker
380940271b Move temp to x21 to leave x18 unused (reserved on OSX) 2021-09-17 09:28:19 +02:00
Martin Kroeker
7d75177446 Move temp to x21 to leave x18 unused (reserved on OSX) 2021-09-17 09:24:11 +02:00
Martin Kroeker
0a4ac4b585 Use x21 for I to leave x18 unused (reserved on OSX) 2021-09-17 09:19:51 +02:00
Martin Kroeker
7d4a221579 Remove unused TEMP2 and reshuffle to leave x18 unused (reserved on OSX) 2021-09-17 09:18:25 +02:00
Martin Kroeker
d3a9c7ef7f Merge pull request #3382 from rafaelcfsousa/rafael/cwarnings
[POWER] Remove unused variable warnings.
2021-09-17 09:15:16 +02:00
Martin Kroeker
72c26f4f7f Merge pull request #3381 from martin-frbg/issue3371
Silence compiler warnings about uninitialized variables
2021-09-16 07:14:49 +02:00
Rafael Cardoso Fernandes Sousa
0e8b4adf22 Remove unused commented code (#if directive) 2021-09-15 22:18:48 +00:00
Martin Kroeker
8dfa61a61c Initialize abs_mask1 with itself to silence a gcc warning 2021-09-15 22:11:35 +02:00
Martin Kroeker
99aa10b3ff Initialize abs_mask1 with itself to silence a gcc warning
actual initialization is via the _mm_cmpeq_ep18, which I've seen claimed to be the fastest way to set an xmm register to all 1s
2021-09-15 22:10:43 +02:00
Rafael Cardoso Fernandes Sousa
b751edf624 Fix unused variable warnings on Power 2021-09-15 13:36:07 -05:00
Martin Kroeker
fa8bf57768 Merge pull request #3380 from martin-frbg/structwarn
Remove extraneous qualifiers from struct definition
2021-09-15 07:19:09 +02:00
Martin Kroeker
80346b8813 Merge pull request #3379 from martin-frbg/issue3369-2
Add casts to fix compiler warnings for SkylakeX sasum/dasum
2021-09-15 07:18:57 +02:00
Martin Kroeker
13182b2801 Merge pull request #3378 from martin-frbg/issue3368-2
Rework generation of BFLOAT16 objects in CMAKE builds and fix missing CBLAS_XERBLA
2021-09-15 07:18:38 +02:00
Martin Kroeker
dd09f0173e Remove extraneous qualifiers from struct definition 2021-09-14 21:52:26 +02:00
Martin Kroeker
ce036a2fc0 Add casts 2021-09-14 21:41:53 +02:00
Martin Kroeker
ddf106f769 Add dedicated entries for BFLOAT16 kernels 2021-09-14 16:17:18 +02:00
Martin Kroeker
c35739db5e Add separate entries for BFLOAT16 functions and fix missing cblas_xerbla 2021-09-14 16:15:57 +02:00
Martin Kroeker
2f8220d757 Add sbgemm 2021-09-14 16:14:43 +02:00
Martin Kroeker
5f6a609253 Add sbgemv 2021-09-14 16:13:57 +02:00
Martin Kroeker
e02df9fc55 Propagate BUILD_BFLOAT16 to CFLAGS 2021-09-14 16:12:27 +02:00
Martin Kroeker
1c0a8a714a Add defaults for SBGEMV kernels 2021-09-14 16:10:58 +02:00
Martin Kroeker
5e4f1e3677 Remove BFLOAT16 from the task list of GenerateNamedObject 2021-09-14 16:09:46 +02:00
Martin Kroeker
af8843875a Merge pull request #3376 from martin-frbg/issue3370
Fix a few harmless compiler warnings
2021-09-12 00:01:31 +02:00
Martin Kroeker
d1ee2e9c7d Merge pull request #3375 from martin-frbg/issue3369
Add casts to eliminate compiler warnings for Haswell sasum/dasum
2021-09-12 00:01:20 +02:00
Martin Kroeker
0925dfe2c9 One instance of kernel_4x1 is used even on SKX 2021-09-11 15:30:19 +02:00
Martin Kroeker
1085775bc6 really remove the unused variable 2021-09-11 15:05:55 +02:00
Martin Kroeker
7d873a329f Add ifdefs around conditionally used functions 2021-09-11 14:38:47 +02:00
Martin Kroeker
ef24712030 Move a conditionally used variable 2021-09-11 14:37:44 +02:00
Martin Kroeker
20581bf303 Remove unused variable 2021-09-11 14:36:27 +02:00
Martin Kroeker
d17238599b Add casts 2021-09-11 13:38:28 +02:00
Martin Kroeker
3e8c448696 Merge pull request #3367 from RajalakshmiSR/makesyntax
POWER: Fixing syntax error in makefile
2021-09-08 20:19:39 +02:00
Rajalakshmi Srinivasaraghavan
7f4aa106f2 Fixing syntax error in makefile
Fixing syntax issue in Makefile.power added by recent commit
af19cda65a
2021-09-08 07:04:13 -05:00
Martin Kroeker
a6ed4f0d37 Merge pull request #3366 from martin-frbg/azure-ubuntu
migrate Azure CI jobs from deprecated ubuntu-16.04 vmImage
2021-09-08 13:57:35 +02:00
Martin Kroeker
b858e65476 migrate from deprecated ubuntu-16.04 vmImage 2021-09-08 10:51:59 +02:00
Martin Kroeker
d3d6601727 Merge pull request #3365 from martin-frbg/travis-lx
Disable the remaining x86_64 job on Travis
2021-09-07 16:24:33 +02:00
Martin Kroeker
da5bd8b5e3 Merge pull request #3364 from guowangy/bf16-cooperlake
Add SBGEMM kernel for Cooperlake
2021-09-07 13:57:40 +02:00
Wangyang Guo
045ed5c91d sbgemm: fix build error in BFLOAT16 disabled 2021-09-07 23:37:08 +08:00
Wangyang Guo
4289cf048d sbgemm: avoid falling into SGEMM_KERNEL_DIRECT 2021-09-07 21:30:46 +08:00
Wangyang Guo
59a1114d03 sbgemm: cooperlake: tuning for small matrix 2021-09-07 21:30:46 +08:00
Wangyang Guo
682d66555d sbgemm: cooperlake: implement ncopy_16 2021-09-07 21:30:46 +08:00
Wangyang Guo
beccb83b16 sbgemm: cooperlake: add n24 kernel for tcopy_4 2021-09-07 21:30:46 +08:00
Wangyang Guo
5fcacad32b sbgemm: cooperlake: implement tcopy_4 2021-09-07 21:30:46 +08:00
Wangyang Guo
bb1c4fa5bd sbgemm: cooperlake: prefetch A & B 2021-09-07 21:30:46 +08:00
Wangyang Guo
7a2d1601ec sbgemm: cooperlake: unroll core loop by 2 2021-09-07 21:30:46 +08:00
Wangyang Guo
45fdf951b6 sbgemm: cooperlake: reorder ptr increase for performance 2021-09-07 21:30:46 +08:00
Wangyang Guo
cece3541ab sbgemm: cooperlake: fix bug in m64n12 2021-09-07 21:30:46 +08:00
Wangyang Guo
8356a604f0 sbgemm: cooperlake: tuning for block params 2021-09-07 21:30:46 +08:00
Wangyang Guo
9df0953cde sbgemm: cooperlake: kernel works for NN 2021-09-07 21:30:45 +08:00
Wangyang Guo
2ec9f3a8aa sbgemm: cooperlake: change kernel size to 16x4 2021-09-07 21:30:45 +08:00
Wangyang Guo
ef8f5fecc8 sbgemm: cooperlake: implement sbgemm_tcopy_32 2021-09-07 21:30:45 +08:00
Wangyang Guo
4c294336e6 sbgemm: cooperlake: add dummy source files 2021-09-07 21:30:45 +08:00
Martin Kroeker
8c68b6f26d Update .travis.yml 2021-09-07 11:40:40 +02:00
Martin Kroeker
349fb4910b Disable the remaining x86_64 job on Travis 2021-09-07 11:19:51 +02:00
Martin Kroeker
7c72c45be6 Merge pull request #3363 from martin-frbg/fixpr3360
Correct misplaced ifdef lines from PR 3360
2021-09-07 08:02:53 +02:00
Martin Kroeker
32fee86033 Correct misplaced ifdef lines 2021-09-06 23:44:20 +02:00
Martin Kroeker
72f3ce5f08 Add NO_AVX=1 fallbacks to newer generation x86_64 for completeness (#3360)
* Add NO_AVX=1 fallbacks to newer generation x86_64 for completeness

* Update .travis.yml
2021-09-05 20:35:48 +02:00
Martin Kroeker
af19cda65a Add "recursive" option for IBM xlf compiler (#3359)
* Add correct "recursive" option for xlf (from reference-lapack issue 606)
2021-09-04 18:26:59 +02:00
Martin Kroeker
a3e80069fb Merge pull request #3355 from martin-frbg/smallgemmcr
Add workaround for Windows10 macro name clash in small gemm kernel build rules
2021-09-02 00:27:23 +02:00
Martin Kroeker
f1e3305974 Add workaround for Windows10 macro name clash 2021-09-01 21:36:50 +02:00
Martin Kroeker
3cdfe33610 Merge pull request #3352 from martin-frbg/3321-2n
Allocate an auxiliary struct when running out of preconfigured threads
2021-09-01 13:52:40 +02:00
Martin Kroeker
47171e4b93 Merge pull request #3354 from nsait-linaro/fix_gmemm_align_win_arm
[win/arm64]: Explicit casting for GEMM_DEFAULT_ALIGN to create 64-bit value
2021-08-31 21:47:21 +02:00
Niyas Sait
7cddbf99b1 Make explicit conversion condition on _WIN64 flag 2021-08-31 14:36:44 +01:00
Niyas Sait
d1ed72fa87 [win/arm64]: Explicit casting for GMEMM_DEFAULT_ALIGN to create 64-bit value
Win64 uses LLP64 datamodel and unsigned long is only 32-bit. For 64-bit
architecture we need 64-bit mask to correctly generate address
2021-08-31 11:56:10 +01:00
Martin Kroeker
806221440b Merge pull request #3353 from guowangy/bf16-small-matrix-cooperlake
Enable existing SBGEMM kernel for Cooperlake by small-matrix path
2021-08-30 20:39:51 +02:00
Martin Kroeker
cd10d1c03b Fix typo 2021-08-30 14:38:28 +02:00
Martin Kroeker
2db1a99aca Clean up debug messages 2021-08-30 14:21:25 +02:00
Wangyang Guo
619588fbab sbgemm: remove unnecessary b0 files 2021-08-30 17:55:01 +08:00
Wangyang Guo
f39301935c sbgemm: cooperlake: make sure hot buffer aligned to 64 2021-08-30 17:40:30 +08:00
Wangyang Guo
2e44ca0136 sbgemm: add missing cblas_sbgemm definition 2021-08-30 17:40:30 +08:00
Wangyang Guo
7d27b182fc sbgemm: cooperlake: enable SBGEMM by small matrix path 2021-08-30 17:40:30 +08:00
Wangyang Guo
1d83ca4bca Small Matrix: support BFLOAT16 data type 2021-08-30 17:40:20 +08:00
Martin Kroeker
bec9d9f63d Merge pull request #3335 from guowangy/small-matrix-latest
Add GEMM optimization for small matrix and single/double kernel for skylakex
2021-08-29 22:33:33 +02:00
Martin Kroeker
89fc5b8f4f Fix unmap logic 2021-08-29 19:50:24 +02:00
Martin Kroeker
7fd12a5e69 Add likely() hints for gcc 2021-08-29 13:54:51 +02:00
Martin Kroeker
2ba9a567aa Fix typo 2021-08-28 17:14:59 +02:00
Martin Kroeker
b4b952eece Add auxiliary tracking space for thread buffer frees too 2021-08-28 17:03:53 +02:00
Martin Kroeker
7d1becc575 Allocate an auxiliary struct when running out of preconfigured threads 2021-08-28 14:18:36 +02:00
Martin Kroeker
6bb1805ed6 Merge pull request #3348 from guowangy/skylakex-sgemv_t-fix
skylakex sgemv_t kernel fix
2021-08-25 22:43:45 +02:00
Martin Kroeker
0f0a0be95d Merge pull request #3345 from nsait-linaro/windows_on_arm64
Add support for windows/arm64 targets with clang
2021-08-25 15:49:55 +02:00
Wangyang Guo
dbbb39199f sgemv: skylakex: fix build warning 2021-08-25 07:13:00 +00:00
Wangyang Guo
e9acb46431 sgemv: skylakex: bug fix for sgemv_t kernel in corner case 2021-08-25 07:07:27 +00:00
Niyas Sait
c6c2a71fb7 Fix ctest.h to build using clang on windows 2021-08-16 11:25:07 +01:00
Niyas Sait
cdb5d2737e add support for building on windows/arm64 target 2021-08-16 11:22:51 +01:00
Martin Kroeker
13d411677f Add more OSX build jobs to Azure CI (#3338)
* Add OSX build job with Homebrew OpenMP in a CMAKE build
* Check install step on OSX/gcc to make sure all include files are generated and installed as intended
* Add mixed clang/gfortran build with cmake on OSX
* move IOS ARMV7/ARMV8 crossbuilds from travis to azure
2021-08-15 00:17:23 +02:00
Wangyang Guo
f9dba63c28 Small Matrix: skylakex: remove unnecessary b0 source files 2021-08-13 03:28:44 +00:00
Wangyang Guo
989e6bbdd3 Small Matrix: reduce generic kernel source files 2021-08-13 03:17:38 +00:00
Martin Kroeker
04255be948 Merge pull request #3344 from gxw-loongson/develop
Delete the macro instruction "li" and use "li.d" instead
2021-08-12 15:16:46 +02:00
gxw
a7bc8ec1f1 Delete the macro instruction "li" and use "li.d" instead
Change-Id: Icff7981e2eb7df29ba5af1f8eb5be8443c67450f
2021-08-12 17:02:54 +08:00
Martin Kroeker
8cd2b32fef Merge pull request #3343 from cianciosa/develop
Fix undefined behavior checking the size of ARGC
2021-08-12 01:28:18 +02:00
cianciosa
4c766cd11f Fix a small syntax error. A ( was accidently deleted. 2021-08-11 12:08:34 -04:00
cianciosa
c28560129f Check the total number of arguments passed insead of if the ARGV# is defined. This fixes a problem when compling openblas as a subproject of another code. 2021-08-11 12:00:07 -04:00
Martin Kroeker
b9e4fb206d Merge pull request #3341 from RajalakshmiSR/dasump10
POWER10: Improving dasum performance
2021-08-11 09:39:10 +02:00
Rajalakshmi Srinivasaraghavan
b06880c2cd POWER10: Improving dasum performance
Unrolling a loop in dasum micro code to help in improving
POWER10 performance.
2021-08-10 22:06:04 -05:00
Zhang Xianyi
cbc583eb54 Merge pull request #3336 from martin-frbg/traviscom
Disable all x86 jobs on Travis
2021-08-05 19:13:19 +08:00
Martin Kroeker
e5ba7c3235 Disable all x86 jobs 2021-08-05 11:08:18 +02:00
Martin Kroeker
435d84a7ce Merge pull request #3332 from martin-frbg/travisbadge
Update Travis badge in README
2021-08-05 09:36:59 +02:00
Martin Kroeker
139f632ca4 Merge pull request #3334 from Guobing-Chen/BF16_gemm_full_kernel
Add all SBGEMM kernels for IA AVX512-BF16 based platforms
2021-08-05 08:01:13 +02:00
Wangyang Guo
c17d6dacb2 Small Matrix: skip compile in unimplemented data type 2021-08-05 05:46:13 +00:00
Wangyang Guo
44d0032f3b Small Matrix: skylakex: fix build error in old compiler 2021-08-05 04:43:47 +00:00
Chen, Guobing
5d86becdae Add all SBGEMM kernels for IA AVX512-BF16 based platforms
Added all SBGEMM kernels including NN/NT/TN/TT for both ColMajor and
RowMajor, based on AVX512-BF16 ISA set on IA.

Signed-off-by: Chen, Guobing <guobing.chen@intel.com>
2021-08-05 11:11:29 +08:00
Wangyang Guo
76ea8db4da Small Matrix: enable by default for x86_64 arch
If no customized GEMM_SMALL_M_PERMIT kernel defined, it will just by pass to normal path.
2021-08-05 02:59:36 +00:00
Wangyang Guo
aa50185647 Small Matrix: better handle with GEMM3M marco 2021-08-05 02:45:53 +00:00
Wangyang Guo
fee5abd84b Small Matrix: support cmake build 2021-08-04 08:50:15 +00:00
Wangyang Guo
478d1086c1 Small Matrix: support DYNAMIC_ARCH build 2021-08-04 03:12:41 +00:00
Martin Kroeker
93c8bafff5 Update Travis badge in README 2021-08-03 10:45:45 +02:00
Wangyang Guo
6b58bca18b Small Matrix: disable low performance default kernel 2021-08-03 06:49:03 +00:00
Martin Kroeker
b5858c4472 Merge pull request #3330 from xianyi/issue3321
Improve the "tried to allocate too many buffers" error message
2021-08-02 22:36:05 +02:00
Martin Kroeker
898212efcd Actually add the message to the TLS section 2021-08-02 14:50:14 +02:00
Martin Kroeker
210a1584c5 Rebase source and edit TLS version of the message as well 2021-08-02 14:19:16 +02:00
Wangyang Guo
fa777f5517 Small Matrix: skylakex: add DGEMM_SMALL_M_PERMIT and tune for TN kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
8592c21af4 Small Matrix: skylakex: dgemm nn: fix typo in idx load 2021-08-02 07:06:54 +00:00
Wangyang Guo
3e79f6d89a Small Matrix: skylakex: add dgemm tn kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
323d7da4f7 Small Matrix: skylakex: add dgemm tt kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
f57fc932ac Small Matrix: skylakex: add dgemm nt kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
91ec21202b Small Matrix: skylakex: add dgemm nn kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
72e070539c Small Matrix: skylakex: add sgemm tt kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
02c6e764f2 Small Matrix: skylakex: add SGEMM_SMALL_M_PERMIT and tune for TN kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
5dc7c3c8e5 Small Matrix: add GEMM_SMALL_MATRIX_PERMIT to tune small matrics case 2021-08-02 07:06:54 +00:00
Wangyang Guo
642c393879 Small Matrix: skylakex: add sgemm tn kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
ae3f5c737c Small Matrix: skylakex: sgemm nt: optimize for M < 12 2021-08-02 07:06:54 +00:00
Wangyang Guo
0d72d75bf9 Small Matrix: skylakex: add sgemm nt kernel 2021-08-02 07:06:54 +00:00
Wangyang Guo
ca7682e3a3 Small Matrix: skylakex: sgemm nn: fix n6 conflicts with n4 2021-08-02 07:06:54 +00:00
Wangyang Guo
9967e61abb Small Matrix: skylakex: sgemm nn: fix error when beta not zero 2021-08-02 07:06:54 +00:00
Wangyang Guo
a87736346f Small Matrix: skylakex: sgemm nn: add n6 to improve performance 2021-08-02 07:06:54 +00:00
Wangyang Guo
4c9d9940fd Small Matrix: skylakex: sgemm nn: reduce store 4 N at a time 2021-08-02 07:06:54 +00:00
Wangyang Guo
13b32f69b7 Small Matrix: skylakex: sgemm nn: reduce store 4 M at a time 2021-08-02 07:06:54 +00:00
Wangyang Guo
3d8c6d9607 Small Matrix: skylakex: sgemm nn: clean up unused code 2021-08-02 07:06:54 +00:00
Wangyang Guo
49b61a3f30 Small Matrix: skylakex: sgemm_nn: optimize for M <= 8 2021-08-02 07:06:54 +00:00
Wangyang Guo
f88470323b Optimize M < 16 using AVX512 mask 2021-08-02 07:06:54 +00:00
Wangyang Guo
9186456a12 small matrix: SkylakeX: add SGEMM NN kernel 2021-08-02 07:06:54 +00:00
Xianyi Zhang
6022e5629c Refs #2587 fix small matrix c/zgemm bug. 2021-08-02 07:06:54 +00:00
Xianyi Zhang
57ed58cefe Refs #2587 Add small matrix optimization reference kernel for c/zgemm. 2021-08-02 07:06:54 +00:00
Xianyi Zhang
17d32a4a82 Change a1b0 gemm to b0 gemm. 2021-08-02 07:06:54 +00:00
Xianyi Zhang
59cb5de46b Refs #2587 Fix typos. 2021-08-02 07:06:54 +00:00
Xianyi Zhang
4271cfcc6f Fix gemm interface bug for small matrix. 2021-08-02 07:06:51 +00:00
Xianyi Zhang
be3349405d Add alpha=1.0 beta=0.0 for small gemm. 2021-08-02 07:01:47 +00:00
Xianyi Zhang
0a2077901c Add small marix optimization kernel interface.
make SMALL_MATRIX_OPT=1
2021-08-02 07:01:47 +00:00
Martin Kroeker
e6d6d3ee43 Merge pull request #3331 from gxw-loongson/develop
Fixed typos about LOONGARCH64
2021-08-02 07:21:46 +02:00
gxw
0b8f7c8c10 Add cmake support for LOONGARCH64 2021-08-02 10:00:41 +08:00
Martin Kroeker
f2a7a67f5a Improve the "tried to allocate too many buffers" error message 2021-07-31 17:23:40 +02:00
Martin Kroeker
e0e88f9edc Merge pull request #3329 from martin-frbg/issue3272
Work around gcc11+ miscompiling C/ZBLAS3 tests at -O3
2021-07-30 20:39:38 +02:00
Martin Kroeker
5dc6aa74f0 Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 2021-07-30 14:46:19 +02:00
Martin Kroeker
e78fbe4654 Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 2021-07-30 14:44:54 +02:00
Martin Kroeker
b4f4ed378b Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 2021-07-30 14:21:08 +02:00
Martin Kroeker
cbc41973fd Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 2021-07-30 14:20:12 +02:00
gxw
34207bdf5b Fixed typos about LOONGARCH64 2021-07-30 18:11:12 +08:00
Martin Kroeker
1b6db3dbba Merge pull request #3327 from h-vetinari/lapack597_redux
Complete the carry of lapack PR 597
2021-07-28 23:04:02 +02:00
Martin Kroeker
f681553c6a Merge pull request #3326 from wattoc/develop
Include Haiku in processor count checks
2021-07-28 23:03:37 +02:00
Martin Kroeker
afadeeba2a Merge pull request #3325 from gxw-loongson/develop
Add support for LOONGARCH64
2021-07-28 23:03:15 +02:00
Isuru Fernando
02d4a49761 Also make sure the 1 is INTEGER*4 for OMP_SET_NUM_THREADS 2021-07-27 23:44:51 +02:00
Craig Watson
4d7dfe4845 Include Haiku in processor count checks 2021-07-27 09:00:30 +00:00
gxw
af0a69f355 Add support for LOONGARCH64 2021-07-27 15:29:12 +08:00
Martin Kroeker
5a2fe5bfb9 Merge pull request #3323 from martin-frbg/issue3322
GCC did not support -mtune for ARM64 before 5.1
2021-07-23 22:46:02 +02:00
Martin Kroeker
342d3e8b5c Merge pull request #3314 from martin-frbg/lapack597
Fix LAPACK testsuite compatibility with libomp (Reference-LAPACK PR 597)
2021-07-23 15:30:27 +02:00
Martin Kroeker
efbd7c7840 GCC did not support -mtune for ARM64 before 5.1 2021-07-23 13:42:52 +02:00
Martin Kroeker
3a7955cd93 Merge pull request #3320 from martin-frbg/issue3318
Empirical workaround for numpy SVD NaN problem from issue 3318
2021-07-22 21:28:50 +02:00
Martin Kroeker
47ba85f314 Fix regex to match kernels suffixed with cpuname too 2021-07-22 17:24:15 +02:00
Martin Kroeker
30f23be0f9 Rework setting of -mfma to only apply it where necessary 2021-07-22 12:00:03 +02:00
Martin Kroeker
49bbf330ca Empirical workaround for numpy SVD NaN problem from issue 3318 2021-07-18 22:19:19 +02:00
Martin Kroeker
38d5b4b124 Update version to 0.3.17.dev 2021-07-15 15:00:01 +02:00
Martin Kroeker
6e3fbe8ac5 Update version to 0.3.17.dev 2021-07-15 14:59:15 +02:00
Martin Kroeker
86273392e5 Merge pull request #3317 from xianyi/release-0.3.0
merge 0.3.17 back into develop to copy tag
2021-07-15 14:58:20 +02:00
Martin Kroeker
d909f9f3d4 Update version to 0.3.17 2021-07-15 14:52:54 +02:00
Martin Kroeker
12d3d94e2e Merge pull request #3316 from xianyi/develop
Merge develop for bugfix release 0.3.17
2021-07-15 14:51:50 +02:00
Martin Kroeker
f349be3bdb Merge branch 'release-0.3.0' into develop 2021-07-15 14:50:20 +02:00
Martin Kroeker
4777eb678f Update version to 0.3.17 2021-07-15 14:46:24 +02:00
Martin Kroeker
415876d117 Merge pull request #3315 from martin-frbg/changelog0317
Update Changelog for 0.3.17
2021-07-15 14:44:59 +02:00
Martin Kroeker
da8435dc36 Update Changelog for 0.3.17 2021-07-15 14:44:17 +02:00
Martin Kroeker
4c7065f3ee Merge pull request #3313 from martin-frbg/3266-2
Remove BLASLONG casts from SPARC parameter entries
2021-07-15 08:00:57 +02:00
Martin Kroeker
f62bfaafe8 Merge pull request #3312 from martin-frbg/revert_3260
Temporarily disable the SkylakeX sgemv_t microkernel
2021-07-15 08:00:34 +02:00
Martin Kroeker
d947116390 Merge pull request #3311 from martin-frbg/issue3309
Revert PR #3250 (shortcut without buffer allocation) as it is unsafe …
2021-07-15 07:58:47 +02:00
Martin Kroeker
f176ff90af Declare N_THREADS as *4 for compatibility of INTERFACE64 builds with LLVM libomp 2021-07-14 22:42:43 +02:00
Martin Kroeker
f4d4abd423 Declare N_THREADS as *4 for compatibility of INTERFACE64 builds with LLVM libomp 2021-07-14 22:41:45 +02:00
Martin Kroeker
2b9443b7e7 Declare N_THREADS as *4 for compatibility of INTERFACE64 builds with LLVM libomp 2021-07-14 22:40:29 +02:00
Martin Kroeker
fe0e66564e Declare N_THREADS as *4 for compatibility of INTERFACE64 builds with LLVM libomp 2021-07-14 22:39:20 +02:00
Martin Kroeker
a6351e32f0 Remove BLASLONG casts from SPARC entries
in response to https://github.com/xianyi/OpenBLAS/pull/3266#issuecomment-878637675
2021-07-14 21:09:36 +02:00
Martin Kroeker
5b4b385ecf Temporarily disable the SkylakeX sgemv_t microkernel due to LAPACK testsuite failures 2021-07-14 20:50:14 +02:00
Martin Kroeker
1dea57ab25 Revert PR #3250 (shortcut without buffer allocation) as it is unsafe on some x86_64 2021-07-14 20:32:57 +02:00
Martin Kroeker
54ffe280df Merge pull request #3310 from jeromerobert/develop
Avoid redefinition of _GNU_SOURCE
2021-07-14 16:06:13 +02:00
Jerome Robert
029d1e16b9 Avoid redefinition of _GNU_SOURCE
* _GNU_SOURCE may have been set by the application and redefinition
  trigger warnings or error with -Werror
* Fix for 220f6a1c5
2021-07-14 12:21:58 +02:00
Martin Kroeker
ea8e208029 Merge pull request #3306 from jonaszhou1/develop
Add cpu detection support for Zhaoxin processors
2021-07-12 16:30:10 +02:00
JonasZhou
0fca36c8c3 Add cpu detection support for Zhaoxin processors
Signed-off-by: JonasZhou <JonasZhou@zhaoxin.com>
2021-07-12 13:43:45 +08:00
Martin Kroeker
44cc7cdecc Update version to 0.3.16.dev 2021-07-12 00:16:59 +02:00
Martin Kroeker
6492131792 Update version to 0.3.16.dev 2021-07-12 00:16:29 +02:00
Martin Kroeker
6c8ec55fb7 Merge pull request #3305 from xianyi/release-0.3.0
Merge release branch back into develop to copy tag
2021-07-12 00:15:52 +02:00
Martin Kroeker
fab746240c Merge pull request #3304 from xianyi/develop
Merge develop int0 0.3.0 for release 0.3.16
2021-07-12 00:12:52 +02:00
Martin Kroeker
847607c768 Merge branch 'release-0.3.0' into develop 2021-07-12 00:12:25 +02:00
Martin Kroeker
4c81d1c3fe Update version to 0.3.16 2021-07-12 00:09:35 +02:00
Martin Kroeker
db4908ebfa Update version to 0.3.16 2021-07-12 00:08:55 +02:00
Martin Kroeker
ed3eb18cb2 Merge pull request #3303 from martin-frbg/changelog16
Update Changelog for 0.3.16
2021-07-11 23:50:02 +02:00
Martin Kroeker
239ff330f8 Update Changelog for 0.3.16 2021-07-11 23:48:39 +02:00
Martin Kroeker
19c81a07cb Merge pull request #3300 from martin-frbg/AzureAlpine
Move Alpine Linux build job from Travis to Azure
2021-07-11 22:50:20 +02:00
Martin Kroeker
e008646ba9 Merge pull request #3302 from martin-frbg/small_cleanup
Clean up some warnings
2021-07-11 22:26:41 +02:00
Martin Kroeker
498479b13e Update azure-pipelines.yml 2021-07-11 18:29:17 +02:00
Martin Kroeker
b4cbfe6677 Update azure-pipelines.yml 2021-07-11 18:08:30 +02:00
Martin Kroeker
be1a42507c Merge pull request #3297 from outerpassage/develop
fix compilation with musl libc
2021-07-11 17:10:20 +02:00
Martin Kroeker
7bb59fceb7 Clean up some warnings 2021-07-11 16:00:29 +02:00
Martin Kroeker
eba2cd951e Revert addition of test_install 2021-07-11 14:38:49 +02:00
Martin Kroeker
836c7fb9f5 Revert addition of test_install target 2021-07-11 14:37:38 +02:00
Martin Kroeker
d2693eac04 Update azure-pipelines.yml 2021-07-11 11:54:02 +02:00
Martin Kroeker
8acb6fe3a8 Update azure-pipelines.yml 2021-07-11 11:29:52 +02:00
Martin Kroeker
c47e35acee Update azure-pipelines.yml 2021-07-11 09:38:48 +02:00
Martin Kroeker
a27a61bb9a Update azure-pipelines.yml 2021-07-11 08:24:20 +02:00
Martin Kroeker
69560ad3ce Update azure-pipelines.yml 2021-07-11 07:25:07 +02:00
Martin Kroeker
b2319fd97a Merge pull request #3301 from martin-frbg/syr2bench
Handle OPENBLAS_LOOPS in SYR2 benchmark
2021-07-11 07:20:19 +02:00
Martin Kroeker
0266ba7cb6 Update azure-pipelines.yml 2021-07-10 23:21:58 +02:00
Martin Kroeker
7e09570e04 Update azure-pipelines.yml 2021-07-10 22:41:49 +02:00
Martin Kroeker
14e33e0f7e Handle OPENBLAS_LOOPS in SYR2 benchmark 2021-07-10 21:27:53 +02:00
Martin Kroeker
db57c449dc Update azure-pipelines.yml 2021-07-10 20:57:21 +02:00
Martin Kroeker
993e56b7b3 Merge pull request #3299 from martin-frbg/issue3298
Fix copy-paste error in LIBCORE assignment for Tiger Lake
2021-07-10 20:48:53 +02:00
Martin Kroeker
c9304199cf Update azure-pipelines.yml 2021-07-10 20:12:33 +02:00
Martin Kroeker
d86290edf0 add sudo for install in Alpine 2021-07-10 19:52:04 +02:00
Martin Kroeker
89429fdaa2 fix typo 2021-07-10 19:03:42 +02:00
Martin Kroeker
d511063098 Move Alpine Linux build job from Travis to Azure 2021-07-10 18:52:44 +02:00
Martin Kroeker
4f4e286bf6 Fix copy-paste error in LIBCORE assignment for Tiger Lake 2021-07-10 18:20:40 +02:00
River Dillon
ddb6cee0d5 Contribution note 2021-07-10 01:34:47 -07:00
River Dillon
cecc2c65aa Add test of installed <openblas_config.h> 2021-07-10 01:26:05 -07:00
River Dillon
220f6a1c55 Add feature test macro for proper inclusion of <sched.h> 2021-07-10 00:38:02 -07:00
River Dillon
2f6326a630 Remove <linux/unistd.h> 2021-07-10 00:36:07 -07:00
Martin Kroeker
c0d0406b97 Merge pull request #3296 from martin-frbg/issue3295
Support Zhaoxin/Centaur family 7 processors as Nehalem
2021-07-08 21:24:15 +02:00
Martin Kroeker
8f22ac552b Add vendor string Shanghai as successor to Centaur 2021-07-08 18:28:49 +02:00
Martin Kroeker
da623ae838 Add vendor string Shanghai as the successor to Centaur 2021-07-08 18:26:23 +02:00
Martin Kroeker
eb2fdd3af0 Recognize newer Zhaoxin/Centaur processors as Nehalem 2021-07-08 12:23:15 +02:00
Martin Kroeker
0d8d261dd4 Recognize newer Zhaoxin/Centaur cpus as Nehalem 2021-07-08 12:20:19 +02:00
Martin Kroeker
40caaef052 Merge pull request #3265 from TAAPArthur/improve_portability
Removed use of non portable '-p' arg to install
2021-07-07 20:58:29 +02:00
Martin Kroeker
25b602d8a6 Merge pull request #3293 from martin-frbg/issue3290
Enable (C)EXTRALIB as for any other platform when building the tests on RISCV C910V
2021-07-07 20:46:54 +02:00
Martin Kroeker
4ed99c2ce3 Merge pull request #3292 from martin-frbg/syrk_limit
Add lower limit for multithreading in xSYRK
2021-07-07 20:46:28 +02:00
Martin Kroeker
f20c4edc33 Merge pull request #3288 from martin-frbg/getrf-2
Add lower threshold for multithreading in ?GETRF
2021-07-07 20:45:57 +02:00
Martin Kroeker
3cfdb1770c Remove code that disabled EXTRALIB on RISCV C910V 2021-07-06 20:21:07 +02:00
Martin Kroeker
8186963d8c Add lower limit for multithreading 2021-07-04 17:00:26 +02:00
Martin Kroeker
a4543e4918 Handle OPENBLAS_LOOP 2021-07-04 16:59:43 +02:00
Martin Kroeker
2376aa1e8c Merge pull request #3289 from martin-frbg/issue3283
Update README to mention availability of the Windows binaries in the Releases section
2021-07-02 00:19:06 +02:00
Martin Kroeker
4620f98812 Mention availability of the Windows binaries in the Releases section 2021-07-01 19:24:35 +02:00
Martin Kroeker
726c44242b Add lower threshold for multithreading 2021-07-01 17:41:05 +02:00
Martin Kroeker
dcfc5cf714 Handle OPENBLAS_LOOPS for more stable results 2021-07-01 17:39:37 +02:00
Martin Kroeker
06e3b07ecb Handle OPENBLAS_LOOPS and OPENBLAS_TEST options 2021-07-01 17:38:45 +02:00
Martin Kroeker
623be6600a Merge pull request #3284 from martin-frbg/potrf_potri
Add lower thresholds for multithreading in POTRF/POTRI and improve the related benchmark
2021-06-30 07:42:45 +02:00
Martin Kroeker
7ddc9d384c Merge pull request #3287 from martin-frbg/appveyor-conda
Work around current conda/tqdm auto-update problem on Appveyor
2021-06-29 20:09:26 +02:00
Martin Kroeker
6ebcce229f Work around current conda/tqdm auto-update problem 2021-06-29 17:17:34 +02:00
Martin Kroeker
1b5620b66e Add lower threshold for multithreading in ?potrf and ?potri 2021-06-26 23:47:41 +02:00
Martin Kroeker
1f8bda71b9 Add OPENBLAS_LOOPS support to potrf/potrs/potri benchmark 2021-06-26 23:46:00 +02:00
Martin Kroeker
3be660c000 Add interface declarations for ?potri 2021-06-26 23:44:56 +02:00
Martin Kroeker
1a8b6134c2 Merge pull request #3278 from brada4/A55
Add CORTEXA55 cpuid 0xd05 support
2021-06-23 13:05:17 +02:00
Martin Kroeker
f0b822a709 Update cpuid_arm64.c 2021-06-23 10:11:01 +02:00
User User-User
130327e9af OK 2021-06-22 23:58:59 +02:00
User User-User
750719528a bugz 2021-06-20 16:40:43 +02:00
User User-User
91e2b11d3c add to cmake listings too 2021-06-20 15:32:42 +02:00
User User-User
548aa522e5 remove misplaced file 2021-06-20 15:29:25 +02:00
User User-User
6423b282a1 dynamic_arch 2021-06-20 14:19:41 +02:00
User User-User
9335d42740 add gcc8 version matching 2021-06-19 22:21:39 +02:00
User User-User
39ef0880ae copy conf 2021-06-19 21:49:58 +02:00
User User-User
b7da75e4fd WiP CORTEX A55 support 2021-06-19 21:37:51 +02:00
Martin Kroeker
a7627c5afd Merge pull request #3276 from martin-frbg/issue3274
Add workaround for another macro name collision with Windows 10 SDK winnt.h
2021-06-16 16:37:30 +02:00
Martin Kroeker
9499ab0d45 Merge pull request #3275 from martin-frbg/lapack580
Fix missing EXTERNAL declarations in LAPACK TESTING (LAPACK PR 580)
2021-06-16 13:41:38 +02:00
Martin Kroeker
307c4c0786 Fix typo 2021-06-16 13:41:16 +02:00
Martin Kroeker
e83df93975 Work around another recent macro name collision with winnt.h 2021-06-16 12:32:34 +02:00
Martin Kroeker
13fa9f737d Modify defines for CR and RC to work around name collision on Windows 2021-06-16 12:17:25 +02:00
Martin Kroeker
5958ffc9b6 Declare DZASUM as EXTERNAL 2021-06-16 09:43:39 +02:00
Martin Kroeker
cd0e4aadb1 Declare ZDROT as EXTERNAL 2021-06-16 09:41:18 +02:00
Martin Kroeker
e2621ef93a Declare SROT as EXTERNAL 2021-06-16 09:40:15 +02:00
Martin Kroeker
9e1b43ea9b Declare DROT as EXTERNAL 2021-06-16 09:39:28 +02:00
Martin Kroeker
5269348178 Declare CSROT as EXTERNAL 2021-06-16 09:35:12 +02:00
Martin Kroeker
92e024bbb3 Declare SCASUM as EXTERNAL 2021-06-16 09:33:23 +02:00
Martin Kroeker
c4b464cac6 Merge pull request #3273 from austinpagan/sbgemm_gcc10_fix
Power10: Fix for SBGEMM
2021-06-15 22:58:48 +02:00
Gordon Fossum
e6dd44d989 Power10: Fix for SBGEMM
While testing bfloat16 sbgemm kernel, there are some failures for odd value inputs due to updating result for
additional bytes.
2021-06-15 13:07:47 -05:00
Martin Kroeker
baf03a0937 Merge pull request #3252 from martin-frbg/more_shortcuts
Further shortcuts for (small) cases that do not need buffer allocation
2021-06-15 16:14:20 +02:00
Martin Kroeker
7aab5e826c Merge pull request #3250 from martin-frbg/gemv-shortcut
Add shortcut for small-size S/D GEMV_N with increments of one
2021-06-15 14:50:14 +02:00
Martin Kroeker
29417adf4c Merge pull request #3270 from ggouaillardet/topic/dznrm2_tx2
arm64: add the missing d9 register to the clobber list
2021-06-14 13:00:33 +02:00
Gilles Gouaillardet
9d292d37b2 arm64: add the missing d9 register to the clobber list
Refs. numpy/numpy#18422

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2021-06-14 17:01:28 +09:00
Martin Kroeker
2e8ff4a781 Merge pull request #3266 from martin-frbg/powerparam
Remove spurious casts from PPC parameters and fix compilation for older targets
2021-06-10 18:05:47 +02:00
Martin Kroeker
dbba381dc3 Merge pull request #3260 from intelmy/sgemv_t_opt
Optimized sgemv_t for small N based on AVX512
2021-06-10 16:08:24 +02:00
Martin Kroeker
f61991d439 Merge pull request #3264 from RajalakshmiSR/sbgemmp10
POWER10: Fixes for sbgemm kernel
2021-06-10 16:07:47 +02:00
Martin Kroeker
efdbdd8f82 Add prefetch values for power3 2021-06-10 11:20:29 +02:00
Martin Kroeker
3906ef3b0f Add prefetch values for power3 2021-06-10 11:19:40 +02:00
Martin Kroeker
8adf0971d8 Add prefetch values for power3 2021-06-10 11:18:22 +02:00
Martin Kroeker
08e2e60762 Add prefetch values for power3 2021-06-10 11:17:33 +02:00
Martin Kroeker
fb9e678235 Fix caxpy/zaxpy for big-endian 2021-06-10 11:15:48 +02:00
Martin Kroeker
dc4fcb48df Fix inverted conditional for caxpy/zaxpy 2021-06-10 11:14:03 +02:00
Martin Kroeker
7a48247761 fix c/zrot and sgemv for POWER5 2021-06-10 11:11:56 +02:00
Martin Kroeker
7dfc45e840 Remove casts for PPC/POWER and complete parameters for POWER3/4 2021-06-10 11:09:50 +02:00
Arthur Williams
7fb6e576c2 Removed use of non portable '-p' arg to install
Not all versions of install support '-p' flag and it isn't worth failing
the build in the installed files' timestamps get updated.
2021-06-09 20:50:36 -05:00
Rajalakshmi Srinivasaraghavan
cbb70438df POWER10: Fixes for sbgemm kernel
While testing bfloat16 sbgemm kernel, there are some failures
for odd value inputs due to array access beyond the boundary.
2021-06-09 12:20:09 -05:00
Ma, Yu
706a08d4a0 Optimized sgemv_t for small N based on AVX512 2021-06-08 15:08:28 -04:00
Zhang Xianyi
9f3d903817 Merge pull request #3259 from zhaofengli/riscv64-fixes
riscv64 fixes
2021-06-08 16:26:56 +08:00
Zhaofeng Li
590be3fae3 riscv64: Add Makefile 2021-06-07 22:55:56 +00:00
Zhaofeng Li
3521cd48cb RISCV64_GENERIC: Use generic kernel for DSDOT for better precision
The implementation in `riscv64/dot.c` fails the `test_dsdot` test, and
the generic kernel seems to have better precision. Tested on SiFive
FU740 (HiFive Unmatched) and QEMU.

Also see #1469.
2021-06-07 22:50:23 +00:00
Zhaofeng Li
1e0192a5cc riscv64/imin: Fix wrong comparison
Same as #1990.
2021-06-07 22:49:39 +00:00
Martin Kroeker
fe9aff17fe Merge pull request #3258 from martin-frbg/hbaction
revert "try to work around gcc update problems" in Homebrew workflow
2021-06-06 22:15:29 +02:00
Martin Kroeker
8c25b440a0 revert "try to work around gcc update problems"
...as homebrew has dropped at least gcc8 now
2021-06-06 19:17:36 +02:00
Martin Kroeker
f84197c1a7 Add shortcuts for (small) cases that do not need expensive buffer allocation 2021-05-29 22:28:00 +02:00
Martin Kroeker
734bd265a8 revert symv changes for now 2021-05-29 15:40:03 +02:00
Martin Kroeker
1217eb910d Fix copy-paste errors in variables used 2021-05-28 09:38:48 +02:00
Martin Kroeker
d6d7a6685d Add shortcuts for (small) cases that do not need expensive buffer allocation 2021-05-27 22:39:18 +02:00
Martin Kroeker
f0e7345fb8 Add shortcut for small-size gemv_n with increments of one 2021-05-26 22:02:34 +02:00
Martin Kroeker
42f048cf6c Merge pull request #3249 from MikaelUrankar/develop
Fix typo
2021-05-26 15:26:30 +02:00
MikaelUrankar
4fbc0777f4 Fix typo 2021-05-26 12:14:57 +02:00
Martin Kroeker
d7472606d5 Merge pull request #3244 from martin-frbg/issue3237
Add fast path for small xSYR with INCX==1
2021-05-22 22:38:09 +02:00
Martin Kroeker
03297ff9f0 Add fast path for small xSYR with INCX==1 2021-05-22 20:41:18 +02:00
Martin Kroeker
2d8d0af0ea Merge pull request #3243 from martin-frbg/lapack564
Fix spurious error exit test failures in the ?chktsqr tests (LAPACK564)
2021-05-22 19:25:56 +02:00
Martin Kroeker
5f677e782e Merge pull request #3196 from guowangy/skylakex-gemm-batch-k
GEMM: skylake: improve the performance when m is small
2021-05-22 19:25:28 +02:00
Martin Kroeker
04c60cee5d Merge pull request #3242 from martin-frbg/issue3239
Handle inadvertent use of DYNAMIC_ARCH=0
2021-05-22 19:24:46 +02:00
Martin Kroeker
3a53207cc9 Fix spurious error exit test failures in the ?chktsqr tests (LAPACK564) 2021-05-22 14:29:45 +02:00
Martin Kroeker
0e73d20629 Handle inadvertent use of DYNAMIC_ARCH=0 2021-05-22 14:23:49 +02:00
Martin Kroeker
02087a62e7 Merge pull request #3205 from intelmy/sgemv_n_opt
optimize on sgemv_n for small n
2021-05-17 17:49:01 +02:00
Martin Kroeker
03b4d79a7e Merge pull request #3238 from martin-frbg/lapack555
Correct function name in error message from SLASQ2 (LAPACK PR555)
2021-05-17 17:32:23 +02:00
Martin Kroeker
5c729c6dce Correct function name in error message from SLASQ2 (Reference-LAPACK PR 555) 2021-05-17 14:47:14 +02:00
Martin Kroeker
e1911b2e60 Merge pull request #3236 from martin-frbg/issue3234
Add -lm for FreeBSD on ARM/ARM64
2021-05-16 17:17:18 +02:00
Martin Kroeker
8f33da4f94 Merge pull request #3235 from dnoan/develop
Update Makefile.arm64
2021-05-16 17:15:45 +02:00
Martin Kroeker
26ccf643a3 Add -lm for FreeBSD on ARM/ARM64 2021-05-16 13:04:38 +02:00
Noan
32264ba496 Update Makefile.arm64
Added -march and -mtune flags for EMAG processors when GCC 9 or later
2021-05-16 09:49:13 +00:00
Martin Kroeker
4ecf631f95 Merge pull request #3228 from martin-frbg/issue3226
filter out -mavx flag on Sandybridge zgemm/ztrmm kernels
2021-05-15 09:06:12 +02:00
Martin Kroeker
5af510081d Merge pull request #3233 from martin-frbg/issue3230
Add autodetection for Intel Ice Lake SP
2021-05-15 01:04:09 +02:00
Martin Kroeker
164551d5a2 Merge pull request #3232 from martin-frbg/lapack553
Reduce stack size requirements in the LAPACK LIN tests (LAPACK PR 553)
2021-05-14 23:28:45 +02:00
Martin Kroeker
310b76aad7 Merge pull request #3231 from martin-frbg/issue3227
Support compilation with pre-C99 versions of MSVC
2021-05-14 23:28:06 +02:00
Martin Kroeker
c4da892ba0 Only filter out -mavx on Sandybridge ZGEMM/ZTRMM kernels 2021-05-14 23:19:10 +02:00
Martin Kroeker
cbfd3c87e1 Recognize Intel Ice Lake SP as Cooper Lake 2021-05-14 20:44:06 +02:00
Martin Kroeker
26e87ac517 Support Intel Ice Lake SP as Cooper Lake 2021-05-14 20:39:55 +02:00
Martin Kroeker
15b9d6b4a7 Delete zchkaa.f 2021-05-14 19:55:31 +02:00
Martin Kroeker
f7bcd962c1 Delete schkaa.f 2021-05-14 19:54:54 +02:00
Martin Kroeker
93cc066921 Delete dchkaa.f 2021-05-14 19:54:13 +02:00
Martin Kroeker
2c7d4a7766 Delete cchkaa.f 2021-05-14 19:53:38 +02:00
Martin Kroeker
eef1c42f03 Convert ?chkaa to use dynamic allocation for the larger arrays 2021-05-14 19:53:03 +02:00
Martin Kroeker
73f637e584 Support compilation with pre-C99 versions of MSVC 2021-05-14 15:08:12 +02:00
Martin Kroeker
8b90e5f202 Drop redundant inclusion of complex.h 2021-05-14 15:06:44 +02:00
Martin Kroeker
bd60fb6ffc filter out -mavx flag on zgemm kernels as it can cause problems with older gcc 2021-05-13 23:05:00 +02:00
Martin Kroeker
37ea8702ee Merge pull request #3192 from damonyu1989/develop
Update the intrinsic api to the offical name.
2021-05-11 16:00:45 +02:00
Martin Kroeker
ec7d6c02bc Add an Android crossbuild on OSX to Azure CI (#3224)
* Add an Android crossbuild on OSX
2021-05-10 08:02:01 +02:00
Martin Kroeker
c90c23e78f Merge pull request #3223 from martin-frbg/develop
Use percent instead of ampersand as placeholder for substitutions
2021-05-07 08:51:45 +02:00
Martin Kroeker
bda8820da7 Use percent instead of ampersand as placeholder for substitutions 2021-05-06 20:20:08 +02:00
Martin Kroeker
c0ca63ea46 Fix missing conditionals for non-SKX kernels 2021-05-05 14:55:36 +02:00
Martin Kroeker
f497bb949b Merge pull request #3219 from austinpagan/Gemm.ErrorFix
Add error message token for SBGEMM in gemm.c
2021-05-05 14:30:41 +02:00
Martin Kroeker
f86b1bc3da Merge pull request #3220 from drhpc/drhpc-fixup
Delete lapack_wrappers.c.orig
2021-05-05 14:30:24 +02:00
drhpc
206e03fdac Delete lapack_wrappers.c.orig
This looks like a leftover from patching and confuses further patching;-)
2021-05-04 21:02:07 +02:00
Gordon Fossum
8b599836db Add error message token for SBGEMM in gemm.c 2021-05-04 13:55:02 -05:00
Martin Kroeker
9721b57ecf Update version to 0.3.15.dev 2021-05-03 00:01:08 +02:00
Martin Kroeker
380f955078 Update version to 0.3.15.dev 2021-05-03 00:00:29 +02:00
Martin Kroeker
49d18e65e3 Merge pull request #3217 from xianyi/release-0.3.0
merge 0.3.15 back into develop to copy tag
2021-05-02 23:59:55 +02:00
Martin Kroeker
904f9a267d Update version to 0.3.15 2021-05-02 23:50:22 +02:00
Martin Kroeker
4c033730bb Update version to 0.3.15 2021-05-02 23:49:49 +02:00
Martin Kroeker
65502c6af6 Merge pull request #3216 from xianyi/develop
Update from develop for 0.3.15 release
2021-05-02 23:48:28 +02:00
Martin Kroeker
f71627fa2e Merge pull request #3215 from martin-frbg/cl0315
Update Changelog for 0.3.15
2021-05-02 23:47:24 +02:00
Martin Kroeker
d8d7bd33cb Update Changelog for 0.3.15 2021-05-02 23:46:55 +02:00
Martin Kroeker
e72420e8c5 Merge pull request #3214 from martin-frbg/lapack-3.9.1hrt
Add new Householder Reconstruction functions from LAPACK 3.9.1
2021-05-02 23:40:03 +02:00
Martin Kroeker
d00709e016 Add files via upload 2021-05-02 20:47:58 +02:00
Martin Kroeker
d444344497 Add LAPACKE interfaces for the new Householder Reconstruction functions from 3.9.1 2021-05-02 19:57:47 +02:00
Martin Kroeker
fb7308b9b5 Add entries for the new Householder Reconstruction functions from 3.9.1 2021-05-02 19:56:11 +02:00
Martin Kroeker
db50b24a4a Add entries for the new Householder Reconstruction functions from 3.9.1 2021-05-02 19:55:15 +02:00
Martin Kroeker
88b70fba3e Add new tests for Householder reconstruction functions from 3.9.1 2021-05-02 19:28:21 +02:00
Martin Kroeker
4c1d47098b Add new files for Householder reconstruction functions from 3.9.1 2021-05-02 19:25:43 +02:00
Martin Kroeker
40000d1f64 Add entries for Householder reconstruction functions from 3.9.1 2021-05-02 19:21:59 +02:00
Martin Kroeker
dc3664993c Merge pull request #26 from xianyi/develop
rebase
2021-05-02 19:19:28 +02:00
Martin Kroeker
b8232c9054 Merge pull request #3213 from martin-frbg/lapack382
Avoid allocating the transposed triangular matrix in LAPACKE_xlantr_work (Reference-LAPACK 382)
2021-05-02 18:45:15 +02:00
Martin Kroeker
114bbbc6d7 Merge pull request #3212 from martin-frbg/lapack463
Initialize X and Y to zero for N=0 in xGGGLM (Reference-LAPACK PR463)
2021-05-02 18:44:59 +02:00
Martin Kroeker
b67a92c19f Merge pull request #3211 from martin-frbg/lapack471
Handle norm NaN value in xGESDD (Reference LAPACK PR471)
2021-05-02 18:44:29 +02:00
Martin Kroeker
4bf00da8fb Avoid allocating the transposed triangular matrix (Reference-LAPACK PR382) 2021-05-02 12:18:17 +02:00
Martin Kroeker
c26780d451 Initialize X and Y to zero for N=0 (Reference-LAPACK PR463) 2021-05-02 11:40:56 +02:00
Martin Kroeker
d77d9bc920 Handle norm NaN value (Reference LAPACK PR471) 2021-05-02 11:24:50 +02:00
Martin Kroeker
37d3e2bd94 Merge pull request #3210 from martin-frbg/lapack502
Fix possible division by zero in LAPACK xTGSJA (Reference-LAPACK PR502)
2021-05-02 09:02:11 +02:00
Martin Kroeker
de8656769c Fix possible division by zero in xTGSJA (Reference-LAPACK PR502) 2021-05-01 21:31:13 +02:00
Martin Kroeker
d43e07198d Merge pull request #3208 from martin-frbg/lapack534
Apply MKL team fixes to the LAPACKE interfaces (Reference-LAPACK PR 534)
2021-05-01 20:18:29 +02:00
Martin Kroeker
da16764c7a Merge pull request #3209 from martin-frbg/issue3160
Add casts to prevent overflow of intermediate results
2021-05-01 20:08:24 +02:00
Martin Kroeker
98ebc8ac59 Add casts to prevent overflow of intermediate result 2021-05-01 14:48:19 +02:00
Martin Kroeker
904b221f03 Add cast to prevent overflow of intermediate result 2021-05-01 14:47:22 +02:00
Martin Kroeker
5cc35abc3d Apply MKL team fixes to the LAPACKE interfaces (Reference-LAPACK PR 534)
Removed spurious checks for INFO in xLACPY,xLASET after routines not returning any,and redundant requirements for ldvt in xGESVD_WORK
2021-05-01 13:22:10 +02:00
Martin Kroeker
254774f5a6 Add const qualifiers 2021-05-01 13:10:16 +02:00
Martin Kroeker
ae9cdee753 Merge pull request #3207 from hjl-tools/hjl/cet/develop
x86: Enable Intel CET
2021-05-01 12:42:54 +02:00
H.J. Lu
53ee0b76bb x86: Enable Intel CET
When Intel CET is enabled, we need to include <cet.h> in assembly codes
to mark Intel CET support and place _CET_ENDBR at the function entry.
2021-04-30 19:45:39 -07:00
Martin Kroeker
dc6b04c375 Merge pull request #3206 from martin-frbg/lapack480535
Import packing improvements to LAPACK xLAQR from Reference-LAPACK (PR 480+535)
2021-04-30 21:42:44 +02:00
pnp
3d4ccd2a13 fix for build error 2021-04-30 12:25:33 -04:00
pnp
c59652f0ce optimize on sgemv_n for small n 2021-04-30 12:14:58 -04:00
Martin Kroeker
87d2e314db Import packing improvements in LAPACK xLAQR from Reference-LAPACK PR 480+535 2021-04-30 13:50:55 +02:00
Martin Kroeker
3a30c12019 Merge pull request #25 from xianyi/develop
rebase
2021-04-30 13:47:17 +02:00
Martin Kroeker
c9a82f54d1 Merge pull request #3204 from martin-frbg/lapack506
Correct INFO value returned by SLASQ2/DLASQ2 (Reference-LAPACK 506)
2021-04-30 13:25:48 +02:00
Martin Kroeker
444cb78be5 correct INFO value (Reference-LAPACK 506) 2021-04-30 09:26:54 +02:00
Martin Kroeker
171c20e3b6 Merge pull request #3202 from martin-frbg/issue3201
Fix division by zero in the non-x86 codepath of C/ZROTG
2021-04-29 18:58:27 +02:00
Martin Kroeker
c5fb91f1bc Fix division by zero in the non-x86 codepath 2021-04-29 09:47:18 +02:00
Martin Kroeker
9a36a283d3 Merge pull request #3199 from martin-frbg/lapack537
Add LAPACKE fixes from Reference-LAPACK PR 537
2021-04-29 05:39:50 +02:00
Martin Kroeker
7e35d25ea0 Merge pull request #3198 from martin-frbg/lapack539
Apply fixes from Reference-LAPACK PR468 and 539 for array declarations in ?ORGBR/?UNGBR
2021-04-29 05:39:35 +02:00
Martin Kroeker
3704f5e5b0 Add missing break statements in the ?lascl functions 2021-04-28 20:56:55 +02:00
Martin Kroeker
6b76066632 Add const qualifiers 2021-04-28 20:55:37 +02:00
Martin Kroeker
2b01132515 Clean up misdeclaration of the dummy stand-in for A in ?ORGBR/?UNGBR workspace queries (Reference-LAPACK PR 468 and 530) 2021-04-28 19:20:08 +02:00
Martin Kroeker
8e95a1e18d Merge pull request #3195 from martin-frbg/lapack536
Apply lapack-testing fix from Reference-LAPACK PR536
2021-04-28 18:17:25 +02:00
Wangyang Guo
aa7b3dc3db GEMM: skylake: improve the performance when m is small 2021-04-28 13:56:06 +00:00
Martin Kroeker
13a29d13fd Apply lapack-testing fix from Reference-LAPACK PR536
fixes changing back from a single OMP thread for error exit testing to the originally requested number of threads for computational tests
2021-04-27 15:48:22 +02:00
Martin Kroeker
a6c2cb8417 Merge pull request #3193 from martin-frbg/lapack538
Apply lapack-testing fixes from Reference-LAPACK PR538
2021-04-27 15:40:51 +02:00
Martin Kroeker
d511a7bb4f Merge pull request #3191 from martin-frbg/issue3188
Delay creation of the (soft)link until after the library has been built
2021-04-27 13:35:16 +02:00
Martin Kroeker
3526ff2507 Apply fixes from Reference-LAPACK PR538 2021-04-27 12:52:49 +02:00
Martin Kroeker
adcfe7b789 Merge pull request #3190 from martin-frbg/issue3128-2
Replace spurious AVX512 requirement in the Haswell drot microkernel with an AVX2/FMA3 guard
2021-04-27 06:36:28 +02:00
damonyu
ceb44bef14 update the intrinsic api to the offical name. 2021-04-27 11:12:29 +08:00
damonyu1989
ed473267df Merge pull request #1 from xianyi/develop
update
2021-04-27 10:53:59 +08:00
Martin Kroeker
0608bc5d82 delay creation of the softlink until after the library has been created 2021-04-26 22:32:23 +02:00
Martin Kroeker
3d511f0e66 replace spurious avx512 requirement with fma check 2021-04-26 21:55:30 +02:00
Martin Kroeker
0b8a436af9 Add mixed clang/ifort build on OSX to Azure CI (#3185)
* Add mixed clang/ifort build on OSX to the Azure CI config based on https://github.com/oneapi-src/oneapi-ci
(and remove debugging tools from the clang+gfortran job)

* Remove extraneous libgfortran dependency of ifort builds

* remove FEXTRALIB from link line of shared library as ifort keeps track of dependencies (and they are different for a .dylib than what f_check got for an executable)
2021-04-22 02:11:20 +02:00
Martin Kroeker
352efdd13a Merge pull request #24 from xianyi/develop
rebase
2021-04-20 21:30:28 +02:00
Martin Kroeker
4855af02a3 Merge pull request #3184 from martin-frbg/ctestfix
Fix obscure ctest crashes on OSX and add OSX builds to Azure CI
2021-04-20 07:31:07 +02:00
Martin Kroeker
94a5a1f0f1 Add OSX build variations to Azure CI 2021-04-19 22:27:08 +02:00
Martin Kroeker
751d127d7c Include cblas_test.h to achieve int/long size change with INTERFACE64 2021-04-19 22:26:34 +02:00
Martin Kroeker
fc101b67e5 Merge pull request #23 from xianyi/develop
rebase
2021-04-19 22:24:12 +02:00
Martin Kroeker
b0239a05fd Merge pull request #3183 from martin-frbg/2715-x
Restore __volatile__ keyword in ARM64 DYNAMIC_ARCH detection mechanism
2021-04-16 14:52:12 +02:00
Martin Kroeker
623d580b4c Restore __volatile__ keyword 2021-04-16 10:27:32 +02:00
Martin Kroeker
974acb39ff Merge pull request #3181 from RajalakshmiSR/dgemmp10vp
POWER10: Improve dgemm performance
2021-04-14 22:43:02 +02:00
Rajalakshmi Srinivasaraghavan
2379abaa5e POWER10: Improve dgemm performance
This patch uses vector pair pointer for input load operation
which helps to generate power10 lxvp instructions.
2021-04-13 22:30:06 -05:00
Martin Kroeker
3caf781d7c Merge pull request #3179 from RajalakshmiSR/zgemvp10
POWER10: Optimized zgemv
2021-04-11 10:01:09 +02:00
Rajalakshmi Srinivasaraghavan
55bb9f639a POWER10: Optimized zgemv
This patch makes use of Matrix-Multiply Assist (MMA)
feature introduced in POWER ISA v3.1 for zgemv_n and zgemv_t.
2021-04-10 19:00:24 -05:00
Martin Kroeker
0dba04bb58 Merge pull request #3178 from martin-frbg/fix2864
Fix unwanted fallback to implicit typing in slanv2/dlanv2
2021-04-09 13:38:05 +02:00
Martin Kroeker
e96f5e3c65 Fix implicit typing of new variable TWO 2021-04-09 10:04:15 +02:00
Martin Kroeker
558724e99f Fix implicit typing of new variable TWO 2021-04-09 10:03:31 +02:00
Martin Kroeker
067c96a873 Merge pull request #3177 from martin-frbg/issue3176
Use "old" compute(24) function with clang due to register limitations
2021-04-07 08:22:42 +02:00
Martin Kroeker
4b380c0b40 Merge pull request #3175 from LYP951018/develop
Pass NO_AVX512 macro def when `DYNAMIC_ARCH` is enabled
2021-04-07 08:22:28 +02:00
Martin Kroeker
2dfb24730d Use "old" compute(24) function with clang due to register limitations 2021-04-06 19:58:32 +02:00
刘雨培
725432efaa pass NO_AVX512 macro def 2021-04-07 00:10:41 +08:00
Martin Kroeker
a2216ef19f Merge pull request #3173 from martin-frbg/dyna-sse3
Fix spillover of host-specific build flags into the shared part of x86 DYNAMIC_ARCH builds
2021-04-05 13:39:17 +02:00
Martin Kroeker
5332cbae18 Avoid adding host-specific cpuflags to the common part of DYNAMIC_ARCH builds 2021-04-04 23:12:17 +02:00
Martin Kroeker
209b026e46 Merge pull request #3172 from martin-frbg/lapack477-final
Copy missing fixes from the final revision of Reference-LAPACK PR477
2021-04-04 20:19:09 +02:00
Martin Kroeker
1ae607beca Update Makefile.x86_64 2021-04-04 12:31:22 +02:00
Martin Kroeker
d393f1923f Fix spillover of host-specific build flags into the shared part of DYNAMIC_ARCH builds with gmake
for #3139
2021-04-03 22:18:15 +02:00
Martin Kroeker
081d5ae971 Fix typo and potentially undefined variables
(copies fixes made in Reference-LAPACK PR 477 after the initial cherrypick)
2021-04-03 22:11:14 +02:00
Martin Kroeker
0492f0f3f9 Merge pull request #22 from xianyi/develop
rebase
2021-04-03 21:58:36 +02:00
Martin Kroeker
147e0a75fd Merge pull request #3170 from CodesWithWolves/sgemm_tcopy_16-invalid-read
Remove Unnecessary/Erroneous Adds/Reads In sgemm_tcopy_16.S COPY1x8 Macro
2021-04-03 19:49:47 +02:00
Martin Kroeker
ee068af843 Merge pull request #3171 from RajalakshmiSR/BE_p10
POWER10:  Adding check for little endian
2021-04-01 21:20:24 +02:00
Rajalakshmi Srinivasaraghavan
2dbcddd83d POWER10: Adding check for little endian
This patch makes sure that recent POWER10 patches are used
only for little endian.
2021-03-31 21:32:42 -05:00
CodesWithWolves
d2bda3b56a Remove Unnecessary/Erroneous Reads In sgemm_tcopy_16.S COPY1x8 Macro
There appears to have been some code leak when copying from the COPY2x8
macro above where we're reading 8 bytes into d4-d7 directly after
reading 4 bytes into s4-s7. These 32 bytes in d4-7 are unused and can
possibly overrun the boundary of allocated memory -- Valgrind detected
this which is what dragged my attention to it for a 128,1 copy.

Additionally, there is no need to update the addresses stored in A0-A7
as the only possible paths after running this macro will overwrite A0-7
if looping to the next 8 rows, or overwrite A0-3 if moving to 4 rows --
in which case A4-7 are unused.
2021-03-31 15:44:25 -04:00
Martin Kroeker
903fd85c85 Merge pull request #3167 from xianyi/fix3126
Fix compilation of the benchmarks on older OSX versions
2021-03-27 12:40:42 +01:00
Martin Kroeker
d57c681a6d Fix compilation on older OSX versions 2021-03-26 22:29:29 +01:00
Martin Kroeker
d7efe5857c Merge pull request #3165 from martin-frbg/azure-osx
Add OSX build to Azure
2021-03-24 14:05:34 +01:00
Martin Kroeker
8fd694c18f Update .travis.yml 2021-03-24 10:36:29 +01:00
Martin Kroeker
e69b0b1771 Update azure-pipelines.yml 2021-03-24 10:34:24 +01:00
Martin Kroeker
9dc0bfd617 Update azure-pipelines.yml 2021-03-24 08:54:30 +01:00
Martin Kroeker
e6664ec2c9 Update azure-pipelines.yml 2021-03-24 08:41:48 +01:00
Martin Kroeker
dbb33f412f Update azure-pipelines.yml 2021-03-24 08:30:48 +01:00
Martin Kroeker
70b89a6205 Add OSX build to Azure 2021-03-24 07:50:35 +01:00
Martin Kroeker
07b144855a Merge pull request #3164 from martin-frbg/travisosxomp
Fix xcode12 build on Travis and add OSX/OpenMP job
2021-03-24 06:56:10 +01:00
Martin Kroeker
292a0aed66 Fix xcode12 build and add OSX/OpenMP 2021-03-24 06:55:14 +01:00
Martin Kroeker
42f0201e21 Merge pull request #20 from xianyi/develop
rebase
2021-03-22 17:53:43 +01:00
Martin Kroeker
22db876d48 Merge pull request #3158 from austinpagan/Gemm.CZPQ
Changed default P/Q values for CGEMM and ZGEMM (Power10 only)
2021-03-19 20:53:21 +01:00
Martin Kroeker
bdd6e3a153 Merge pull request #3157 from martin-frbg/issue3020-final
Add workaround for LAPACK testsuite failures with the NVIDIA HPC compiler on PPC
2021-03-19 15:23:12 +01:00
Martin Kroeker
7b8f580941 Merge pull request #3156 from martin-frbg/omatcopy_d
Move x86_64 DOMATCOPY_RT back to the C implementation
2021-03-19 15:22:48 +01:00
Gordon Fossum
198adea961 Changed default P/Q values for CGEMM and ZGEMM (Power10 only) 2021-03-19 10:05:23 -04:00
Martin Kroeker
86c5a0013f Add workaround for LAPACK testsuite failures with the NVIDIA HPC compiler 2021-03-19 11:47:58 +01:00
Martin Kroeker
ef85c22474 Add workaround for LAPACK test failures with the NVIDIA HPC compiler 2021-03-19 11:46:25 +01:00
Martin Kroeker
d3555d2e50 Add workaround for LAPACK test failures with the NVIDIA HPC compiler 2021-03-19 11:44:31 +01:00
Martin Kroeker
c4b91bfcf1 Merge pull request #3155 from martin-frbg/issue3152
Fix recent SGEMM_direct breakage on SkylakeX and Cooperlake
2021-03-19 09:55:31 +01:00
Martin Kroeker
0f5e86a0d9 Remove premature entry for DOMATCOPY_RT 2021-03-18 21:53:50 +01:00
Martin Kroeker
7b294a99fd Move common.h back to the top of the file so that SKYLAKEX (from config.h) is defined in time 2021-03-18 21:28:19 +01:00
Martin Kroeker
1e4b2e98d9 Merge pull request #3154 from martin-frbg/issue3153
Fix premature include in getarch_2nd
2021-03-18 12:35:47 +01:00
Martin Kroeker
3fd6ccdf76 Include just the definition of BLASLONG rather than all of common.h 2021-03-18 07:50:19 +01:00
Martin Kroeker
fa9a30b491 Merge pull request #19 from xianyi/develop
rebase
2021-03-18 07:47:03 +01:00
Martin Kroeker
d90ca75a6c Update version to 0.3.14.dev 2021-03-17 21:14:42 +01:00
Martin Kroeker
e107454454 Update version to 0.3.14.dev 2021-03-17 21:14:05 +01:00
Martin Kroeker
d43962d013 Merge pull request #3151 from xianyi/release-0.3.0
Merge 0.3.14 release branch back into develop to acquire tag
2021-03-17 21:13:25 +01:00
Martin Kroeker
2f6d35c3d4 Merge pull request #3150 from xianyi/develop
Update branch from develop for 0.3.14 release
2021-03-17 20:21:42 +01:00
Martin Kroeker
86de5f768b Update version to 0.3.14 for release 2021-03-17 20:20:34 +01:00
Martin Kroeker
2663e44724 Update version to 0.3.14 for release 2021-03-17 20:20:00 +01:00
Martin Kroeker
6f2900c164 Merge pull request #3149 from martin-frbg/changelog14
Update Changelog for 0.3.14
2021-03-17 20:14:50 +01:00
Martin Kroeker
7888b5127c Update Changelog for 0.3.14 2021-03-17 16:17:55 +01:00
Martin Kroeker
8808c291b9 Merge pull request #3148 from martin-frbg/issue3145
Add workaround for older gcc on big-endian ppc64 not supporting casts in defines
2021-03-17 09:05:43 +01:00
Martin Kroeker
8cdf0825de Add workaround for older gcc on ppc64be not supporting casts in defines 2021-03-16 21:20:05 +01:00
Martin Kroeker
9e0dbe8e59 Merge pull request #18 from xianyi/develop
rebase
2021-03-16 21:09:45 +01:00
Martin Kroeker
52f99d3944 Merge pull request #3147 from martin-frbg/issue3146
Fix DYNAMIC_ARCH builds with CLANG on ppc64
2021-03-16 20:25:42 +01:00
Martin Kroeker
186368ddc3 Fix compilation with CLANG 2021-03-16 16:52:57 +01:00
Martin Kroeker
c0b94ae1df Merge pull request #3143 from martin-frbg/fix3088
Resolve circular dependency between common.h and param.h
2021-03-14 23:12:55 +01:00
Martin Kroeker
ddd86309a1 Merge pull request #3144 from xoviat/fix-test
disable openmp
2021-03-14 23:12:33 +01:00
xoviat
e9d453b623 disable openmp 2021-03-14 16:34:02 -05:00
Martin Kroeker
ecb4babcf4 remove inclusion of common.h again to avoid circular dependency 2021-03-14 17:36:51 +01:00
Martin Kroeker
34753eaebb Include common.h (and indirectly param.h) rather than just param.h to have BLASLONG available w/o circular dependencies 2021-03-14 17:28:43 +01:00
Martin Kroeker
efa72a631b Merge pull request #17 from xianyi/develop
rebase
2021-03-14 17:20:49 +01:00
Martin Kroeker
30d835168a Merge pull request #3088 from xoviat/msvc
add misc fixes.
2021-03-14 17:14:28 +01:00
Martin Kroeker
8f6a744807 Merge pull request #3141 from martin-frbg/nagfor-2
Leave out ARM64 march/mtune options when compiling with nagfor
2021-03-13 23:04:53 +01:00
Martin Kroeker
6726771645 Support compilation with NAG fortran 2021-03-13 20:16:18 +01:00
Martin Kroeker
a51cae6b2e Merge pull request #3140 from martin-frbg/issue3139
Fix compilation on older x86_64 targets with old compilers that lack intrinsics support
2021-03-12 15:35:58 +01:00
Martin Kroeker
d30b943251 Merge pull request #3138 from martin-frbg/nagfor
Add support for compilation with the NAG Fortran compiler
2021-03-12 12:46:19 +01:00
Martin Kroeker
0934568d9c Move includes under the ifdef for compilers w/o intrinsics support 2021-03-12 12:42:05 +01:00
Martin Kroeker
697e64bbb6 Fix syntax 2021-03-11 23:03:58 +01:00
Martin Kroeker
bffb9b0e95 Merge pull request #3136 from austinpagan/Gemm.PQ
Modifying a couple parameters in the "POWER10"-specific section of pa…
2021-03-11 15:17:48 +01:00
Martin Kroeker
6ae7af78a3 Support compilation with nagfor 2021-03-11 11:53:51 +01:00
Martin Kroeker
041a26fd79 Support compilation with nagfor 2021-03-11 11:52:29 +01:00
Martin Kroeker
3c356b1a1f Support compilation with the NAG Fortran compiler 2021-03-11 11:51:09 +01:00
Martin Kroeker
b1215f2f8c Merge pull request #16 from xianyi/develop
rebase
2021-03-11 11:48:37 +01:00
Martin Kroeker
0b73041b16 Merge pull request #3137 from RajalakshmiSR/zscal_p10
Optimize zscal function for POWER10
2021-03-11 07:18:05 +01:00
austinpagan
9579bd47e5 Modifying a couple paramaters in the "POWER10"-specific section of param.h, for performance enhancements for SGEMM and DGEMM. 2021-03-10 18:19:12 -05:00
Rajalakshmi Srinivasaraghavan
09d47af2c0 Optimize zscal function for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2021-03-10 17:15:33 -06:00
Martin Kroeker
ef0238ba2b Merge pull request #3130 from martin-frbg/issue3128
Replace spurious AVX512 requirement in the Haswell srot microkernel with an AVX2/FMA3 guard
2021-03-06 19:15:53 +01:00
Martin Kroeker
a9f6f7ad39 Remove spurious AVX512 requirement and add AVX2/FMA3 guard 2021-03-06 14:35:49 +01:00
Martin Kroeker
1d254d321b Merge pull request #3129 from RajalakshmiSR/asum_p10
Optimize s/dasum function for POWER10
2021-03-06 09:13:59 +01:00
Rajalakshmi Srinivasaraghavan
41646ed006 Optimize s/dasum function for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2021-03-05 16:22:36 -06:00
Martin Kroeker
3679781872 Merge pull request #3126 from martin-frbg/m1bench
Support timing Apple M1 in the benchmarks
2021-03-02 21:27:21 +01:00
Martin Kroeker
38dcf3454b Support timing Apple M1 2021-03-02 17:50:55 +01:00
Martin Kroeker
e34d57ca90 Merge pull request #3125 from martin-frbg/issue3123
Fix AMD AOCC compiler detection
2021-03-02 09:58:40 +01:00
Martin Kroeker
20f492c298 Fix AMD AOCC compiler detection 2021-03-01 21:00:10 +01:00
Martin Kroeker
c7c82be1c3 Merge pull request #3122 from martin-frbg/xeigtstz
Fix unusual stack size requirements of the LAPACK EIG tests (from Reference-LAPACK PR 335)
2021-02-28 22:13:09 +01:00
Martin Kroeker
9564f688c4 Adjust build rules for ?chkee.F 2021-02-28 18:57:05 +01:00
Martin Kroeker
90c1776c86 Adjust build rules for ?chkee.F 2021-02-28 18:53:20 +01:00
Martin Kroeker
9cf861e8fa Add rewritten cchkee.F from Reference-LAPACK PR335 2021-02-28 18:51:03 +01:00
Martin Kroeker
9b7b1da133 Add rewritten dchkee.F from Reference-LAPACK PR335 2021-02-28 18:50:26 +01:00
Martin Kroeker
a5ab891292 Add rewritten schkee.F from Reference-LAPACK PR335 2021-02-28 18:49:50 +01:00
Martin Kroeker
90bb4ac821 Add rewritten zchkee.F from Reference-LAPACK PR335 2021-02-28 18:49:10 +01:00
Martin Kroeker
23a0d1bc1f Delete zchkee.f 2021-02-28 18:47:06 +01:00
Martin Kroeker
0e96c378fd Delete schkee.f 2021-02-28 18:46:52 +01:00
Martin Kroeker
ee16efff3c Delete dchkee.f 2021-02-28 18:46:38 +01:00
Martin Kroeker
0197519dd7 Delete cchkee.f 2021-02-28 18:46:08 +01:00
Martin Kroeker
865829cfac Merge pull request #3121 from RajalakshmiSR/mmarename
POWER10: Rename mma builtins
2021-02-27 19:15:49 +01:00
Rajalakshmi Srinivasaraghavan
0571c3187b POWER10: Rename mma builtins
The LLVM and GCC teams agreed to rename the __builtin_mma_assemble_pair and
__builtin_mma_disassemble_pair built-ins to __builtin_vsx_assemble_pair and
__builtin_vsx_disassemble_pair respectively. This patch is to make
corresponding changes in dgemm kernel. Also made changes in
inputs to those builtins to avoid some potential typecasting issues.

Reference gcc commit id:77ef995c1fbcab76a2a69b9f4700bcfd005d8e62
2021-02-26 20:56:34 -06:00
Martin Kroeker
d12a2d0d04 Merge pull request #3120 from martin-frbg/3118-x
Fix use of undefined CC variable in f_check
2021-02-26 11:50:47 +01:00
Martin Kroeker
2d369bd916 fix undefined CC variable 2021-02-26 09:09:43 +01:00
Martin Kroeker
93843c55b6 Merge pull request #15 from xianyi/develop
rebase
2021-02-26 09:06:25 +01:00
Martin Kroeker
e3a6132e12 Merge pull request #3119 from xianyi/revert-3118-issue3018-2
Revert "Fix undefined CC in f_check (again)"
2021-02-26 04:18:33 +01:00
Martin Kroeker
736f0146c3 Revert "Fix undefined CC in f_check (again)" 2021-02-26 04:18:04 +01:00
Martin Kroeker
897fc2b6ef Merge pull request #3118 from martin-frbg/issue3018-2
Fix undefined CC in f_check (again)
2021-02-25 13:48:41 +01:00
Martin Kroeker
441c116105 fix undefined CC again 2021-02-25 13:47:34 +01:00
Martin Kroeker
8ecd80a34a Merge pull request #14 from xianyi/develop
rebase
2021-02-25 13:45:27 +01:00
Martin Kroeker
4ba53db0da Merge pull request #3117 from haampie/fix-perl
use /usr/bin/env perl
2021-02-24 18:39:28 +01:00
Martin Kroeker
6c365ff648 Merge pull request #3114 from martin-frbg/issue3113
Fix dll_callback and p_process_term signatures for USE_TLS on Windows x64
2021-02-24 18:38:25 +01:00
Martin Kroeker
e33bcdbb7b Merge pull request #3115 from martin-frbg/issue2532
Replace unoptimized OMATCOPY_RT with 4x4 blocked version
2021-02-24 18:37:36 +01:00
Harmen Stoppels
ec6b354c32 use /usr/bin/env perl 2021-02-24 14:07:20 +01:00
Martin Kroeker
292d1af1a0 Update omatcopy_rt.c 2021-02-24 09:34:14 +01:00
Martin Kroeker
325b398e3c Update omatcopy_rt.c 2021-02-24 09:13:12 +01:00
Martin Kroeker
6f5667b4d4 Enable optimized S/D OMATCOPY_RT 2021-02-24 09:03:41 +01:00
Martin Kroeker
cceeee7806 Add optimized omatcopy_rt 2021-02-24 09:00:54 +01:00
Martin Kroeker
0a4546b742 Typo fix 2021-02-23 13:14:35 +01:00
Martin Kroeker
b1eed27a54 Replace naive omatcopy_rt with 4x4 blocked implementation
as suggested by MigMuc in issue 2532
2021-02-22 21:35:42 +01:00
Martin Kroeker
1a3ad4b670 Fix signatures of the TLS-mode dll_callback and p_process_term functions for Win64 2021-02-22 19:40:36 +01:00
Martin Kroeker
86a5f98e4a Merge pull request #13 from xianyi/develop
rebase
2021-02-22 19:31:41 +01:00
Martin Kroeker
1caa44bea9 Merge pull request #3111 from hawkinsp/forkrace
Fix race in blas_thread_shutdown.
2021-02-19 09:57:18 +01:00
Peter Hawkins
dbbf92c1d1 Fix race in blas_thread_shutdown.
blas_server_avail was read without holding server_lock. If multiple threads call blas_thread_shutdown simultaneously, for example, by calling fork(), then they can attempt to shut down multiple times. This can lead to a segmentation fault.
2021-02-18 13:46:50 -05:00
Martin Kroeker
cb429d6b12 Merge pull request #3110 from martin-frbg/issue3108
Fix get_num_procs()  in the USE_TLS branch for non-glibc systems
2021-02-18 15:45:25 +01:00
Martin Kroeker
b0bded3f2f Fix get_num_procs() in the USE_TLS branch for non-glibc systems 2021-02-18 11:14:05 +01:00
Martin Kroeker
f9aaf22fc3 Merge pull request #3105 from martin-frbg/tigerlake
Recognize Intel Tiger Lake CPUID as SkylakeX
2021-02-12 13:29:53 +01:00
Martin Kroeker
35ff3c731d Merge pull request #3106 from RajalakshmiSR/ppcbe
Fix build issue on POWER8 with DYNAMIC_ARCH
2021-02-12 13:29:23 +01:00
Rajalakshmi Srinivasaraghavan
63fa6c832e Fix build issue on POWER8 with DYNAMIC_ARCH
Running make DYNAMIC_ARCH=1 on POWER 8 BE with gcc10.2 version, gives
the following error due to the difference in UNROLL_M/N.
'No rule to make target 'dgemm_incopy_POWER10.o', needed by kernel'
2021-02-11 21:28:03 -06:00
Martin Kroeker
e4e5042e38 Recognize Intel Tiger Lake as SkylakeX 2021-02-11 20:17:11 +01:00
Martin Kroeker
ae53e3e233 Recognize Intel Tiger Lake as SkylakeX 2021-02-11 20:16:27 +01:00
Martin Kroeker
074d9bff7f Merge pull request #3104 from martin-frbg/issue3103
Enable optimized Haswell/AVX2 kernels for sasum/dasum and srot/drot on Ryzen
2021-02-11 15:42:47 +01:00
Martin Kroeker
f36862603a Merge pull request #3101 from jake-arkinstall/issue-3100
Addressed issue #3100 - removing an unnecessary write to the include directory
2021-02-11 15:42:18 +01:00
Martin Kroeker
47691c031f Use Haswell optimizations for Zen as well 2021-02-11 09:26:15 +01:00
Martin Kroeker
ce7ddd8921 Use Haswell optimizations for Zen as well 2021-02-11 09:25:36 +01:00
Martin Kroeker
950c047b49 Use Haswell optimizations for Zen as well 2021-02-11 09:24:51 +01:00
Martin Kroeker
46509953a9 Use Haswell optimizations for Zen as well 2021-02-11 09:24:16 +01:00
Martin Kroeker
db348dcff2 Enable optimized srot/drot kernels from Haswell 2021-02-11 09:23:05 +01:00
Martin Kroeker
a33f471065 Merge pull request #3102 from martin-frbg/issue3099
Strip pkgversion info from compiler version string before comparing
2021-02-11 08:56:46 +01:00
Martin Kroeker
ece3ce581e Strip parenthesized (pkgversion) data from GCC version string to avoid misinterpretation 2021-02-10 14:22:59 +01:00
Martin Kroeker
8189a98d85 Merge pull request #12 from xianyi/develop
rebase
2021-02-10 14:17:24 +01:00
Jake Arkinstall
d7a77091a3 Addressed issue #3100, removing an unnecessary write to the include directory 2021-02-10 12:11:17 +00:00
Martin Kroeker
3e1e74fca6 Merge pull request #3094 from xoviat/patch-1
build openmp on appveyor
2021-02-02 13:36:17 +01:00
Martin Kroeker
33b5670122 Merge pull request #3096 from martin-frbg/fixclangcmake
Fix Cooperlake/DYNAMIC_ARCH builds with clang on Windows
2021-02-02 13:33:15 +01:00
Martin Kroeker
95e19e2e23 fix case in compiler name check
Co-authored-by: xoviat <49173759+xoviat@users.noreply.github.com>
2021-02-02 10:53:46 +01:00
Martin Kroeker
99ac042702 remove spurious lines (probably editor malfunction) 2021-02-01 21:02:53 +01:00
Martin Kroeker
774b9f8653 handle AppleClang in Cooperlake support condition 2021-02-01 20:18:53 +01:00
Martin Kroeker
eb1d2344f7 Fix compiler version check for Intel Cooperlake support (clang-cl does not accept -dumpversion) 2021-02-01 19:45:25 +01:00
xoviat
6fa9860dbe appveyor: cleanup and add openmp run 2021-01-31 16:32:04 -06:00
Martin Kroeker
0cc36770f1 Merge pull request #3073 from xoviat/embedded
add embedded option
2021-01-31 18:02:41 +01:00
Martin Kroeker
558cd543bf Merge pull request #3093 from martin-frbg/fix3064
fix copy-paste error in build rules for cblas_crotg and cblas_zrotg
2021-01-30 22:21:28 +01:00
Martin Kroeker
bd906e3410 fix copy-paste error in build rules for cblas_crotg and cblas_zrotg 2021-01-30 16:46:25 +01:00
Martin Kroeker
35086cb501 Merge pull request #3092 from RajalakshmiSR/cscal_p10
Optimize cscal function for POWER10
2021-01-30 16:23:37 +01:00
Rajalakshmi Srinivasaraghavan
2056ffc227 Optimize cscal function for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2021-01-29 13:51:43 -06:00
Martin Kroeker
7745439312 Merge pull request #3091 from martin-frbg/lapack477-2
Fix calculation of the non-exceptional shift values in LAPACK complex QZ
2021-01-29 13:37:23 +01:00
Martin Kroeker
c4b5abbe43 fix data type 2021-01-29 10:45:36 +01:00
Martin Kroeker
f87842483e fix calculation of non-exceptional shift (from Reference-LAPACK PR 477) 2021-01-29 09:56:12 +01:00
Martin Kroeker
3dbb32c734 Merge pull request #11 from xianyi/develop
rebase
2021-01-29 09:52:21 +01:00
xoviat
609ea80276 enable testing 2021-01-27 16:39:52 -06:00
xoviat
3dfecaaf7c require nofortran to be set on msvc 2021-01-27 16:39:15 -06:00
xoviat
3165c915b6 fix test helpers 2021-01-27 15:24:49 -06:00
xoviat
457ccc42c9 Merge branch 'develop' into msvc 2021-01-27 14:15:59 -06:00
Martin Kroeker
00880c720a Merge pull request #3087 from martin-frbg/lapack477
Apply Reference-LAPACK PR 477 for convergence problems in CHGEQZ/ZHGEQZ
2021-01-27 19:11:55 +01:00
Martin Kroeker
856bc36533 Add exceptional shift to fix rare convergence problems 2021-01-27 13:41:45 +01:00
Martin Kroeker
fe71887b68 Merge pull request #10 from xianyi/develop
rebase
2021-01-27 13:39:26 +01:00
Martin Kroeker
10094bd885 Merge pull request #3076 from martin-frbg/dyn-thunderx
Add Ci job for ARM64/gcc10 DYNAMIC_ARCH
2021-01-27 13:25:45 +01:00
Martin Kroeker
eea0c0f2ed Merge pull request #3085 from alexhenrie/memory_alloc
Fix null pointer check in blas_memory_alloc
2021-01-26 20:11:42 +01:00
Martin Kroeker
85be43e0df Merge pull request #3083 from martin-frbg/develop
Add DYNAMIC_LIST support for ARM64
2021-01-26 15:13:35 +01:00
Martin Kroeker
0cb9e9fc8d Remove the VORTEX support bits again for now 2021-01-25 19:02:21 +01:00
Martin Kroeker
cb61d3b46b Add DYNAMIC_LIST support for ARM64 2021-01-25 13:13:20 +01:00
Alex Henrie
113840da12 Fix null pointer check in blas_memory_alloc 2021-01-24 22:20:44 -07:00
Martin Kroeker
deb2e66bcc Add DYNAMIC_LIST support for ARM64 2021-01-24 23:18:52 +01:00
Martin Kroeker
9b2d69aa80 Add DYNAMIC_LIST option for ARM64 2021-01-24 23:18:01 +01:00
Martin Kroeker
e3ff4cdd23 Merge pull request #9 from xianyi/develop
rebase
2021-01-24 23:14:45 +01:00
Martin Kroeker
0745ba43a4 Merge pull request #3082 from RajalakshmiSR/scalp10
Optimize s/dscal function for POWER10
2021-01-24 19:03:40 +01:00
Rajalakshmi Srinivasaraghavan
3ede843d50 Optimize s/dscal function for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2021-01-24 07:48:28 -06:00
xoviat
2e8d6e8690 add functions for embedded 2021-01-23 22:12:17 -06:00
Martin Kroeker
69a5558203 Merge pull request #3059 from Guobing-Chen/BF16_gemm
Initial code for Cooperlake BF16 GEMM kernel
2021-01-23 19:08:05 +01:00
Martin Kroeker
d6905403e3 Merge pull request #3068 from alexhenrie/scan-build
scan-build fixes
2021-01-23 19:06:29 +01:00
Martin Kroeker
411926b572 Merge pull request #3079 from RajalakshmiSR/rotp10
Optimize s/drot function for POWER10
2021-01-22 08:26:00 +01:00
Rajalakshmi Srinivasaraghavan
439b93f6d2 Optimize s/drot function for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2021-01-21 13:24:45 -06:00
Martin Kroeker
d6cf67778c Merge pull request #3075 from martin-frbg/issue3074
Fix DYNAMIC_ARCH compilation on POWER with gcc <11
2021-01-21 08:51:30 +01:00
Martin Kroeker
b94dab5250 patch to support power10 in builtin_cpu_is was backported to gcc 10.2, so allow that as wel 2021-01-20 21:34:36 +01:00
Martin Kroeker
6178974cd9 Update .drone.yml 2021-01-20 20:21:27 +01:00
Martin Kroeker
0b9e4d1278 Add gcc10/arm64 DYNAMIC_ARCH build 2021-01-20 18:30:05 +01:00
Martin Kroeker
63fa3c3f8f Require gcc 11 for builtin_cpu_is(power10)
fixes #3074
2021-01-20 15:41:04 +01:00
Martin Kroeker
3612d9a57a Merge pull request #8 from xianyi/develop
rebase
2021-01-20 15:38:30 +01:00
xoviat
b60de4447a add cortex-m platform 2021-01-19 08:57:44 -06:00
Martin Kroeker
16dddb760e Merge pull request #3070 from RajalakshmiSR/cdot
Optimize cdot function for POWER10
2021-01-16 15:47:34 +01:00
Rajalakshmi Srinivasaraghavan
eff7c9166e Optimize cdot function for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2021-01-15 13:40:34 -06:00
Alex Henrie
f1bf2603e6 Remove dead assignment to dflag in rotmg functions 2021-01-14 19:40:32 -07:00
Alex Henrie
6f32991eae Don't define the mode variable when not needed in gemm functions 2021-01-14 19:40:31 -07:00
Alex Henrie
202fc9e8ed Fix uninitialized argument value in dasum_k 2021-01-14 19:40:31 -07:00
Martin Kroeker
e378b24487 Merge pull request #3067 from albertziegenhagel/fix-generic-cmake
Fix building "generic" TRMM kernel with CMake
2021-01-14 21:35:19 +01:00
Martin Kroeker
3628b22d49 Merge pull request #3064 from martin-frbg/issue3063
Add cblas_crotg, cblas_zrotg, cblas_csrot and cblas_zdrot
2021-01-14 16:47:59 +01:00
Martin Kroeker
af2b0d0205 Merge pull request #3066 from martin-frbg/buffsizefix
Fix compile-time setting of the GEMM buffer size for gmake builds
2021-01-14 16:00:38 +01:00
Martin Kroeker
4bf988959a Merge pull request #3062 from austinpagan/GemmPreferedSize3
Added definitions for GEMM_PREFERED_SIZE and SWITCH_RATIO to the POWE…
2021-01-14 15:59:53 +01:00
Martin Kroeker
a0e4fb3a28 Merge pull request #3061 from martin-frbg/arm64-pgi
Support NVIDIA HPC SDK on ARM64
2021-01-14 15:59:21 +01:00
Martin Kroeker
2c445be8ba Merge pull request #3051 from martin-frbg/rocketlake
Add CPUID information for Intel Rocket Lake
2021-01-14 15:56:25 +01:00
Albert Ziegenhagel
e3f4063683 Fix building "generic" TRMM kernel with CMake
The CMake "TARGET_CORE" variables stores the "generic" target name in all lowercase letters, but gets compared to an all uppercase string, which results in the wrong TRMM kernel being selected.
This commit converts the TARGET_CORE to all uppercase before comparing its value to make sure case mismatches are not an issue in the future anymore.
2021-01-14 10:00:49 +01:00
Martin Kroeker
6bbe6d5b92 Make compile-time BUFFERSIZE setting actually reach the compiler/preprocessor 2021-01-13 22:36:04 +01:00
Martin Kroeker
89ae305e11 Workaround for cmake having its own C_COMPILER variable 2021-01-13 12:30:26 +01:00
Martin Kroeker
da8d7f09f1 try to work around gcc update problems 2021-01-13 09:46:53 +01:00
Martin Kroeker
25c986db5a Add prototypes for CBLAS_CROTG and CBLAS_ZROTG 2021-01-13 00:30:27 +01:00
Martin Kroeker
a8f249458d Build CBLAS interfaces for CROTG and ZROTG as well 2021-01-13 00:29:38 +01:00
Martin Kroeker
bc5b35367f restore Makefile after accidental overwrite 2021-01-13 00:28:43 +01:00
Martin Kroeker
930aff2c2e Build CBLAS interfaces for CROTG and ZROTG as well 2021-01-13 00:27:42 +01:00
Martin Kroeker
ac3e2a3fdd Add CBLAS interfaces for csrot and zdrot 2021-01-12 23:22:00 +01:00
Martin Kroeker
9ccb12b031 Add prototypes for cblas_csrot and cblas_zdrot 2021-01-12 23:20:07 +01:00
Martin Kroeker
e18a2c22db Merge pull request #3060 from martin-frbg/dyn_arm64
Label the assembly part of the ARMV8 dynamic arch detection as volatile
2021-01-12 23:02:05 +01:00
Martin Kroeker
b716c0ef01 Add workaround for NVIDIA HPC 2021-01-12 16:51:35 +01:00
Martin Kroeker
2efa3b70dc Add workaround for NVIDIA HPC 2021-01-12 16:49:39 +01:00
Martin Kroeker
49959d4f1c Add workaround for NVIDIA HPC 2021-01-12 16:47:15 +01:00
Martin Kroeker
0f27a03607 Add workaround for NVIDIA HPC mishandling of the asm DOT kernels 2021-01-12 16:39:35 +01:00
Martin Kroeker
c2a8ebfe69 Add workaround for NVIDIA HPC mishandling of the asm DOT kernels 2021-01-12 16:38:51 +01:00
Martin Kroeker
43aac5bacc Support NVIDIA HPC compiler 2021-01-12 16:36:12 +01:00
Martin Kroeker
bff2b7c94d Support compilation with NVIDIA HPC compilers (which do not take gcc-style arch options) 2021-01-12 16:34:18 +01:00
Martin Kroeker
2d45a262d9 Support compilation with nvfortran 2021-01-12 16:32:29 +01:00
Gordon Fossum
ed652d8136 Added definitions for GEMM_PREFERED_SIZE and SWITCH_RATIO to the POWER9 and POWER10 specific sections of param.h. 2021-01-11 21:13:53 -05:00
Martin Kroeker
6fe0f1fab9 Label get_cpu_ftr as volatile to keep gcc from rearranging the code 2021-01-11 19:05:29 +01:00
Chen, Guobing
b0beb0b1ca Initial code for Cooperlake BF16 GEMM kernel 2021-01-11 02:15:21 +08:00
Martin Kroeker
018dec8588 Merge pull request #7 from xianyi/develop
rebase
2021-01-10 17:09:46 +01:00
Martin Kroeker
5d6209e1f9 Merge pull request #3055 from RajalakshmiSR/swapp10
Optimize swap function for POWER10
2021-01-09 00:11:44 +01:00
Rajalakshmi Srinivasaraghavan
601b711c78 Optimize swap function for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2021-01-08 08:01:36 -06:00
Martin Kroeker
78702753f2 Merge pull request #3053 from pkubaj/patch-1
Fix build on FreeBSD/powerpc64le
2021-01-02 16:14:07 +01:00
pkubaj
7aa1ff8ff6 Fix build on FreeBSD/powerpc64le 2021-01-01 21:19:57 +00:00
Martin Kroeker
d6c97cf010 Merge pull request #3052 from ashwinyes/arm64_fix_nrm2
arm64: Fix nrm2 for input vectors with Inf
2021-01-01 15:51:07 +01:00
Ashwin Sekhar T K
1b2508362b arm64: Fix nrm2 for input vectors with Inf
Fix double precision nrm2 kernels returning NaN when the
input vectors contain Inf/-Inf.
2021-01-01 02:49:37 -08:00
Martin Kroeker
cd898af59f Merge pull request #3050 from aurel32/riscv64-openblas-supported
getarch.c: define OPENBLAS_SUPPORTED for riscv64
2020-12-29 21:59:40 +01:00
Aurelien Jarno
0a535e58d8 getarch.c: define OPENBLAS_SUPPORTED for riscv64 2020-12-29 12:06:39 +00:00
Martin Kroeker
9ce9e295fe Merge pull request #3049 from martin-frbg/readme
Expand the introductory paragraph of the README with links to netlib docs and linear algebra lecture videos
2020-12-27 22:54:20 +01:00
Martin Kroeker
9a38592c79 Add pointers to the netlib documentation and Gilbert Strang's linear algebra primers 2020-12-27 21:55:08 +01:00
Martin Kroeker
9b3965b08c Merge pull request #6 from xianyi/develop
rebase
2020-12-27 21:28:10 +01:00
Martin Kroeker
531cb4f673 Merge pull request #3035 from Joshua-Ashton/patch-1
Define BLAS acronym in README
2020-12-27 21:26:52 +01:00
Martin Kroeker
3559c5d7a2 Merge pull request #3048 from martin-frbg/issue2998
Temporarily revert to the old NRM2 kernels for ThunderX2/3 and NeoverseN1
2020-12-21 13:30:08 +01:00
Martin Kroeker
8631e2976a Temporarily revert to the old nrm2 kernels 2020-12-21 07:45:13 +01:00
Martin Kroeker
2768bc1764 Temporarily revert to the old nrm2 kernels 2020-12-21 07:42:51 +01:00
Martin Kroeker
6f4698ee1f Temporarily revert to the old nrm2 kernel 2020-12-21 07:41:18 +01:00
Martin Kroeker
85e5165e98 Merge pull request #3046 from martin-frbg/nvidiasdk-ppc
Support NVIDIA HPC SDK on POWERPC
2020-12-20 11:55:53 +01:00
Martin Kroeker
17c16f2a71 Implement builtin_cpu_is and limit cpu choices to P8 and P9 for NVIDIA compilers 2020-12-19 23:21:22 +01:00
Martin Kroeker
91c3f86c2b NVIDIA compiler does not yet support POWER10 2020-12-19 23:19:05 +01:00
Martin Kroeker
75b1f3becc Limit POWERPC DYNAMIC_CORE list to P8 and P9 for NVIDIA compilers 2020-12-19 23:17:40 +01:00
Martin Kroeker
07c5e549b2 Merge pull request #3045 from martin-frbg/nvidiasdk
Support NVIDIA HPC SDK 20.11 compilers on x86_64
2020-12-19 23:14:02 +01:00
Martin Kroeker
114eb159a4 Disable FMA intrinsics in the srot kernel when the compiler is PGI/NVIDIA 2020-12-19 22:15:58 +01:00
Martin Kroeker
005cce5507 Amend SkylakeX options to support the NVIDIA compiler 2020-12-19 22:11:49 +01:00
Martin Kroeker
b859b6e79d Add nvfortran 2020-12-19 22:09:57 +01:00
Martin Kroeker
b212a2fb9f Add/modify "PGI" compiler options for NVIDIA SDK 20.11 2020-12-19 22:08:37 +01:00
Martin Kroeker
e40416567a Add version printout for PGI/NVIDIA compiler 2020-12-19 22:06:56 +01:00
Martin Kroeker
b37e5fa2f8 Merge pull request #5 from xianyi/develop
rebase
2020-12-19 20:11:06 +01:00
Martin Kroeker
326469ef4a Merge pull request #3042 from martin-frbg/develop
Move FMA3 option setting to the kernel makefile
2020-12-19 20:04:19 +01:00
Martin Kroeker
c73d8ee40d Conditionally add -mfma to compiler options where needed 2020-12-17 11:34:05 +01:00
Martin Kroeker
abef2ea770 Move -fma option setting to kernel/Makefile.L1 2020-12-17 11:32:27 +01:00
Martin Kroeker
b26e32c3af Merge pull request #3040 from martin-frbg/fixfcheck
Fix undefined CC variable in check for clang+gfortran combo
2020-12-16 00:05:04 +01:00
Martin Kroeker
7822eff936 Merge pull request #3038 from martin-frbg/issue3037
Fix spurious assumption of cross-compilation on some architectures
2020-12-16 00:04:45 +01:00
Martin Kroeker
865676682d Add Intel Rocket Lake 2020-12-14 22:40:23 +01:00
Martin Kroeker
0f7776af0b Add Intel Rocket Lake 2020-12-14 22:30:36 +01:00
Martin Kroeker
b03dc011be Fix undefined CC variable in clang check 2020-12-14 19:21:52 +01:00
Martin Kroeker
00ce35336e Fix spurious removal of a trailing character from the hostarch string on x86_64 2020-12-13 21:28:01 +01:00
Martin Kroeker
723776ddf7 Merge pull request #4 from xianyi/develop
rebase
2020-12-13 21:22:41 +01:00
Martin Kroeker
5a77ec7f1c Merge pull request #3036 from RajalakshmiSR/p10copyalign
POWER10: Improve copy performance
2020-12-13 21:21:34 +01:00
Rajalakshmi Srinivasaraghavan
2fb11f873b POWER10: Improve copy performance
This patch aligns the stores to 32 byte boundary for scopy and dcopy
before entering into vector pair loop. For ccopy, changed the store
instructions to stxv to improve performance of unaligned cases.
2020-12-13 10:41:45 -06:00
Joshie
ad63647446 Define BLAS acronym in README 2020-12-13 09:06:14 +00:00
Martin Kroeker
87315e8a8d Update version to 0.3.13.dev 2020-12-12 23:28:49 +01:00
Martin Kroeker
9031ebd7d5 Update version to 0.3.13.dev 2020-12-12 23:28:20 +01:00
Martin Kroeker
12b41d5598 Merge pull request #3034 from xianyi/release-0.3.0
Merge back the release branch into develop to copy tag
2020-12-12 23:27:40 +01:00
Martin Kroeker
d2b11c4777 Merge pull request #3033 from xianyi/develop
Update branch from develop to release 0.3.13
2020-12-12 18:19:29 +01:00
Martin Kroeker
7bc0e4a2e0 Update version to 0.3.13 for release 2020-12-12 18:15:33 +01:00
Martin Kroeker
d3ec787f77 Update version to 0.3.13 for release 2020-12-12 18:14:49 +01:00
Martin Kroeker
2c309c235d Merge pull request #3031 from martin-frbg/changelog13
Update Changelog.txt
2020-12-12 18:13:23 +01:00
Martin Kroeker
3dec81200c Update Changelog.txt
Co-authored-by: h-vetinari <h.vetinari@gmx.com>
2020-12-12 14:27:37 +01:00
Martin Kroeker
737724607f Merge pull request #3030 from martin-frbg/fix2994
Make fallback from POWER10 to POWER9 depend on new enough compiler
2020-12-12 10:01:45 +01:00
Martin Kroeker
77edf82c7f Update Changelog.txt for 0.3.13 2020-12-12 01:25:20 +01:00
Martin Kroeker
6232237dba Make fallback from P10 to P9 conditional on suitable compiler 2020-12-11 23:41:17 +01:00
Martin Kroeker
7d81acc762 Merge pull request #3 from xianyi/develop
rebase
2020-12-11 23:38:42 +01:00
Martin Kroeker
18d8a67485 Merge pull request #2994 from antonblanchard/power10-fixes
Power10 fixes
2020-12-11 23:37:30 +01:00
Martin Kroeker
043128cbe5 Merge pull request #3029 from RajalakshmiSR/axpyp10
POWER10: Improve axpy performance
2020-12-10 22:49:28 +01:00
Martin Kroeker
3331ca492d Merge pull request #3021 from austinpagan/trsm_p10
POWER: Added special unrolled vectorized versions of "Solve" for specific si…
2020-12-10 19:42:54 +01:00
Rajalakshmi Srinivasaraghavan
346e30a46a POWER10: Improve axpy performance
This patch aligns the stores to 32 byte boundary for saxpy and daxpy
before entering into vector pair loop. Fox caxpy, changed the store
instructions to stxv to improve performance of unaligned cases.
2020-12-10 11:51:42 -06:00
Martin Kroeker
83de62c20d Merge pull request #3026 from martin-frbg/revert747
Revert PR747 - SYRK parameter changes for Haswell and related targets
2020-12-10 16:29:41 +01:00
Martin Kroeker
658da9a769 Merge pull request #3027 from gxw-loongson/develop
Add msa support for loongson
2020-12-10 16:27:30 +01:00
gxw
be24c66a7c Keep LOONGSON3A and LOONGSON3B for loongson 2020-12-10 10:53:13 +08:00
gxw
4b548857d6 Add msa support for loongson
1. Using core loongson3r3 and loongson3r4 for loongson
2. Add DYNAMIC_ARCH for loongson

Change-Id: I1c6b54dbeca3a0cc31d1222af36a7e9bd6ab54c1
2020-12-09 10:28:46 +08:00
Martin Kroeker
d71fe4ed4e Remove GEMM_DEFAULT_UNROLL_MN parameters for Haswell and ZEN (introduced in PR747) 2020-12-08 21:07:57 +01:00
Martin Kroeker
a554712439 remove extra/intermediate size step for min_jj introduced in PR747 2020-12-08 21:01:36 +01:00
Martin Kroeker
5d26223f4a remove extra/intermediate size step of min_jj from PR747 2020-12-08 20:59:56 +01:00
Martin Kroeker
980ab349bc Merge pull request #2 from xianyi/develop
rebase
2020-12-08 20:53:35 +01:00
gxw
d67babf345 Remove gcc unrecognized option '-msched-weight' when check msa 2020-12-08 19:16:39 +08:00
Martin Kroeker
7f11e33e8d Merge pull request #3025 from TiredNotTear/develop
MIPS: Fix two bugs
2020-12-08 09:39:27 +01:00
Xianyi Zhang
7834c10e2f Add PingTouGe contribution credit. 2020-12-07 16:55:05 +08:00
Martin Kroeker
53e0837809 Merge pull request #3022 from jinboson/develop
Fix test errors reported by cblas_cgemm & cblas_ctrmm
2020-12-07 08:09:11 +01:00
Hao Chen
ad38bd0e89 Fix failed cgemv and zgemv test case after using msa optimization
The cgemv and zgemv test case will call cgemv_n/t_msa.c zgemv_n/t_msa.c files in MIPS environment.
When the macro CONJ is defined, the calculation result will be wrong due to the wrong definition of OP2.
This patch updates the value of OP2 and passes the corresponding test.
2020-12-07 10:25:01 +08:00
Hao Chen
47b639cc9b Fix failed sswap and dswap case by using msa optimization
The swap test case will call sswap_msa.c and dswap_msa.c files in MIPS environmnet.
When inc_x or inc_y is equal to zero, the calculation result of the two functions will be wrong.
This patch adds the processing of inc_x or inc_y equal to zero, and the swap test case has passed.
2020-12-07 10:24:49 +08:00
Martin Kroeker
8fef5876d1 Merge pull request #3024 from martin-frbg/sparc
Fix 32 and 64bit builds on SPARC with SolarisStudio compilers
2020-12-06 22:34:36 +01:00
Martin Kroeker
6c7d557a16 Fix compiler options for 32 and 64bit SPARC builds with SolarisStudio 2020-12-06 19:20:50 +01:00
Martin Kroeker
b660008c7e Work around DOT and SWAP test failures 2020-12-06 19:15:37 +01:00
Martin Kroeker
f8346603cf Fix compilation with SolarisStudio 2020-12-06 19:14:16 +01:00
Martin Kroeker
93473174d6 Fix utest build with SolarisStudio compilers 2020-12-06 19:12:56 +01:00
Martin Kroeker
b0b14f4e9b Change comments to C style for compatibility 2020-12-06 19:12:02 +01:00
Martin Kroeker
3a1b1b7c8c Fix complex ABI for 32bit SolarisStudio builds 2020-12-06 19:08:43 +01:00
Martin Kroeker
da6d5d675c Fix hostarch detection for sparc 2020-12-06 19:07:45 +01:00
Martin Kroeker
04fa17322c Fix build options for SolarisStudio compilers 2020-12-06 19:05:27 +01:00
Martin Kroeker
3853014ea1 Merge pull request #1 from xianyi/develop
rebase
2020-12-06 18:52:51 +01:00
Jin Bo
65de6f5957 Fix test errors reported by cblas_cgemm & cblas_ctrmm
The file cgemm_kernel_8x4_msa.c holds the MSA optimization
codes of cblas_cgemm and cblas_ctrmm. It defines two
macros: CGEMM_SCALE_1X2 and CGEMM_TRMM_SCALE_1X2. The pc1
array index in the two macros should be 0 and 1.
2020-12-05 15:08:17 +08:00
Gordon Fossum
213c0e7abb Added special unrolled vectorized versions of "Solve" for specific sizes,
in DTRSM and STRSM, to improve performance in Power9 and Power10.
2020-12-04 17:07:06 -06:00
Martin Kroeker
f21618684b Merge pull request #3018 from martin-frbg/issue3015
Avoid concurrent inclusion of libgomp and libomp in clang+gfortran builds
2020-12-04 22:08:17 +01:00
Martin Kroeker
441c08c9ff Merge pull request #3016 from xiegengxin/complex-asum
Improve the performance of zasum and casum with AVX512 intrinsic
2020-12-04 22:07:16 +01:00
Martin Kroeker
66302b3c06 Merge pull request #3013 from martin-frbg/gcc46
Fix 32bit x86 builds and add workaround for x86_64 miscompilations by gcc 4.6 (including our Travis setup)
2020-12-04 08:54:11 +01:00
Martin Kroeker
07e9a12349 Merge pull request #3011 from cyyever/fix_link
link math lib on FreeBSD
2020-12-04 08:50:59 +01:00
Martin Kroeker
dd1adbdec4 Merge pull request #3019 from RajalakshmiSR/dgemm_param
POWER10: Update param.h
2020-12-04 08:49:28 +01:00
Martin Kroeker
a1eecccda2 Update f_check 2020-12-03 23:43:17 +01:00
Rajalakshmi Srinivasaraghavan
41fe6e864e POWER10: Update param.h
Increasing the values of DGEMM_DEFAULT_P and DGEMM_DEFAULT_Q helps
in improving performance ~10% for DGEMM.
2020-12-03 14:40:11 -06:00
Martin Kroeker
74b5850581 Add libomp to the LAPACK(-test) dependencies in clang/gfortran builds 2020-12-03 21:28:10 +01:00
Martin Kroeker
da0c94c76f Avoid linking both GNU libgomp and LLVM libomp in clang/gfortran builds 2020-12-03 21:25:57 +01:00
Martin Kroeker
a6692dc129 use gfortran-10 with xcode 12 2020-12-03 14:32:21 +01:00
Martin Kroeker
72a553f5bc Update .travis.yml 2020-12-03 09:17:27 +01:00
Martin Kroeker
dcbb3b5ef1 fix misplaced lines 2020-12-02 23:13:13 +01:00
Martin Kroeker
57456c248b fix gfortran requirement in osx interface64 test 2020-12-02 15:56:21 +01:00
Martin Kroeker
c361313564 Disable deprecated 32bit xcode 2020-12-02 07:49:43 +01:00
Gengxin Xie
0cb7a403b2 fix error declare function blas_level1_thread_with_return_value 2020-12-02 09:51:52 +08:00
Martin Kroeker
77a538d4ba Update an overlooked instance of xcode 10.0 as well 2020-12-01 22:05:35 +01:00
Martin Kroeker
9621062eba Update OSX xcode version to 11.5 2020-12-01 12:23:30 +01:00
Gengxin Xie
b766c1e9bb Improve the performance of zasum and casum with AVX512 intrinsic 2020-12-01 16:49:26 +08:00
Martin Kroeker
22574b474e Suppress -mfma as well for gcc 4.6 2020-11-30 21:41:51 +01:00
Martin Kroeker
f662022994 Move the version check to avoid overwriting unprocessed compiler data 2020-11-30 17:24:27 +01:00
Martin Kroeker
5e81e81478 Merge pull request #3014 from RajalakshmiSR/dgemvnp10
POWER10:  Optimize dgemv_n
2020-11-30 08:18:24 +01:00
Rajalakshmi Srinivasaraghavan
7d46e31de1 POWER10: Optimize dgemv_n
Handling as 4x8 with vector pairs gives better performance than
existing code in POWER10.
2020-11-29 15:28:28 -06:00
Martin Kroeker
62a2eb884f Add SSE flags for x86 2020-11-29 15:33:07 +01:00
Martin Kroeker
2e99e2699b Add workaround for gcc 4.6 miscompiling assembly kernels with -mavx 2020-11-29 15:32:17 +01:00
Martin Kroeker
006b13299f Merge pull request #3012 from martin-frbg/restore-getarch
Restore RISCV entries accidentally trashed by my PR 3005
2020-11-29 13:27:47 +01:00
Martin Kroeker
ca17d3dc3d Restore RISCV entries accidentally trashed by my PR 3005 2020-11-29 13:19:51 +01:00
Martin Kroeker
52ed2741c5 Merge pull request #3010 from ggouaillardet/topic/fj_compilers
add Fujitsu compilers
2020-11-29 11:36:43 +01:00
cyy
3b4c016110 link math lib on FreeBSD 2020-11-29 17:17:35 +08:00
Gilles Gouaillardet
358100ec15 add Fujitsu compilers
Co-authored-by: Tomoki Karatsu <karatsu.spack@gmail.com>
2020-11-29 14:35:42 +09:00
Martin Kroeker
3788b6d156 Merge pull request #3005 from martin-frbg/ssefix
Add -msse for x86 and silence build warning in getarch
2020-11-23 08:35:32 +01:00
Martin Kroeker
bc5b1ddf0d Merge pull request #3004 from martin-frbg/bsd_getauxval
ARM64 DYNAMIC_ARCH build fix for BSD/OSX
2020-11-23 08:35:12 +01:00
Martin Kroeker
2f42d23104 Merge pull request #3002 from martin-frbg/issue3000
Ensure that all targets in a DYNAMIC_ARCH build on POWER use the same buffer size
2020-11-22 22:51:26 +01:00
Martin Kroeker
b72dd007dc Merge pull request #3001 from martin-frbg/issue2996
Fix ambiguous ifdefs in tests for user-defined options in Makefiles
2020-11-22 22:50:41 +01:00
Martin Kroeker
11ebe5fa25 Avoid redefinition warning 2020-11-22 21:16:07 +01:00
Martin Kroeker
01f01dae98 Add -msse if supported 2020-11-22 21:15:08 +01:00
Martin Kroeker
e7bf8ced6c Build fix for systems that do not support getauxval 2020-11-22 20:20:28 +01:00
Martin Kroeker
0256294921 Fix syntax mixup 2020-11-22 17:41:44 +01:00
Martin Kroeker
2b114c3f30 Restore proper Makefile 2020-11-22 17:16:22 +01:00
Martin Kroeker
60e1fddca7 Ensure that the same (large) BUFFERSIZE is used for all cpus in DYNAMIC_ARCH builds 2020-11-22 16:48:22 +01:00
Martin Kroeker
ebb8788696 Use ifneq instead of ifdef for CROSS option 2020-11-22 16:33:34 +01:00
Martin Kroeker
857afcc41d Use ifeq instead of ifdef for user-definable build options 2020-11-22 16:31:44 +01:00
Martin Kroeker
5fa305172a Use ifeq instead of ifdef for user-definable options 2020-11-22 16:29:56 +01:00
Martin Kroeker
d3ff1f889f Convert ifndefs to ifneq 2020-11-22 16:27:17 +01:00
Martin Kroeker
65eb7afaf4 Change ifndef CROSS to ifneq 2020-11-22 16:25:36 +01:00
Martin Kroeker
8a6b17f97d Change ifndefs to ifneq 2020-11-22 16:19:31 +01:00
Martin Kroeker
0f863f96e4 Merge pull request #112 from xianyi/develop
rebase
2020-11-22 16:17:19 +01:00
Martin Kroeker
437702e0e1 Merge pull request #2965 from epsilon-0/develop
allow setting soname without suffix or prefix
2020-11-22 12:25:33 +01:00
Martin Kroeker
f1bf040b25 Merge pull request #2988 from xiegengxin/smp-asum
Improve the performance of dasum and sasum when SMP is defined
2020-11-22 12:24:13 +01:00
Martin Kroeker
613e3b2baf Merge pull request #2997 from Flamefire/reproduce_crash
Add reproducer test for crash after fork
2020-11-22 12:22:57 +01:00
Xianyi Zhang
05a0ea2340 Merge branch 'risc-v' into develop 2020-11-22 16:05:32 +08:00
Xianyi Zhang
7037849498 Merge branch 'develop' into risc-v 2020-11-22 16:04:50 +08:00
Xianyi Zhang
c6c9c24d1b Update doc for C910. 2020-11-22 16:02:19 +08:00
Martin Kroeker
6dd71af0c3 Merge pull request #2995 from Flamefire/fix_thread_buffer_init
Don't overwrite blas_thread_buffer if already set
2020-11-20 09:42:10 +01:00
Alexander Grund
a05dc6e62b Add reproducer test for crash after fork
See #2993 for an analysis
2020-11-19 15:46:37 +01:00
Alexander Grund
60005eb47b Don't overwrite blas_thread_buffer if already set
After a fork it is possible that blas_thread_buffer has already
allocated memory buffers: goto_set_num_threads does allocate those
already and it may be called by num_cpu_avail in case the OpenBLAS
NUM_THREADS differ from the OMP num threads.
This leads to a memory leak which can cause subsequent execution of BLAS
kernels to fail.

Fixes #2993
2020-11-19 14:51:51 +01:00
Anton Blanchard
043f3d6faa POWER10: Use POWER9 as a fallback
If the toolchain is too old, or the mma features isn't set on a POWER10
fall back to the POWER9 loops.
2020-11-19 21:04:10 +11:00
Anton Blanchard
fdf71d66b3 POWER10: Fix ld version detection
LDVERSIONGTEQ35 needs to escape the '>' character.

LDVERSIONGTEQ35 is checking the system ld version which may be different
to the toolchain being used to compile OpenBLAS. We don't have a path
to the linker in our Makefiles, so (ab)use gcc -Wl,--version to get the
version of ld in our toolchain.
2020-11-19 20:50:42 +11:00
Martin Kroeker
7e9cb39a25 Merge pull request #2981 from Qiyu8/fix-sum
Fix sum optimize issues
2020-11-16 08:40:46 +01:00
Martin Kroeker
be075d53cf Merge pull request #2983 from Qiyu8/optimize-srot
Optimize the performance of rot by using universal intrinsics
2020-11-16 08:38:37 +01:00
Qiyu8
b00a0de132 remove the -mfma flag in when the host has AVX. 2020-11-16 09:14:56 +08:00
Martin Kroeker
d341a0fea0 Merge pull request #2989 from martin-frbg/cmake-fma
Fix missing -mfma compiler flag in cmake builds without DYNAMIC_ARCH
2020-11-13 12:35:09 +01:00
Martin Kroeker
ec4d77c47c Add -mfma for HAVE_FMA3 in the non-DYNAMIC_ARCH case as well 2020-11-13 09:16:34 +01:00
Martin Kroeker
02699226d0 Merge pull request #111 from xianyi/develop
rebase
2020-11-13 09:14:23 +01:00
Gengxin Xie
d6e7e05bb3 Improve the performance of dasum and sasum when SMP is defined 2020-11-13 14:20:52 +08:00
Qiyu8
ae0b1dea19 modify system.cmake to enable fma flag 2020-11-13 10:20:24 +08:00
Qiyu8
e0dac6b53b fix the CI failure of target specific option mismatch 2020-11-12 20:31:03 +08:00
Qiyu8
e5c2ceb675 fix the CI failure of lack the head 2020-11-12 17:35:17 +08:00
Qiyu8
a87e537b8c modify macro 2020-11-11 15:53:48 +08:00
Qiyu8
5bc0a7583f only FMA3 and vector larger than 128 have positive effects. 2020-11-11 15:18:01 +08:00
Qiyu8
8c0b206d4c Optimize the performance of rot by using universal intrinsics 2020-11-11 14:33:12 +08:00
Qiyu8
c4c591ac5a fix sum optimize issues 2020-11-10 16:16:38 +08:00
Xianyi Zhang
1ea6cfefdb Refs #2899. Merge branch 'damonyu1989-openblas-open-910' into risc-v 2020-11-10 09:38:43 +08:00
Xianyi Zhang
fc35b72ae1 Refs #2899
Merge branch 'openblas-open-910' of git://github.com/damonyu1989/OpenBLAS into damonyu1989-openblas-open-910
2020-11-10 09:38:04 +08:00
Xianyi Zhang
913cc9a4ca Merge branch 'develop' into risc-v 2020-11-10 09:18:25 +08:00
Martin Kroeker
ff16329cb7 Merge pull request #2972 from xiegengxin/rot-intrinsic
Improve the performance of rot by using AVX512 and AVX2 intrinsic
2020-11-08 22:43:00 +01:00
Martin Kroeker
433637ccd8 Merge pull request #2980 from martin-frbg/fixgetarch
Fix missing AVX2 and FMA3 capabilities in FORCE_target mode
2020-11-08 17:39:05 +01:00
Martin Kroeker
ec088bf33a Fix missing AVX2 and FMA3 capabilities in FORCE_target mode 2020-11-08 13:15:40 +01:00
Martin Kroeker
110c7a6de0 Merge pull request #2979 from RajalakshmiSR/dot_power10
Optimize sdot/ddot for POWER10
2020-11-08 10:19:34 +01:00
Martin Kroeker
d2faa1be4e Merge pull request #2978 from martin-frbg/fixdynfeatures
Fix handling of cpu capability flags in DYNAMIC_ARCH builds
2020-11-08 10:19:17 +01:00
Martin Kroeker
1c4cfdc139 Stay compatible with old gmake that did not support undefine 2020-11-08 00:12:55 +01:00
Martin Kroeker
f6a57d8f63 Update Makefile.system 2020-11-08 00:01:36 +01:00
Martin Kroeker
f4b7ba12b7 Update Makefile.system 2020-11-07 23:37:21 +01:00
Rajalakshmi Srinivasaraghavan
6e364981a8 Optimize sdot/ddot for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2020-11-07 15:21:58 -06:00
Martin Kroeker
b976a0bf40 Remove previous workaround for compiler flags related to cpu capabilities in x86_64 DYNAMIC_ARCH builds 2020-11-07 20:39:56 +01:00
Martin Kroeker
a04f532edf Reset cpu property flags between build cycles in DYNAMIC_ARCH mode 2020-11-07 20:37:03 +01:00
Martin Kroeker
ccb9731c7b Fix propagation of cpu properties to compiler options 2020-11-07 20:30:15 +01:00
Martin Kroeker
a29338aaa6 Remove extraneous quotes that caused a cmake policy warning 2020-11-07 20:27:42 +01:00
Martin Kroeker
438a8e5624 Fix placement of getarch call and spurious cpu property accumulation in DYNAMIC_ARCH builds 2020-11-07 20:26:12 +01:00
Martin Kroeker
e5967810b7 Merge pull request #110 from xianyi/develop
rebase
2020-11-07 20:22:41 +01:00
Martin Kroeker
ff74319ea5 Merge pull request #2977 from martin-frbg/issue2976
Fix macro name used in ifdef for POWERPC/PGI
2020-11-07 14:41:34 +01:00
Martin Kroeker
28d2dfe2b3 Fix macro name used in ifdef 2020-11-07 12:17:49 +01:00
Gengxin Xie
725ffbf041 fix typo 2020-11-05 16:25:17 +08:00
Gengxin Xie
d9ba49165a Improve the performance of rot by using AVX512 and AVX2 intrinsic 2020-11-05 15:12:36 +08:00
Martin Kroeker
60ab9c783f Merge pull request #2966 from martin-frbg/issue2964
Ensure that EXPRECISION is disabled for DYNAMIC_ARCH with TARGET=GENERIC and fix CMAKE DYNAMIC_ARCH builds
2020-11-04 16:02:46 +01:00
Martin Kroeker
8cc73fee98 Export NO_EXPRECISION after overriding for DYNAMIC_ARCH with GENERIC target 2020-11-03 23:47:04 +01:00
Martin Kroeker
0155cd53a3 Add -msse3 where needed for DYNAMIC_ARCH builds 2020-11-03 23:45:49 +01:00
Martin Kroeker
a9f9354296 Fix target test 2020-11-02 23:17:46 +01:00
Martin Kroeker
b9bc76aec4 Add files via upload 2020-11-02 22:43:50 +01:00
Martin Kroeker
f071245939 Merge pull request #2967 from RajalakshmiSR/dgemm88
POWER10:  Change dgemm unroll factors
2020-11-02 18:54:36 +01:00
Aisha Tammy
60997ddd73 allow setting soname without suffix or prefix
Allows to create a library with a different
SONAME without the need to add suffixes to symbols
Backwards compatible and should have no effect
on the workflow and previous users.
Useful for allowing INTERFACE64 library alongside
the standard library without file conflicts
2020-11-02 13:04:53 +00:00
Martin Kroeker
e5f8c2bf8a typo fix 2020-11-01 22:25:43 +01:00
Martin Kroeker
6baf8af658 Disable EXPRECISION for the combination of DYNAMIC_CORE and GENERIC target 2020-11-01 22:11:48 +01:00
Martin Kroeker
40a93c232b Disable EXPRECISION for DYNAMIC_ARCH in combination with TARGET=GENERIC
NO_EXPRECISION is disabled for the GENERIC_TARGET already, so prevent mixing with code parts that use a different float size by default
2020-11-01 21:58:26 +01:00
Martin Kroeker
fab952bee4 Merge pull request #2962 from brada4/develop
add openbsd 68+ gfortran name
2020-11-01 14:24:40 +01:00
Martin Kroeker
1cf04a6f0e Merge pull request #2963 from martin-frbg/issue2959
Reunify default BUFFER_SIZE on ARM64 to avoid crashes in DYNAMIC_ARCH mode
2020-11-01 09:14:54 +01:00
Rajalakshmi Srinivasaraghavan
dd7a9cc5bf POWER10: Change dgemm unroll factors
Changing the unroll factors for dgemm to 8 shows improved performance with
POWER10 MMA feature.   Also made some minor changes in sgemm for edge cases.
2020-10-31 18:28:57 -05:00
Martin Kroeker
7f26be4802 Reunify BUFFERSIZE across arm64 platforms to avoid segfaults in DYNAMIC_ARCH 2020-11-01 00:00:43 +01:00
User User-User
9fab65e90a add openbsd gfortran 2020-11-01 00:38:08 +02:00
Martin Kroeker
9efc3f0815 Merge pull request #109 from xianyi/develop
rebase
2020-10-31 22:33:52 +01:00
Martin Kroeker
aa21cb5217 Merge pull request #2960 from thrasibule/avx2_detection
fix avx2 detection
2020-10-31 20:24:21 +01:00
Guillaume Horel
1f564d729b fix avx2 detection
reword commits to make it clearer
2020-10-31 10:00:48 -04:00
Martin Kroeker
9349dcd206 Merge pull request #2956 from RajalakshmiSR/caxpy_p10
Optimize caxpy for POWER10
2020-10-30 08:54:10 +01:00
Rajalakshmi Srinivasaraghavan
b435491885 Optimize caxpy for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2020-10-29 14:57:51 -05:00
Martin Kroeker
9a058f2451 Merge pull request #2940 from Qiyu8/optimize-benchmark
Refactor the performance measurement system
2020-10-29 20:28:37 +01:00
Martin Kroeker
074927a7d0 Merge pull request #2954 from Guobing-Chen/BF16_gemv_support
Implementation of BF16 based gemv
2020-10-29 09:22:33 +01:00
Martin Kroeker
60b22e3462 Merge pull request #2955 from Guobing-Chen/Fix_cooperlake_build_issue
Fix cooperlake compile issue
2020-10-29 09:22:07 +01:00
Chen, Guobing
c5e62dad69 Fix cooperlake compile issue
Add a missing macro which is required in Makefile.x86_64 due to recent
clearnup, which causes cooperlake platform build failure.
2020-10-29 03:37:59 +08:00
Chen, Guobing
a7b1f9b1bb Implementation of BF16 based gemv
1. Add a new API -- sbgemv to support bfloat16 based gemv
2. Implement a generic kernel for sbgemv
3. Implement an avx512-bf16 based kernel for sbgemv

Signed-off-by: Chen, Guobing <guobing.chen@intel.com>
2020-10-29 02:08:23 +08:00
Martin Kroeker
67f39ad813 Merge pull request #2939 from thrasibule/Makefile_cleanup
reuse variables defined in Makefile.system
2020-10-28 09:38:40 +01:00
Martin Kroeker
6e13a7e99e Merge pull request #2951 from martin-frbg/cleanup_make
Minor Makefile cleanup
2020-10-28 09:37:56 +01:00
Martin Kroeker
2207a16235 Merge pull request #2952 from martin-frbg/issue2931
Try to read cpu ID from /sys/devices/.../cpu0 if HWCAP_CPUID fails
2020-10-28 09:37:32 +01:00
Martin Kroeker
5d643929dd Merge pull request #2948 from martin-frbg/issue2947
Expressly enable neon for use with intrinsics if available
2020-10-28 09:37:09 +01:00
Martin Kroeker
e8cbf0fc50 Output predefined HAVE_ entries to Makefile.conf for ARM with specified TARGET 2020-10-27 23:01:19 +01:00
Martin Kroeker
b937d78a6d Try to read cpu information from /sys/devices/system/cpu/cpu0 if HWCAP_CPUID fails 2020-10-27 17:51:32 +01:00
Martin Kroeker
e2f9005db8 Merge pull request #2950 from RajalakshmiSR/saxpy
Optimize saxpy for POWER10
2020-10-27 00:02:18 +01:00
Martin Kroeker
6a1f3e40af Remove debug printout of object list 2020-10-26 21:37:04 +01:00
Martin Kroeker
878b6d1f41 Remove spurious expr in flang version check 2020-10-26 21:35:40 +01:00
Rajalakshmi Srinivasaraghavan
c24ba8b1dd Optimize saxpy for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores.
2020-10-26 13:24:59 -05:00
Qiyu8
f917c26e83 Refractoring remaining benchmark cases. 2020-10-26 10:25:05 +08:00
Martin Kroeker
76203e2120 Merge pull request #2946 from martin-frbg/issue2945
Move definitions that are neither needed nor supported on Solaris
2020-10-26 00:43:44 +01:00
Martin Kroeker
eec517af0e Expressly enable neon for use with intrinsics if available 2020-10-26 00:21:56 +01:00
Martin Kroeker
fd7da56965 Move definitions that are neither needed nor supported on SUNOS 2020-10-25 12:01:50 +01:00
Martin Kroeker
2f9fc9be30 Update version to 0.3.12.dev 2020-10-24 23:29:05 +02:00
Martin Kroeker
81fcfd5ed3 Update version to 0.3.12.dev 2020-10-24 23:28:29 +02:00
Martin Kroeker
addf7593ae Merge pull request #2944 from xianyi/release-0.3.0
Merge back 0.3.12 tag (and Changelog typo fixes) from release
2020-10-24 13:10:51 +02:00
Martin Kroeker
c5f280a7f0 Fix typos 2020-10-24 13:03:28 +02:00
Martin Kroeker
6e3a05f2c9 Merge pull request #2943 from xianyi/develop
Merge from develop for 0.3.12 release
2020-10-24 12:52:59 +02:00
Martin Kroeker
89db73569b Update Changelog with 0.3.12 changes 2020-10-24 12:50:04 +02:00
Martin Kroeker
e1c18e4eeb Update version to 0.3.12 for release 2020-10-24 12:15:33 +02:00
Martin Kroeker
26f658c9d2 Update version to 0.3.12 for release 2020-10-24 12:14:45 +02:00
Martin Kroeker
dc35477317 Merge pull request #2942 from martin-frbg/makebuildtypes
Comment out  BUILD_SINGLE etc. in Makefile.rule and add a short explanation
2020-10-24 09:26:50 +02:00
Martin Kroeker
365f28787c Comment out BUILD_SINGLE etc. and add a short explanation 2020-10-23 23:32:06 +02:00
Martin Kroeker
2f2e9ddb65 Merge pull request #2941 from martin-frbg/exportsfix
Fix grouping of sladiv1/dladiv1/ilaenv2stage in gensymbol
2020-10-23 20:47:35 +02:00
Martin Kroeker
0d140e61ac Fix wrong grouping of dcombssq 2020-10-23 15:53:40 +02:00
Martin Kroeker
4c45cd6294 fix missing split of sladiv1/dladiv/ilaenv2stage by build type 2020-10-23 15:31:25 +02:00
Martin Kroeker
680f744abf Merge pull request #108 from xianyi/develop
rebase
2020-10-23 15:29:48 +02:00
Martin Kroeker
6f9460f0f6 Merge pull request #2937 from martin-frbg/pwr-buffersz
Increase and unify BUFFERSIZE on POWER;fix gcc inline warning
2020-10-23 07:15:32 +02:00
Qiyu8
dd6ebdfdab Refactor the performance measurement system 2020-10-23 10:32:03 +08:00
Guillaume Horel
1917a4e7b8 reuse variables defined in Makefile.system 2020-10-22 22:04:25 -04:00
Martin Kroeker
6c970fa998 Merge pull request #2938 from martin-frbg/2934-3
Fix twisted spelling that broke the gfortran version test again
2020-10-23 00:19:49 +02:00
Martin Kroeker
b23cb05231 Fix twisted spelling that broke the gfortran version test again 2020-10-23 00:18:29 +02:00
Martin Kroeker
1d4c96fa0c Increase BUFFERSIZE further 2020-10-23 00:12:06 +02:00
Martin Kroeker
34c3c407ef label always_inline function as inline to silence a gcc warning 2020-10-22 22:14:26 +02:00
Martin Kroeker
3f84a9ca15 Merge pull request #2936 from martin-frbg/issue2934-2
Fix compiler version check for -mavx2 support (DYNAMIC_ARCH case)
2020-10-22 22:08:46 +02:00
Martin Kroeker
7e265c50bf Merge pull request #2935 from martin-frbg/lapack458
Fix macro used in argument conversion (LAPACK PR 458)
2020-10-22 19:25:58 +02:00
Martin Kroeker
ee90f30384 Increase BUFFERSIZE for POWER8-10 and use same value for POWER6
to fix overflow warning for PWR8 ZGEMM and PWR9 C/ZGEMM and avoid size mismatches in DYNAMIC_ARCH
2020-10-22 18:47:07 +02:00
Martin Kroeker
2e48d560ba Fix compiler version check 2020-10-22 16:23:29 +02:00
Martin Kroeker
ab7f466467 Merge pull request #106 from xianyi/develop
rebase
2020-10-22 16:21:09 +02:00
Martin Kroeker
f95031204e Fix macro used in argument conversion (LAPACK PR 458) 2020-10-22 16:19:26 +02:00
Martin Kroeker
909068facf Merge pull request #2932 from RajalakshmiSR/copyp10
Optimize scopy/ccopy for POWER10
2020-10-22 00:29:46 +02:00
Martin Kroeker
5b7438fdde Merge pull request #2934 from thrasibule/improve_version_check
actually check that version is greater than 4.7
2020-10-22 00:29:02 +02:00
Guillaume Horel
47696b43e9 actually check that version is greater than 4.7 2020-10-21 16:42:37 -04:00
Rajalakshmi Srinivasaraghavan
ad745c0bae Optimize scopy/ccopy for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores. Also reorganized all variants of copy functions
to make use of same kernel.
2020-10-21 09:53:45 -05:00
Martin Kroeker
17c46bf06a Merge pull request #2930 from ismail/fix-no-return
Fix build with -Werror=return-type
2020-10-21 11:43:01 +02:00
Martin Kroeker
28242096cd Merge pull request #2928 from martin-frbg/issue2917
Enable -mavx2 for flang as well where supported
2020-10-21 10:11:02 +02:00
İsmail Dönmez
4a1d00f589 Fix build with -Werror=return-type
dgemm_tcopy_16_skylakex.c CNAME function should return an int, add a
return 0 similar to other files.
2020-10-21 08:43:39 +02:00
Martin Kroeker
00813363be Enable -mavx2 for flang as well 2020-10-20 23:56:30 +02:00
Martin Kroeker
336e35469a Merge pull request #105 from xianyi/develop
rebase
2020-10-20 23:48:53 +02:00
Martin Kroeker
29668458f7 Merge pull request #2925 from martin-frbg/issue2911-2
Add binutils version check as prerequisite for POWER10 in DYNAMIC_ARCH build
2020-10-20 11:27:36 +02:00
Martin Kroeker
ee83e29046 Merge pull request #2926 from bartoldeman/vzeroupper-clobber-all
x86_64: clobber all xmm registers after vzeroupper
2020-10-20 09:24:47 +02:00
Martin Kroeker
1a0f57c8f0 Fix missing backquotes 2020-10-20 08:37:53 +02:00
Bart Oldeman
b073d759d0 x86_64: clobber all xmm registers after vzeroupper
As observed using GCC 10 using -march=native -ftree-vectorize
on Knights Landing, it is now smart enough to find clobbers inside
non-inlined static functions.

In particular, sgemv counted on a kernel to preserve the whole
%ymm2 register (since it was not in the clobber list), but the top
part was destroyed by vzeroupper. This caused many tests to fail.

This patch makes sure all xmm (and ymm/zmm by extension) registers
are listed as clobbered to avoid this happening, as most kernels
already did correctly in fact.
2020-10-20 02:16:47 +00:00
Martin Kroeker
eddc65c7b7 Add POWER10 support flag (unconditionally for now) 2020-10-20 01:09:49 +02:00
Martin Kroeker
bb8c3f6861 Add ld/binutils version check for POWER10 support 2020-10-20 01:04:20 +02:00
Martin Kroeker
ff65952e46 Move HAVE_P10_SUPPORT to the build system
to be able to include a binutils version check
2020-10-20 00:55:41 +02:00
Martin Kroeker
6208c9899e Merge pull request #104 from xianyi/develop
rebase
2020-10-20 00:52:08 +02:00
Martin Kroeker
8e20ab21c8 Merge pull request #2924 from martin-frbg/issue2920
Put back all symbols accidentally dropped in the reorganization of gensymbol
2020-10-19 23:33:45 +02:00
Martin Kroeker
dc6e44c3f8 Merge pull request #2916 from martin-frbg/issue2911
Clean up duplicate definitions in POWER8 kernels and fix power10 option passing
2020-10-19 23:33:31 +02:00
Martin Kroeker
4ad33c46b0 Add back symbols that got dropped when splitting by type 2020-10-19 20:37:52 +02:00
Martin Kroeker
fe2a922ada Add POWER10 compiler options to CCOMMON_OPT rather than COMMON_OPT 2020-10-19 17:43:53 +02:00
Martin Kroeker
9cac379655 Merge pull request #103 from xianyi/develop
rebase
2020-10-19 15:56:20 +02:00
Martin Kroeker
a61c086408 Fix spurious trailing whitespace in comment 2020-10-19 09:12:12 +02:00
Martin Kroeker
5b9ebe4f8a Merge pull request #2919 from isuruf/export
Fix exporting some lapack and cblas symbols
2020-10-19 08:14:27 +02:00
Martin Kroeker
7eddaf0d6f Remove -mmma again (reduntant with cpu=power10) and add override statements 2020-10-19 08:11:22 +02:00
Isuru Fernando
14b1d33933 Fix exporting some lapack and cblas 2020-10-18 22:45:58 -05:00
Martin Kroeker
77669b019d Merge pull request #2915 from bartoldeman/no-empty_sgemm_direct_skylakex
sgemm_direct_skylakex: fix 75eeb26 regression.
2020-10-19 00:09:54 +02:00
Martin Kroeker
5e8ddc9001 Merge pull request #2913 from martin-frbg/issue2910
Support cross-compiling for Apple Vortex
2020-10-18 23:04:56 +02:00
Bart Oldeman
03e781b766 sgemm_direct_skylakex: fix 75eeb26 regression.
The
`#if defined(SKYLAKEX) || defined (COOPERLAKE)`
from that commit was before #include "common.h" so caused the
compiled function to be empty, returning garbage results for
qualifying sgemm's on those architectures.

Closes #2914
2020-10-18 19:58:07 +00:00
Martin Kroeker
f1a4071d8c Clean up STACKSIZE redefinition 2020-10-18 19:41:43 +02:00
Martin Kroeker
97cf10062f Clean up STACKSIZE redefinition 2020-10-18 19:39:18 +02:00
Martin Kroeker
17e288e18d Clean up STACKSIZE redefinition 2020-10-18 19:37:04 +02:00
Martin Kroeker
c1422f3e46 Clean up STACKSIZE redefinition 2020-10-18 19:31:01 +02:00
Martin Kroeker
d85b24e103 Clean up STACKSIZE redefinition 2020-10-18 19:29:45 +02:00
Martin Kroeker
7d6c85f9da Add compiler option -mmma for POWER10 2020-10-18 19:27:51 +02:00
Martin Kroeker
2e7ee7c716 Fix naming of L2 cache size item reported for Vortex 2020-10-18 19:22:05 +02:00
Martin Kroeker
efd47b0104 Merge pull request #2909 from isuruf/patch-1
Need a space when redirecting to file
2020-10-18 19:16:08 +02:00
Martin Kroeker
f5902ab0a1 Support cross-compiling for Apple Vortex 2020-10-18 19:10:58 +02:00
Martin Kroeker
1a0c185122 Support cross-compiling for Apple Vortex 2020-10-18 18:54:54 +02:00
Martin Kroeker
89eea6b455 Merge pull request #102 from xianyi/develop
rebase
2020-10-18 18:49:59 +02:00
Isuru Fernando
a5c667b55c Need a space when redirecting to file
Following two commands have two completely different meanings
perl ./gensymbol objcopy x86_64 _ 0 0  0 0 0 0 "" "64_" 1 0 1 1 1 1 > objcopy.def
perl ./gensymbol objcopy x86_64 _ 0 0  0 0 0 0 "" "64_" 1 0 1 1 1 1> objcopy.def
2020-10-18 09:40:31 -05:00
Martin Kroeker
0ac6102708 Update version string to 0.3.11.dev 2020-10-17 22:40:47 +02:00
Martin Kroeker
26a701f4ad Update version string to 0.3.11.dev 2020-10-17 22:40:06 +02:00
Martin Kroeker
fcd0fa1a3a Merge pull request #2908 from xianyi/release-0.3.0
Synchronyse tag with release 0.3.11
2020-10-17 22:38:58 +02:00
Martin Kroeker
51c22612eb Merge pull request #2907 from xianyi/develop
Update from develop for 0.3.11
2020-10-17 22:14:12 +02:00
Martin Kroeker
b8f689200e Update version number to 0.3.11 2020-10-17 22:11:34 +02:00
Martin Kroeker
fe9015b619 Update version for 0.3.11 release 2020-10-17 22:10:50 +02:00
Martin Kroeker
f99b8c1502 Merge pull request #2906 from martin-frbg/changelog-0311
Update Changelog.txt with the 0.3.11 changes
2020-10-17 22:07:14 +02:00
Martin Kroeker
5381a18056 Update Changelog.txt with the 0.3.11 changes 2020-10-17 22:05:36 +02:00
Martin Kroeker
e35576c6fc Merge pull request #2905 from martin-frbg/aocc-clang
Add -mavx for clang & aocc
2020-10-17 09:45:22 +02:00
Martin Kroeker
f1bb85d378 Add AVX flags for clang/aocc as well 2020-10-16 20:52:15 +02:00
Martin Kroeker
25907e672b Merge pull request #101 from xianyi/develop
rebase
2020-10-16 20:48:58 +02:00
Zhang Xianyi
d7ba7679b6 Merge branch 'develop' into risc-v 2020-10-16 23:27:38 +08:00
Martin Kroeker
9789375389 Merge pull request #2900 from martin-frbg/fixcmake_sse
Add compiler options for SSE to the cmake support files
2020-10-16 16:17:36 +02:00
Martin Kroeker
f64243ff57 Add compiler options for sse/sse2/ssse3/sse4.1 2020-10-16 10:47:06 +02:00
Martin Kroeker
786c0a3ce8 Add sse options for use of intrinics with older compilers 2020-10-16 10:41:53 +02:00
Martin Kroeker
df70667043 fix core list for sse/sse2 2020-10-16 09:55:48 +02:00
Martin Kroeker
e6c5b13a18 Merge pull request #2898 from martin-frbg/morefixes
More pre-release fixes
2020-10-16 07:26:39 +02:00
Martin Kroeker
f071d1207a add sse2 2020-10-15 22:10:32 +02:00
Martin Kroeker
dc6cefd2f5 Expressly enable -msse for 32bit DYNAMIC_ARCH kernels 2020-10-15 20:16:15 +02:00
Martin Kroeker
c339c40c01 Silence a redefinition warning 2020-10-15 19:08:12 +02:00
Martin Kroeker
ac8af9cec6 Add -msse where supported, apparently required for older gcc 2020-10-15 19:06:45 +02:00
Martin Kroeker
10379fc83b Use ifdef instead of if 2020-10-15 19:05:37 +02:00
Martin Kroeker
a85ac71633 Merge pull request #100 from xianyi/develop
rebase
2020-10-15 18:54:20 +02:00
Martin Kroeker
4c25910da0 Merge pull request #2896 from martin-frbg/intrin-double
Add compiler flag for SSE4 where available
2020-10-15 11:12:35 +02:00
damonyu
ef8e7d0279 Add the support for RISC-V Vector.
Change-Id: Iae7800a32f5af3903c330882cdf6f292d885f266
2020-10-15 16:09:02 +08:00
Martin Kroeker
9b9ee92d5f Merge pull request #2897 from Qiyu8/usimd-double
Add double precision universal intrinsics for X86/ARM
2020-10-15 08:38:24 +02:00
Martin Kroeker
ae6ac83991 Revert "add double precision SSE" 2020-10-15 08:37:02 +02:00
Qiyu8
4fac91ef37 adapt arm platform 2020-10-15 11:08:10 +08:00
Qiyu8
bfdf4b56da Add double precision universal intrinsics for X86/ARM 2020-10-15 10:29:42 +08:00
Martin Kroeker
ebf0470fc2 add sse4.1 for DYNAMIC_ARCH kernels 2020-10-14 20:34:33 +02:00
Martin Kroeker
ca160bb440 Add -msse4.1 when SSE4.1 is supported 2020-10-14 19:18:07 +02:00
Martin Kroeker
c9c3ae07af Add double precision operations 2020-10-14 18:10:45 +02:00
Martin Kroeker
a897bc3bd2 Merge pull request #99 from xianyi/develop
rebase
2020-10-14 18:09:20 +02:00
Martin Kroeker
756802df61 Merge pull request #2890 from martin-frbg/s-d-sum
Revert special handling of Windows xNRM2 and enable C+intrinsics kern…
2020-10-14 09:02:03 +02:00
Martin Kroeker
01492decf4 Merge pull request #2895 from martin-frbg/sb-tests
Fix remaining build errors related to bfloat16 and cmake
2020-10-14 09:01:16 +02:00
Martin Kroeker
bd0752444a Merge pull request #2894 from RajalakshmiSR/bf16_packing
POWER10: Change the packing format for bfloat16
2020-10-14 08:12:08 +02:00
Martin Kroeker
c1f4f5d4e7 Replace Makefile with simplified version again 2020-10-14 01:08:50 +02:00
Martin Kroeker
75e3a92df6 Add express -mavx and -msse options (and fix a stray = for cooperlake) 2020-10-14 01:01:58 +02:00
Martin Kroeker
2a329baa81 Add the BFLOAT16 functions to cmake builds 2020-10-13 23:21:38 +02:00
Rajalakshmi Srinivasaraghavan
0826d68f93 POWER10: Change the packing format for bfloat16
As the new MMA instructions need the inputs in 4x2 order for bfloat16,
changing the format in copy/packing code.  This avoids permute instructions
in the gemm kernel inner loop.
2020-10-13 16:05:10 -05:00
Martin Kroeker
4bb73c0171 Rename "HALF" type to "BFLOAT16" 2020-10-13 20:07:19 +02:00
Martin Kroeker
bc5c7f9578 Cleanup 2020-10-13 19:56:09 +02:00
Martin Kroeker
437b7fe261 sh prefix renamed to sb 2020-10-13 19:55:14 +02:00
Martin Kroeker
a0ada4bcb8 Merge pull request #98 from xianyi/develop
rebase
2020-10-13 18:50:30 +02:00
Martin Kroeker
602a0c7a69 Merge pull request #2892 from RajalakshmiSR/bf16_make
Fix build issues with bfloat16
2020-10-13 18:48:37 +02:00
Rajalakshmi Srinivasaraghavan
b5d30b390d Fix build issues with bfloat16
This patch fixes compilation errors due to recent renaming from SH to SB
with BUILD_BFLOAT16.
2020-10-13 11:00:22 -05:00
Martin Kroeker
137ae618db Fix typo 2020-10-13 15:02:17 +02:00
Martin Kroeker
9e3cff5cf2 Expressly enable -mavx2 on Zen, SkylakeX and Cooperlake as well 2020-10-13 14:41:25 +02:00
Martin Kroeker
d85b968424 Merge pull request #2891 from martin-frbg/fix-2886
Fix several bugs and omissions from the BFLOAT16 rename
2020-10-13 13:46:17 +02:00
Martin Kroeker
5f60a32cac Add -mssse3 if supported by the hardware 2020-10-13 11:57:04 +02:00
Martin Kroeker
fecedc9c69 Add -mssse3 2020-10-13 11:55:41 +02:00
Martin Kroeker
0eacbca85f Add Haswell and Zen to temporary sse3 whitelist 2020-10-13 11:42:39 +02:00
Martin Kroeker
6999086a2b whitelist SANDYBRIDGE for SSE3 2020-10-13 10:32:19 +02:00
Martin Kroeker
9dca578c79 Cleanup 2020-10-13 10:14:08 +02:00
Martin Kroeker
1e7eb7b7a9 Fix typos in currently unused sections 2020-10-13 09:17:15 +02:00
Martin Kroeker
84949754a0 Fix bfloat16 conditional 2020-10-13 09:11:36 +02:00
Martin Kroeker
2ae8785603 Add a POWER9 build with BFLOAT16 enabled 2020-10-13 09:07:50 +02:00
Martin Kroeker
e05af6575e Fix some overlooked "SHBLAS" entries 2020-10-13 09:05:04 +02:00
Martin Kroeker
c1643006ae Merge pull request #97 from xianyi/develop
rebase
2020-10-13 09:01:49 +02:00
Martin Kroeker
8d2df7d066 Revert special handling of Windows xNRM2 and enable C+intrinsics kernel for SSUM/DSUM 2020-10-13 00:14:29 +02:00
Martin Kroeker
08929430cd Merge pull request #2886 from martin-frbg/issue_2767
Rename "HALF" precision functions (sh prefix) to "BFLOAT16" with "sb" prefix
2020-10-13 00:04:35 +02:00
Martin Kroeker
0c84ffe05f Merge pull request #2881 from mattip/fninit
add fninit to reset fpu registers before assembler routines
2020-10-12 23:50:41 +02:00
Martin Kroeker
cb4274e3ad Merge pull request #2888 from Qiyu8/usimd-sum
Optimize the performance of sum by using universal intrinsics
2020-10-12 23:22:08 +02:00
Matti Picus
403eb513a0 use emms instead, add WIN guards 2020-10-12 18:15:01 +03:00
Martin Kroeker
cb839575ed Convert the prototypes of the unimplemented BFLOAT16 functions to the new naming scheme 2020-10-12 14:44:33 +02:00
Qiyu8
0ed1f07660 Optimize the performance of sum by using universal intrinsics 2020-10-12 19:48:53 +08:00
Martin Kroeker
bb74dd29db Restore -msse3 2020-10-12 00:42:05 +02:00
Martin Kroeker
629c497b6c common_sh.h renamed to common_sb.h 2020-10-12 00:27:11 +02:00
Martin Kroeker
2c552f1074 Change "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-12 00:11:31 +02:00
Martin Kroeker
7ae9e8960e Change "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-12 00:08:29 +02:00
Martin Kroeker
e3a29f6b58 Change "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-12 00:07:37 +02:00
Martin Kroeker
006c7f6671 Change "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-12 00:06:06 +02:00
Martin Kroeker
85154c2e18 Change "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-12 00:05:05 +02:00
Martin Kroeker
ae1ab5bfdf Change "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-12 00:03:21 +02:00
Martin Kroeker
052f31bc3c Change "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-12 00:02:16 +02:00
Martin Kroeker
3aecafad80 Change "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-12 00:00:55 +02:00
Martin Kroeker
756062afa5 Rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:56:17 +02:00
Martin Kroeker
2061f7fdff Rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:54:53 +02:00
Martin Kroeker
dc8a1afa63 Rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:53:50 +02:00
Martin Kroeker
32733ded04 Rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:52:45 +02:00
Martin Kroeker
3bc8e8c334 Rename "HALF" and "sh" to "BFLOAT16"and "sb" 2020-10-11 23:51:34 +02:00
Martin Kroeker
573508f0ee Rename common_sh.h to common_sb.h 2020-10-11 23:50:54 +02:00
Martin Kroeker
ca31c32693 Rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:49:22 +02:00
Martin Kroeker
5800758b43 Rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:44:38 +02:00
Martin Kroeker
924fd806d0 Rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:43:36 +02:00
Martin Kroeker
4db09c6cec Rename compare_sgemm_shgemm.c to compare_sgemm_sbgemm.c 2020-10-11 23:42:45 +02:00
Martin Kroeker
fd94236042 Rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:42:07 +02:00
Martin Kroeker
68ce719fac Rename shdot_microk_cooperlake.c to sbdot_microk_cooperlake.c 2020-10-11 23:41:13 +02:00
Martin Kroeker
d7dd9b396c Rename shdot.c to sbdot.c 2020-10-11 23:40:43 +02:00
Martin Kroeker
9ae80490e0 rename "HALF" and "sh" to "BFLOAT16" and "sb" 2020-10-11 23:39:42 +02:00
Martin Kroeker
d314d1f49f Rename shgemm_kernel_power10.c to sbgemm_kernel_power10.c 2020-10-11 23:37:38 +02:00
Martin Kroeker
f0883740e4 Merge pull request #96 from xianyi/develop
rebase
2020-10-11 23:34:36 +02:00
Martin Kroeker
1c0b03efb4 Merge branch 'develop' into develop 2020-10-11 23:34:14 +02:00
Martin Kroeker
c589c3e2a1 Merge pull request #2882 from martin-frbg/issue2709
Use generic C for (D/Z)NRM2 on Windows x86_64
2020-10-11 22:22:30 +02:00
Martin Kroeker
ec638a82bf Merge pull request #2852 from martin-frbg/issue2588-cmake
Support building only a subset of variable types
2020-10-11 22:21:33 +02:00
Martin Kroeker
caa0d757ca repair TABs 2020-10-11 18:29:34 +02:00
Martin Kroeker
6154f72d6d Copy BUILD_ settings to the LAPACK make.inc 2020-10-11 18:25:16 +02:00
Martin Kroeker
ae8b0d257a Set BUILD_ options to 1 instead of just defining them 2020-10-11 18:08:21 +02:00
Martin Kroeker
1da32cc1fc Add cblas_xerbla interface 2020-10-11 17:45:41 +02:00
Martin Kroeker
8c5e08076e If none of the BUILD_ options is set, enable them all 2020-10-11 17:33:51 +02:00
Martin Kroeker
5f23bdf437 remove debug output 2020-10-11 17:23:08 +02:00
Martin Kroeker
b593e6b650 Merge pull request #2885 from martin-frbg/ifexists
Improve CMAKE check for conflicting config_kernel.h
2020-10-11 15:45:24 +02:00
Martin Kroeker
082c86a538 Merge pull request #2884 from martin-frbg/sse_fixup
Add workaround for unwanted default activation of -msse3 in DYNAMIC_ARCH builds
2020-10-11 15:14:03 +02:00
Martin Kroeker
e396ec8b56 Allow building support for only a subset of variable types 2020-10-11 15:11:15 +02:00
Martin Kroeker
68e6823d36 Adapt for supporting only a subset of variable types 2020-10-11 15:01:32 +02:00
Martin Kroeker
887e00fd7f Adapt for supporting only a subset of variable types 2020-10-11 14:58:57 +02:00
Martin Kroeker
886a8e3190 Adapt for supporting only a subset of variable types 2020-10-11 14:57:32 +02:00
Martin Kroeker
0f7d73ff6d Allow supporting only a subset of variable types 2020-10-11 14:53:26 +02:00
Martin Kroeker
6b6adf8a4a Allow compiling only a subset of kernels for specific variable types 2020-10-11 14:52:09 +02:00
Martin Kroeker
a6570108c5 Add Makefile support for enabling only some variable types 2020-10-11 14:49:58 +02:00
Martin Kroeker
ef552bc578 Add Makefile support for enabling only some variable types 2020-10-11 14:49:06 +02:00
Martin Kroeker
efe1ad4700 Add Makefile support for enabling only some variable types 2020-10-11 14:48:23 +02:00
Martin Kroeker
b27ca78a21 Adapt to having only a subset of variable types supported 2020-10-11 14:46:24 +02:00
Martin Kroeker
93454022a9 Adapt to having only a subset of variable types supported 2020-10-11 14:45:40 +02:00
Martin Kroeker
20cf1d773f Adapt to having only a subset of variable types supported 2020-10-11 14:44:56 +02:00
Martin Kroeker
5c657fffad Adapt to having only a subset of variable types supported 2020-10-11 14:44:13 +02:00
Martin Kroeker
b262058059 Adapt to having only a subset of variable types supported 2020-10-11 14:43:13 +02:00
Martin Kroeker
bc319cee82 Adapt to having only a subset of variable types supported 2020-10-11 14:42:26 +02:00
Martin Kroeker
e5966f8606 Adapt to having only a subset of variable types supported 2020-10-11 14:41:43 +02:00
Martin Kroeker
9df12eb08f Adapt to having only a subset of variable types supported 2020-10-11 14:40:51 +02:00
Martin Kroeker
cf53970bcb Adapt to having only a subset of variable types supported 2020-10-11 14:40:06 +02:00
Martin Kroeker
dcd51d5c72 Adapt to having only a subset of variable types supported 2020-10-11 14:39:19 +02:00
Martin Kroeker
b8f95354c7 Adapt to having only a subset of variable types supported 2020-10-11 14:38:25 +02:00
Martin Kroeker
d33de97d60 Adapt to having only a subset of variable types supported 2020-10-11 14:36:45 +02:00
Martin Kroeker
6a83c591d6 Adapt for having only a subset of variable types 2020-10-11 14:34:12 +02:00
Martin Kroeker
f6d2827d0c Adapt ctests to having only a subset of types in the build 2020-10-11 14:32:00 +02:00
Martin Kroeker
08f4749eb4 Adapt tests to having only a subset of types in the build 2020-10-11 14:25:24 +02:00
Martin Kroeker
63d7dad04c Adapt utests for builds supportin only some variable types 2020-10-11 14:15:35 +02:00
Martin Kroeker
ac653c94f3 Merge branch 'develop' into issue2588-cmake 2020-10-11 13:57:07 +02:00
Martin Kroeker
190b74dd24 Add files via upload 2020-10-11 13:26:05 +02:00
Martin Kroeker
9d43140d61 Improve check for conflicting config_kernel.h 2020-10-11 12:58:17 +02:00
Martin Kroeker
8ef600f1a3 Merge pull request #95 from xianyi/develop
rebase
2020-10-11 12:53:18 +02:00
Martin Kroeker
88928650c4 Merge pull request #2883 from martin-frbg/issue2872
Minor CMAKE fixes
2020-10-11 10:30:33 +02:00
Martin Kroeker
7a53128481 Add whitelist of DYNAMIC_ARCH kernels for which -msse3 needs to be enabled 2020-10-11 01:06:46 +02:00
Martin Kroeker
0c773b8205 Do not rely on HAVE_SSE3 in DYNAMIC_ARCH builds 2020-10-11 01:04:57 +02:00
Martin Kroeker
fbda20c856 Merge pull request #94 from xianyi/develop
rebase
2020-10-11 01:03:00 +02:00
Martin Kroeker
82a497ec5d restore PRESCOTT default for DYNAMIC_LIST 2020-10-11 00:43:09 +02:00
Martin Kroeker
de27e4f5fb Stop DYNAMIC_ARCH build if the toplevel source contains a stray config_kernel.h from a gmake build
This is unlikely to happen in practice, but if it does, the rogue file would get included instead of the dynamically generated version for each target_core, leading to very confusing errors like "invalid operands (undefined UND and ABS sections)" in compilation of the assembly kernels as macros like PREFETCH would remain undefined
2020-10-11 00:40:22 +02:00
Martin Kroeker
e1b7123bbe Merge pull request #2867 from Qiyu8/usimd-floatdot
Optimize the performance of dot by using universal intrinsics in X86/ARM
2020-10-10 12:10:25 +02:00
Qiyu8
f32d34a015 add sse3 compiler flag 2020-10-10 10:36:15 +08:00
Martin Kroeker
599777ecb7 Merge pull request #2879 from martin-frbg/issue2839
Default BLAS3_MEM_ALLOC_THRESHOLD on all platforms to 32
2020-10-06 23:26:52 +02:00
Martin Kroeker
7812486091 Use generic C for D/Z nrm2 kernels on Windows to work around fpu exception bug 2020-10-06 21:33:16 +02:00
Matti Picus
a5b164946c add fninit to reset fpu registers before assembler routines 2020-10-05 22:13:25 +03:00
Martin Kroeker
a5feea6611 make BLAS3_MEM_ALLOC_THRESHOLD configurable on non-Windows 2020-10-04 23:01:06 +02:00
Martin Kroeker
dc8e4e1959 Reduce the BLAS3 heap allocation threshold to 32 and mark it as configurable 2020-10-04 22:59:24 +02:00
Martin Kroeker
cccd1438da Merge pull request #93 from xianyi/develop
rebase
2020-10-04 22:57:11 +02:00
Martin Kroeker
f032d8966e Merge pull request #2874 from Flamefire/memory_fixes
Avoid out of bounds access on invalid memory free
2020-10-04 15:16:51 +02:00
Martin Kroeker
f6e4cf2f9d Merge pull request #2876 from Flamefire/omp_fork_fix
Lazyly reinit threads after a fork in OMP mode
2020-10-03 22:52:17 +02:00
Martin Kroeker
9828343e12 Merge pull request #2878 from brada4/asms
fix clang std=c18 compilation on aarch64
2020-10-03 22:51:49 +02:00
User User-User
d2333e7842 aarch64 fix std=c18 compilation 2020-10-03 18:00:34 +03:00
Alexander Grund
3094fc6c83 Lazyly reinit threads after a fork in OMP mode
This initializes the per-thread memory buffers which get
cleared/released on a fork via pthread_at_fork. Not doing so leads to
each thread calling blas_memory_alloc on almost every execution which
slows down the code significantly as the threads race for the memory
allocation using locks to serialize that.
2020-10-01 15:41:42 +02:00
Alexander Grund
3c05f54df8 Avoid out of bounds access on invalid memory free 2020-10-01 10:48:45 +02:00
Alexander Grund
dee7c49938 Fix TABs and trailing space 2020-10-01 10:43:16 +02:00
Martin Kroeker
d3c0d6811b Merge pull request #2873 from martin-frbg/issue2871
Check for __linux rather than linux in cpuid code and benchmarks
2020-10-01 06:38:22 +02:00
Martin Kroeker
9637cd1fd1 Merge pull request #2865 from thisch/backticks
Consolidate usage of backticks for build options
2020-10-01 06:38:06 +02:00
Martin Kroeker
2367726578 Remove redundant status message 2020-09-30 23:28:49 +02:00
Martin Kroeker
5464eb13ea Change ifdef linux to __linux for C11 compatibility 2020-09-30 22:59:41 +02:00
Martin Kroeker
e1574cbc83 Change ifdef linux to __linux for C11 compatibility
and add a fallback for unsupported operating systems in detect()
2020-09-30 22:50:21 +02:00
Martin Kroeker
0b2bb5696a Change ifdef linux to __linux for C11 compatibility 2020-09-30 22:47:25 +02:00
Martin Kroeker
a7d5d0078d Change ifdef linux to __linux for C11 compatibility 2020-09-30 22:46:25 +02:00
Martin Kroeker
be40440ec5 Change ifdef linux to __linux for C11 compatibility 2020-09-30 22:45:18 +02:00
Martin Kroeker
2bf70c8e3b Change ifdef linux to __linux for C11 compatibility 2020-09-30 22:43:25 +02:00
Qiyu8
60e6c68e38 Adapt ARM architect 2020-09-29 16:36:14 +08:00
Martin Kroeker
64629cb5c7 Merge pull request #91 from xianyi/develop
rebase
2020-09-28 22:48:53 +02:00
Qiyu8
1b1a757f5f Optimize the performance of dot by using universal intrinsics in X86/ARM 2020-09-28 20:36:53 +08:00
Martin Kroeker
0d98ce202c Merge pull request #2866 from RajalakshmiSR/p10_dcopy
Optimize dcopy/zcopy for POWER10
2020-09-28 07:22:54 +02:00
Rajalakshmi Srinivasaraghavan
2df4235e00 Optimize dcopy/zcopy for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores. Tested in simulator and no new failures.
2020-09-27 21:42:32 -05:00
Thomas Hisch
fe8cd5ae7e Consolidate usage of backticks for build options
There were some build options in the README that were not
highlighted. Now all are highlighted.
2020-09-28 00:42:17 +02:00
Martin Kroeker
ba31c8f5f9 Merge pull request #2853 from Qiyu8/usimd-daxpy
Optimize the performance of daxpy by using universal intrinsics
2020-09-27 23:19:59 +02:00
Martin Kroeker
e961d4d609 Merge pull request #2864 from martin-frbg/lapack445
FIx underflow/rounding errors in LAPACK (S,D)LANV2
2020-09-27 23:11:17 +02:00
Martin Kroeker
7ed25e9e10 FIx underflow/rounding errors in LAPACK (S,D)LANV2
Reference-LAPACK PR 445, fixing their issue 263
2020-09-27 22:59:20 +02:00
Martin Kroeker
7b169379e0 Merge pull request #2863 from martin-frbg/readmefixes
Readmefixes
2020-09-27 22:50:25 +02:00
Martin Kroeker
7f539fb850 Update cpu list, outline cmake build, clarify scope of set_num_threads extension 2020-09-27 22:48:41 +02:00
Martin Kroeker
caf7a12295 Merge pull request #90 from xianyi/develop
rebase
2020-09-27 22:35:45 +02:00
Martin Kroeker
72b5b73647 Merge pull request #2850 from xiaojiayuan111/develop
fix a bug of trmm
2020-09-27 12:12:35 +02:00
Qiyu8
881c15179f remove default support for FMA4 on zen architect 2020-09-27 09:35:50 +08:00
Martin Kroeker
896bbd55e1 Add support for building only selected variable types 2020-09-26 23:25:55 +02:00
Martin Kroeker
c5a32288c6 Work around sgemm_r/dgemm_r not being properly defined with BUILD_COMPLEX/BUILD_COMPLEX16 2020-09-26 23:24:37 +02:00
Martin Kroeker
dfaafd3b55 Merge pull request #2854 from martin-frbg/travis-graviton
Add an AWS-Graviton2 build to Travis CI
2020-09-23 21:59:18 +02:00
Martin Kroeker
f2e9a24e1a Add AWS Graviton2 build 2020-09-23 19:02:20 +02:00
Martin Kroeker
98153875e9 Adapt tests to having only a subset of types in the library 2020-09-22 23:28:57 +02:00
Martin Kroeker
0eaae30e8c Adapt tests to having only a subset of types in the build 2020-09-22 23:28:03 +02:00
Martin Kroeker
dfbc62ef7e Support building only a subset of types 2020-09-22 23:25:59 +02:00
Martin Kroeker
b475b4bd0d Support building only a subset of types 2020-09-22 23:25:04 +02:00
Martin Kroeker
357bff06b5 Add BUILD_vartype defines 2020-09-22 23:24:22 +02:00
Martin Kroeker
988a6f429e Add BUILD_vartype defines 2020-09-22 23:23:33 +02:00
Martin Kroeker
e5e2fbd593 Support building only selected types 2020-09-22 23:21:30 +02:00
Martin Kroeker
3287848c8f Support building only seleced types 2020-09-22 23:20:51 +02:00
Martin Kroeker
26611af8e1 fix grouping of sources used for more than one type 2020-09-22 23:20:05 +02:00
Martin Kroeker
b886bd672b add defines for building a subset of types 2020-09-22 23:18:55 +02:00
Martin Kroeker
61fae59298 Merge pull request #88 from xianyi/develop
rebase
2020-09-22 23:15:33 +02:00
Martin Kroeker
33d22f99f1 Merge pull request #2851 from martin-frbg/travis-xcode12
Add an OSX build with xcode12
2020-09-22 21:44:55 +02:00
Martin Kroeker
5ba01dd1a8 Add an OSX build with xcode12 2020-09-22 17:26:19 +02:00
Qiyu8
14f7dad3b7 performance improved 2020-09-22 16:52:15 +08:00
y00512012
06cf73a239 fix a bug of trmm 2020-09-22 16:47:10 +08:00
Qiyu8
325b539c26 Optimize the performance of daxpy by using universal intrinsics 2020-09-22 10:38:35 +08:00
Martin Kroeker
0f112077e6 Merge pull request #2847 from mhillenibm/fixup_cscal
s390x: fix cscal and zscal implementations
2020-09-21 22:22:43 +02:00
Marius Hillenbrand
22aa81f3e5 s390x: fix cscal and zscal implementations
The implementation of complex scalar * vector multiplication for Z14
makes some LAPACK tests fail because the numerical differences to the
reference implementation exceed the threshold (as can be seen by running
make lapack-test and replacing kernel/zarch/cscal.c with a generic
implementation for comparison).

The complex multiplication uses terms of the form a * b + c * d for both
real and imaginary parts. The assembly code (and compiler-emitted code
as well) uses fused multiply add operations for the second product and
sum. The results can be "surprising", for example when both terms in the
imaginary part nearly cancel each other out. In that case, the second
product contributes more digits to the sum than the first product that
has been rounded before.

One option is to use separate multiplications (which then round the same
way) and a distinct add. Change the code to pursue that path, by (1)
requesting the compiler not to contract the operations into FMAs and (2)
replacing the assembly kernel with corresponding vectorized C code
(where change 1 also applies).

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-21 13:10:05 +02:00
Marius Hillenbrand
77ea73f5e5 s390x: for clang use fp-contract=on instead of fast
Make clang slightly more cautious when contracting floating-point
operations (e.g., when applying fused multiply add) by setting
-ffp-contract=on (instead of fast).

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-21 11:32:08 +02:00
Marius Hillenbrand
f91057cbad s390x: move common vector definitions and utils into header
... to facilitate reuse beyond gemm_vec.c and avoid code duplication.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-21 11:32:08 +02:00
Martin Kroeker
992d7ca63d Merge pull request #2845 from martin-frbg/lapack443
Fix workspace query in LAPACK xGELQ (Reference-LAPACK 443)
2020-09-18 23:18:41 +02:00
Martin Kroeker
7e4d5c237c Fix workspace query in xGELQ (Reference-LAPACK PR443) 2020-09-18 09:19:46 +02:00
Martin Kroeker
8d12027a79 Merge pull request #86 from xianyi/develop
rebase
2020-09-18 09:17:49 +02:00
Martin Kroeker
b1e0bcceec Merge pull request #2844 from RajalakshmiSR/daxpy_p10
Optimize daxpy/zaxpy for POWER10
2020-09-17 23:46:32 +02:00
Rajalakshmi Srinivasaraghavan
be43d2cb96 Optimize daxpy/zaxpy for POWER10
This patch makes use of new POWER10 vector pair instructions for
loads and stores. Tested in simulator and no new failures.
2020-09-17 12:56:28 -05:00
Martin Kroeker
2855e6000c Merge pull request #2841 from martin-frbg/cpp_gemvtest
Make thread safety tests available to CMAKE and support running only the GEMV version
2020-09-17 17:29:56 +02:00
Martin Kroeker
144a03446d Merge pull request #2843 from mhillenibm/fixup_merge_dynamic_zarch
s390x/DYNAMIC_ARCH: fixup broken merge and reapply simplification
2020-09-17 17:28:43 +02:00
Marius Hillenbrand
75d440caa0 s390x/DYNAMIC_ARCH: fixup broken merge and reapply simplification
An unrelated commit and merge inadvertently reverted our recent two
changes for simplifying DYNAMIC_ARCH on s390x. Simply reapply the
changes.

Simplify detection of which kernels we can compile on s390x. Instead of
decoding the gcc version in a complicated manner, just check if CC
supports a given -march=archXY flag. Together with the next patch, we
thereby gain support for builds with LLVM/clang with DYNAMIC_ARCH=1.

To enable builds with DYNAMIC_ARCH with older compiler releases, the
Makefile and drivers/other/dynamic_arch.c need a common view of the
architecture support built into the library.

We follow the notation from x86 when used with DYNAMIC_LIST, where
defines DYN_<ARCH NAME> denote support for a given generation to be
built in. Since there are far fewer architecture generations in OpenBLAS
for s390x, that does not bloat command lines too much.

Closes: #2842
Fixes: ba644378dc ("Copy BUILD_ options available to the compiler flags"

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-17 17:09:03 +02:00
Martin Kroeker
6abca76c4e Add option for running only the less demanding GEMV version of the thread safety tests 2020-09-17 13:49:24 +02:00
Martin Kroeker
84c00c3c6e Support running just the GEMV version of the thread safety test 2020-09-17 13:46:41 +02:00
Martin Kroeker
8c5c991bd7 Add cpp_thread_test options 2020-09-17 13:45:40 +02:00
Martin Kroeker
2e3b15d68b Add CMakeLists.txt 2020-09-17 13:43:55 +02:00
Martin Kroeker
eaf7f825bd Merge pull request #85 from xianyi/develop
rebase
2020-09-17 13:42:47 +02:00
Martin Kroeker
4c10a1673d Merge pull request #2840 from martin-frbg/fixup2833
Fix for cmake BUILD_ settings PR 2833
2020-09-16 18:55:50 +02:00
Martin Kroeker
c4aeeeb9f4 Activate all BUILD_ options if none was specified 2020-09-15 23:15:34 +02:00
Martin Kroeker
3843bd188c Merge pull request #84 from xianyi/develop
rebase
2020-09-15 23:13:30 +02:00
Martin Kroeker
ddec244a5a Merge pull request #2838 from austinpagan/gordon_trmm
Adding performance patch for trmm, just like trsm (#2836)
2020-09-15 21:17:48 +02:00
fossum
dfeca46098 Adding performance patch for trmm, just like #2836 2020-09-15 08:59:50 -05:00
Martin Kroeker
f8950f40a2 Merge pull request #2836 from austinpagan/gordon_trsm
Fixing a performance bug in trsm_[LR].c.
2020-09-15 11:26:37 +02:00
fossum
274d6e015b Fixing a performance bug in trsm_[LR].c. 2020-09-14 13:10:48 -05:00
Martin Kroeker
91c84e1c01 Merge pull request #2796 from Guobing-Chen/BF16_dot_coversion_apis
Add bfloat16 based dot and conversion with single/double
2020-09-14 15:00:19 +02:00
Martin Kroeker
1ee1e7b495 Merge pull request #2833 from martin-frbg/issue2830
Make building the tests for individual data types conditional on the respective BUILD option
2020-09-14 07:24:23 +02:00
Martin Kroeker
ba644378dc Copy BUILD_ options available to the compiler flags 2020-09-14 00:03:33 +02:00
Martin Kroeker
9e11c2d62f Add BUILD_SINGLE etc 2020-09-13 23:55:11 +02:00
Martin Kroeker
4d250d0cdf Rearrange ifdefs 2020-09-13 23:29:01 +02:00
Martin Kroeker
de139337b8 Remove spurious tests for complex ASUM and NRM2 2020-09-13 22:20:41 +02:00
Martin Kroeker
ec2948f147 Make tests conditional on BUILD_DOUBLE 2020-09-13 22:17:46 +02:00
Martin Kroeker
ce89398636 Make tests for individual variable types conditional on the respective BUILD_ option 2020-09-13 21:52:18 +02:00
Martin Kroeker
593ce9e237 Make building individual tests depend on BUILD_SINGLE etc defines 2020-09-13 21:50:12 +02:00
Martin Kroeker
74e358bcd5 Remove spurious complex16 tests 2020-09-13 21:49:01 +02:00
Martin Kroeker
26792d2096 Copy BUILD_* directives to the compiler options to allow ifdef in tests 2020-09-13 21:47:55 +02:00
Martin Kroeker
6b52c7e172 Merge pull request #2832 from martin-frbg/issue2831
Fix gfortran detection by vendor matching
2020-09-13 21:20:30 +02:00
Martin Kroeker
746ad3bd19 Fix vendor match for GCC gfortran 2020-09-13 18:40:59 +02:00
Martin Kroeker
55d4d470ec Merge pull request #83 from xianyi/develop
rebase
2020-09-13 18:30:11 +02:00
Martin Kroeker
a270894730 Merge pull request #2829 from mhillenibm/clang_s390x
Fix DYNAMIC_ARCH=1 with clang s390x
2020-09-08 23:36:41 +02:00
Marius Hillenbrand
047b8d7aff Add an s390 build with clang to the Travis configuration
Since clang builds have been fixed on s390x, including support for
DYNAMIC_ARCH, cover that build type in Travis.

Explicitly request Ubuntu 20.04 (codename focal) to get a recent
LLVM/clang version 10.x and thereby cover all s390x architecture
generations supported in OpenBLAS. Ubuntu 18.10's LLVM/clang 6.x cannot
build the inline assembly in some of the Z13 and Z14 kernels.

LLVM/clang currently does not support OpenMP on s390x, so disable that
in the build.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-08 20:59:06 +02:00
Marius Hillenbrand
f7731a358a Update CONTRIBUTERS.md - clang build fixes for IBM z
Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-08 19:34:18 +02:00
Marius Hillenbrand
a55fe06f25 s390x/DYNAMIC_ARCH: define a HW_CAP flag to support slightly older glibc versions
Enable building DYNAMIC_ARCH support with older versions of glibc that
do not know about the hwcap flag HWCAP_S390_VXE yet.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-08 19:34:18 +02:00
Marius Hillenbrand
4f34bcfb5e s390x/DYNAMIC_ARCH: pass supported arch levels from Makefile to run-time code
... instead of duplicating the (old) mechanism from the Makefile that
aimed to derive supported architecture generations from the gcc
version.

To enable builds with DYNAMIC_ARCH with older compiler releases, the
Makefile and drivers/other/dynamic_arch.c need a common view of the
architecture support built into the library.

We follow the notation from x86 when used with DYNAMIC_LIST, where
defines DYN_<ARCH NAME> denote support for a given generation to be
built in. Since there are far fewer architecture generations in OpenBLAS
for s390x, that does not bloat command lines too much.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-08 19:34:18 +02:00
Marius Hillenbrand
0629d8ebdb s390x/DYNAMIC_ARCH: generalize detecting supported archs for clang
Simplify detection of which kernels we can compile on s390x. Instead of
decoding the gcc version in a complicated manner, just check if CC
supports a given -march=archXY flag. Together with the next patch, we
thereby gain support for builds with LLVM/clang with DYNAMIC_ARCH=1.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-08 19:34:18 +02:00
Martin Kroeker
15da2f9acb Merge pull request #2828 from martin-frbg/lapack438
Correct xLASET arguments in LAPACK EIG tests
2020-09-08 10:25:19 +02:00
Martin Kroeker
7d9c77f421 Correct dimension argument to xLASET
from Reference-LAPACK PR 438
2020-09-07 22:03:46 +02:00
Martin Kroeker
c8f029a518 Merge pull request #82 from xianyi/develop
rebase
2020-09-07 21:59:13 +02:00
Martin Kroeker
e72430fe46 Merge pull request #2803 from xiegengxin/AVX2-asum
Implementaion of dasum, sasum with AVX2 & AVX512 intrinsic
2020-09-06 18:32:15 +02:00
Martin Kroeker
6e0f6c5f00 Merge pull request #2824 from martin-frbg/asumbench
Use POSIX2001 clock.gettime in asum benchmark if available
2020-09-06 10:05:47 +02:00
Martin Kroeker
6f8fad87c5 Use POSIX2001 clock.gettime for higher resolution 2020-09-05 19:44:01 +02:00
Martin Kroeker
ed0f2d3dd7 Merge pull request #2816 from martin-frbg/silicon
Add basic support for Apple Vortex (ARM64) cpu
2020-09-05 19:17:59 +02:00
Martin Kroeker
43a31b7786 Merge pull request #2823 from martin-frbg/fix2778
Improve fix for lapack-test EIG/cchkhb2stg from PR 2778
2020-09-05 17:29:38 +02:00
Martin Kroeker
8a2a137a9e Correct argument to SLASET (Improves fix from PR2778)
as explained by serguei-patchkovskii in Reference-LAPACK/lapack#438 (comment) , passing in an index of 1 instead of N leads to a standards violation accessing matrix A in SLASET, i.e. undefined behavior
2020-09-05 13:06:31 +02:00
Martin Kroeker
0d1f30a297 Merge pull request #81 from xianyi/develop
rebase
2020-09-05 12:47:03 +02:00
Martin Kroeker
70a254d507 Merge pull request #2822 from martin-frbg/issue2821
Fix potential domain error in sqrt
2020-09-05 12:39:32 +02:00
Martin Kroeker
330044d821 Fix potentiol domain error in sqrt 2020-09-05 09:44:33 +02:00
Martin Kroeker
97636b2c8a Merge pull request #2819 from h-vetinari/carry_lapack_437
Carry lapack#437
2020-09-04 23:50:43 +02:00
Martin Kroeker
4d36711547 Merge pull request #2820 from RajalakshmiSR/clang
POWER9: Fix mcpu option with clang
2020-09-04 23:09:31 +02:00
Rajalakshmi Srinivasaraghavan
718f67421a POWER9: Fix mcpu option with clang
Adding check for compiler type before checking GCC version in Makefile.
This allows clang to use power9 instead of power8 when CORE is POWER9.
2020-09-04 10:36:19 -05:00
H. Vetinari
3426519ae2 adapt ?ggsv?-functions to ambient code style in LAPACKE/include/lapack.h 2020-09-04 17:33:24 +02:00
H. Vetinari
1c6c71fa85 Follow-up to lapack#434 & lapack#409: add missing 'const' in signatures
Based on how the surrounding functions in lapack.h are handling the
parameters, particularly the ?ggsv?3-variants of the affected functions
2020-09-04 17:33:11 +02:00
H. Vetinari
860247b5da Follow-up to lapack#434 & lapack#409: fix signature mismatches 2020-09-04 17:32:53 +02:00
Martin Kroeker
c61771e335 Merge pull request #2778 from martin-frbg/lapackeig
Fix various wrong calls to SLASET/DLASET in the EIG part of the LAPACK testsuite
2020-09-04 10:06:02 +02:00
Chen, Guobing
deaeb6c5b8 Add bfloat16 based dot and conversion with single/double
1. Added bfloat16 based dot as new API: shdot
2. Implemented generic kernel and cooperlake-specific (AVX512-BF16) kernel for shdot
3. Added 4 conversion APIs for bfloat16 data type <=> single/double: shstobf16 shdtobf16 sbf16tos dbf16tod
     shstobf16 -- convert single float array to bfloat16 array
     shdtobf16 -- convert double float array to bfloat16 array
     sbf16tos  -- convert bfloat16 array to single float array
     dbf16tod  -- convert bfloat16 array to double float array
4. Implemented generic kernels for all 4 conversion APIs, and cooperlake-specific kernel for shstobf16 and shdtobf16
5. Update level1 thread facilitate functions and macros to support multi-threading for these new APIs
6. Fix Cooperlake platform detection/specify issue when under dynamic-arch building
7. Change the typedef of bfloat16 from unsigned short to more strict uint16_t

Signed-off-by: Chen, Guobing <guobing.chen@intel.com>
2020-09-04 02:31:25 +08:00
Martin Kroeker
c7ef7174e4 Merge pull request #2817 from martin-frbg/lapack436
LAPACKE: fix declaration of work arrays in [cz]gesvdq
2020-09-03 17:10:23 +02:00
Martin Kroeker
775a87242d Rename KERNEL.SILICON to KERNEL.VORTEX 2020-09-03 08:44:20 +02:00
Martin Kroeker
af5bc95503 Rename SILICON to VORTEX and fix duplicate numbering 2020-09-03 08:43:26 +02:00
Martin Kroeker
ea3a58c844 Rename SILICON to VORTEX 2020-09-03 08:38:53 +02:00
Martin Kroeker
17dca035de rename SILICON to VORTEX 2020-09-03 08:38:08 +02:00
Gengxin Xie
1b0f17eeed align to 64, using SSE when input size is small 2020-09-03 14:25:54 +08:00
Martin Kroeker
c31b72965e Fix data type of work array in zgesvdq prototype 2020-09-02 23:44:44 +02:00
Martin Kroeker
0ce2aa3163 Fix data type of rwork array 2020-09-02 23:41:51 +02:00
Martin Kroeker
80794fe8fd Create KERNEL.SILICON 2020-09-02 22:56:58 +02:00
Martin Kroeker
4a4d1ca6e0 Add AppleSIlicon cpu 2020-09-02 22:52:12 +02:00
Martin Kroeker
b37d17382a Add Apple Silicon 2020-09-02 22:48:49 +02:00
Martin Kroeker
029fd01cfb Detect AppleSilicon cpu on OSX 2020-09-02 22:47:38 +02:00
Martin Kroeker
9d1ea75aa0 Merge pull request #80 from xianyi/develop
rebase
2020-09-02 22:16:41 +02:00
Martin Kroeker
776d005f4c Merge pull request #2815 from mhillenibm/clang_s390x
Fix build with clang on s390x
2020-09-02 16:56:01 +02:00
Marius Hillenbrand
2ee5b899ce s390x: enable S/DGEMM block with explicit loop unrolling + interleaving with clang
The code for SGEMM 16x4 and DGEMM 8x4 blocks on z14 and z15 uses
explicit unrolling and interleaving to improve performance. The code
employs an empty inline asm statement with operands that constrain the
compiler's instruction scheduling and thereby enforce proper overlapping
of load and compute phases. Fix an ifdef to apply that for clang builds,
as well.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-02 13:49:31 +02:00
Marius Hillenbrand
095f4e6964 s390x: allow clang to emit fused multiply-adds (replicates gcc's default behavior)
gcc's default setting for floating-point expression contraction is
"fast", which allows the compiler to emit fused multiply adds instead of
separate multiplies and adds (amongst others). Fused multiply-adds,
which assembly kernels typically apply, also bring a significant
performance advantage to the C implementation for matrix-matrix
multiplication on s390x. To enable that performance advantage for builds
with clang, add -ffp-contract=fast to the compiler options.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-02 13:49:31 +02:00
Marius Hillenbrand
87e5bbd887 s390x: avoid variable-length arrays in struct for asm operands
... since it is not required and clang does not support that gcc
extension. Instead, use a variable-length array directly for these
operands.

Note that, while the actual inline assembly code does not directly use
these memory operands, they serve to inform the compiler that it cannot
reorder reads or writes to/from the input and output data across the
inline asm statements.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-02 13:49:31 +02:00
Marius Hillenbrand
b9b3265ec8 s390x: avoid inline assembly for vector loads for clang
... since clang does not support the instruction format for inline
assembly and also it is not required for current versions of clang.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-02 13:49:30 +02:00
Marius Hillenbrand
a1616a0b86 s390x: replace nop with "nop 0" in inline assembly
... as a bandaid for building with clang until LLVM's internal assembler
supports nops without operand.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-02 13:49:30 +02:00
Marius Hillenbrand
60ef193258 s390x: use "lghi" for immediate values to fix build with clang
Some of the kernels written in assembly utilize a "load address"
instruction for loading an immediate value into a register. That is
both unnecessarily complex and LLVM's assembler does not understand that
specific syntax. Thus, replace with the appropriate "load immediate"
instruction, which is also clearer to read.

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
2020-09-02 13:49:30 +02:00
Martin Kroeker
18bfb6d6f7 Merge pull request #2813 from martin-frbg/issue2804-2
Fix for c_check misinterpreting arm64 in uname -m output as armv7
2020-09-01 23:39:46 +02:00
Martin Kroeker
e4900caa11 Fix c_check misinterpreting arm64 in uname output to mean armv7
additionla fix for upcoming OSX on ARM64 related to #2804, as suggested by fxcoudert in #2805
2020-09-01 19:54:08 +02:00
Martin Kroeker
68b1713c30 Merge pull request #2811 from martin-frbg/issue2806
Make NO_AVX512 option override the AVX512 compile test in CMAKE builds as well
2020-09-01 17:19:14 +02:00
Martin Kroeker
4074770d00 Merge pull request #2797 from martin-frbg/relafixes1
ReLAPACK fixes
2020-09-01 16:04:03 +02:00
Martin Kroeker
b87a77da02 Merge pull request #79 from xianyi/develop
rebase
2020-09-01 12:03:53 +02:00
Martin Kroeker
f42e84d46c Fix misnaming of LAPACK_?ggsvp function prototypes as LAPACKE_ (#2808)
* Fix misnaming of LAPACK_?ggsvp and ?ggsvd function prototypes as LAPACKE_

* Drop the LAPACKE matrix_layout parameter from the argument lists, change ints to pointers and add missing work arguments.
2020-09-01 10:44:48 +02:00
Martin Kroeker
0a4c5c4c44 Merge pull request #2807 from martin-frbg/issue2804
Work around ARMV8 build-time cpu detection problems on non-Linux systems
2020-08-31 23:44:56 +02:00
Martin Kroeker
3210a42734 Report cpu as ARMV8 instead of just giving up on non-Linux hosts 2020-08-31 20:03:21 +02:00
Martin Kroeker
5feb087c05 Handle Apple labeling armv8 as arm64 rather than aarch64 2020-08-31 20:02:08 +02:00
Gengxin Xie
448152cdd8 define __AVX2__ to ensure the haswell code compiled with avx2 2020-08-31 14:39:08 +08:00
Gengxin Xie
cb3c190a3a Implementaion of dasum, sasum with AVX2 & AVX512 intrinsic 2020-08-31 11:44:08 +08:00
Martin Kroeker
59e01b1aec Merge pull request #2799 from RajalakshmiSR/p10_ger
POWER10: Avoid setting accumulators to zero in gemm kernels
2020-08-28 22:52:11 +02:00
Rajalakshmi Srinivasaraghavan
317ff27cda POWER10: Avoid setting accumulators to zero in gemm kernels
For the first iteration, it is better to use xvf*ger instead of xvf*gerpp
builtins which helps to avoid setting accumulators to zero. This helps
to reduce few instructions.
2020-08-28 10:42:54 -05:00
Martin Kroeker
de63675717 Add early returns and fix sign errors in workspace calculations 2020-08-27 11:25:18 +02:00
Martin Kroeker
d64cc2be81 Add early returns 2020-08-27 11:22:50 +02:00
Martin Kroeker
c9b67141f0 Add early returns 2020-08-27 11:20:31 +02:00
Martin Kroeker
6797a3a1e0 Add early returns 2020-08-27 11:15:12 +02:00
Martin Kroeker
936966a42c Make ILAENV and xGETRF2 functions available 2020-08-27 10:59:08 +02:00
Martin Kroeker
597010a968 Fix incorrect argument to SLASET
Reference-LAPACK issue 425 (and 318)
2020-08-14 00:41:56 +02:00
Martin Kroeker
d64f1ef26b Fix incorrect argument to SLASET
Reference-LAPACK issue 425 (and 318)
2020-08-14 00:40:24 +02:00
Martin Kroeker
c62aad62e5 Fix incorrect calls to DLASET
Reference-LAPACK issue 429
2020-08-14 00:35:45 +02:00
Martin Kroeker
63b03efc2a Merge pull request #2667 from xianyi/develop
Merge develop into 0.3.0 for 0.3.10 release
2020-06-14 22:03:04 +02:00
Xianyi Zhang
265ab484c8 Change default RISC-V 64-bit corename to RISCV64_GENERIC
e.g. make CC=riscv64-unknown-linux-gnu-gcc FC=riscv64-unknown-linux-gnu-gfortran TARGET=RISCV64_GENERIC HOSTCC=gcc
2020-02-27 14:46:15 +08:00
Xianyi Zhang
44020a42a4 Fixed compile bug for RV64. 2020-02-27 14:29:42 +08:00
Xianyi Zhang
4aa2d89217 Merge branch 'develop' into risc-v 2020-02-27 13:53:49 +08:00
xoviat
6cfd6195c5 param: define constant as blaslong to prevent overflow 2019-05-05 13:10:36 -05:00
xoviat
5163a85d40 add gitignore directory 2019-05-05 13:09:48 -05:00
xoviat
dbf9ad1f3d tests: add windows compatibility 2019-05-05 13:09:39 -05:00
Martin Kroeker
d93cf1126e Merge pull request #1753 from dloghin/risc-v
Override ARCH (archiver) in lapack-netlib/make.inc to avoid conflict with ARCH (architecture)
2018-09-07 11:01:23 +02:00
Dumi Loghin
a1bdc308b8 override ARCH (archiver) in lapack-netlib/make.inc 2018-09-06 13:13:36 +08:00
Dumi Loghin
0b7ccb9e38 Revert "replace ARCH with AR in lapack-netlib"
This reverts commit db17ce896f.
2018-09-06 13:08:30 +08:00
Dumi Loghin
db17ce896f replace ARCH with AR in lapack-netlib 2018-09-05 12:49:37 +08:00
Martin Kroeker
cbc46163bd Merge pull request #1526 from jerryz123/upstream_riscv
Add support for RISC-V
2018-04-28 11:55:45 +02:00
Jerry Zhao
0ee395db35 Fixed TRMM and SYMM for RISCV 2018-04-18 18:03:32 -07:00
Jerry Zhao
c167a3d6f4 Added RISCV build 2018-04-16 14:08:31 -07:00
962 changed files with 99125 additions and 12643 deletions

View File

@@ -190,3 +190,27 @@ steps:
- make -C ctest $COMMON_FLAGS
- make -C utest $COMMON_FLAGS
- make -C cpp_thread_test dgemm_tester
---
kind: pipeline
name: arm64_gcc10
platform:
os: linux
arch: arm64
steps:
- name: Build and Test
image: ubuntu:20.04
environment:
CC: gcc-10
FC: gfortran-10
COMMON_FLAGS: 'TARGET=ARMV8 DYNAMIC_ARCH=1'
commands:
- echo "MAKE_FLAGS:= $COMMON_FLAGS"
- apt-get update -y
- apt-get install -y make $CC gfortran-10 perl python g++
- $CC --version
- make QUIET_MAKE=1 $COMMON_FLAGS
- make -C utest $COMMON_FLAGS
- make -C test $COMMON_FLAGS

View File

@@ -43,7 +43,7 @@ jobs:
- name: Update Homebrew
if: github.event_name != 'pull_request'
run: brew update || true
- name: Install prerequisites
run: brew install --fetch-HEAD --HEAD --only-dependencies --keep-tmp openblas

2
.gitignore vendored
View File

@@ -89,5 +89,7 @@ build.*
*.swp
benchmark/*.goto
benchmark/smallscaling
.vscode
CMakeCache.txt
CMakeFiles/*
.vscode

View File

@@ -1,33 +1,38 @@
# XXX: Precise is already deprecated, new default is Trusty.
# https://blog.travis-ci.com/2017-07-11-trusty-as-default-linux-is-coming
dist: precise
dist: focal
sudo: true
language: c
matrix:
include:
- &test-ubuntu
os: linux
# os: linux
compiler: gcc
addons:
apt:
packages:
- gfortran
# before_script: &common-before
# - COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32"
# script:
# - make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
# - make -C test $COMMON_FLAGS $BTYPE
# - make -C ctest $COMMON_FLAGS $BTYPE
# - make -C utest $COMMON_FLAGS $BTYPE
# env:
# - TARGET_BOX=LINUX64
# - BTYPE="BINARY=64"
#
# - <<: *test-ubuntu
os: linux-ppc64le
before_script: &common-before
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32"
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=POWER8 NUM_THREADS=32"
script:
- make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
- make -C test $COMMON_FLAGS $BTYPE
- make -C ctest $COMMON_FLAGS $BTYPE
- make -C utest $COMMON_FLAGS $BTYPE
env:
- TARGET_BOX=LINUX64
- BTYPE="BINARY=64"
- <<: *test-ubuntu
os: linux-ppc64le
before_script:
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=POWER8 NUM_THREADS=32"
env:
# for matrix annotation only
- TARGET_BOX=PPC64LE_LINUX
@@ -44,37 +49,49 @@ matrix:
- BTYPE="BINARY=64 USE_OPENMP=1"
- <<: *test-ubuntu
env:
- TARGET_BOX=LINUX64
- BTYPE="BINARY=64 USE_OPENMP=1"
- <<: *test-ubuntu
env:
- TARGET_BOX=LINUX64
- BTYPE="BINARY=64 INTERFACE64=1"
- <<: *test-ubuntu
os: linux
dist: focal
arch: s390x
compiler: clang
before_script:
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=Z13 NUM_THREADS=32"
env:
- TARGET_BOX=LINUX64
- BTYPE="BINARY=64 CC=clang"
- <<: *test-ubuntu
compiler: clang
env:
- TARGET_BOX=LINUX64
- BTYPE="BINARY=64 INTERFACE64=1 CC=clang"
- <<: *test-ubuntu
addons:
apt:
packages:
- gcc-multilib
- gfortran-multilib
env:
- TARGET_BOX=LINUX32
- BTYPE="BINARY=32"
# for matrix annotation only
- TARGET_BOX=IBMZ_LINUX
- BTYPE="BINARY=64 USE_OPENMP=0 CC=clang"
# - <<: *test-ubuntu
# env:
# - TARGET_BOX=LINUX64
# - BTYPE="BINARY=64 USE_OPENMP=1"
#
# - <<: *test-ubuntu
# env:
# - TARGET_BOX=LINUX64
# - BTYPE="BINARY=64 INTERFACE64=1"
#
# - <<: *test-ubuntu
# compiler: clang
# env:
# - TARGET_BOX=LINUX64
# - BTYPE="BINARY=64 CC=clang"
#
# - <<: *test-ubuntu
# compiler: clang
# env:
# - TARGET_BOX=LINUX64
# - BTYPE="BINARY=64 INTERFACE64=1 CC=clang"
#
# - <<: *test-ubuntu
# addons:
# apt:
# packages:
# - gcc-multilib
# - gfortran-multilib
# env:
# - TARGET_BOX=LINUX32
# - BTYPE="BINARY=32"
#
- os: linux
arch: ppc64le
dist: bionic
@@ -93,46 +110,63 @@ matrix:
- TARGET_BOX=PPC64LE_LINUX_P9
- os: linux
arch: ppc64le
dist: bionic
compiler: gcc
addons:
apt:
packages:
- binutils-mingw-w64-x86-64
- gcc-mingw-w64-x86-64
- gfortran-mingw-w64-x86-64
before_script: *common-before
before_script:
- sudo add-apt-repository 'ppa:ubuntu-toolchain-r/test' -y
- sudo apt-get update
- sudo apt-get install gcc-9 gfortran-9 -y
script:
- travis_wait 45 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
- make QUIET_MAKE=1 BUILD_BFLOAT16=1 BINARY=64 USE_OPENMP=1 CC=gcc-9 FC=gfortran-9
- make -C test $COMMON_FLAGS $BTYPE
- make -C ctest $COMMON_FLAGS $BTYPE
- make -C utest $COMMON_FLAGS $BTYPE
env:
- TARGET_BOX=WIN64
- BTYPE="BINARY=64 HOSTCC=gcc CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran"
# for matrix annotation only
- TARGET_BOX=PPC64LE_LINUX_P9
# - os: linux
# compiler: gcc
# addons:
# apt:
# packages:
# - binutils-mingw-w64-x86-64
# - gcc-mingw-w64-x86-64
# - gfortran-mingw-w64-x86-64
# before_script: *common-before
# script:
# - travis_wait 45 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
# env:
# - TARGET_BOX=WIN64
# - BTYPE="BINARY=64 HOSTCC=gcc CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran"
#
# Build & test on Alpine Linux inside chroot, i.e. on system with musl libc.
# These jobs needs sudo, so Travis runs them on VM-based infrastructure
# which is slower than container-based infrastructure used for jobs
# that don't require sudo.
- &test-alpine
os: linux
dist: trusty
sudo: true
language: minimal
before_install:
- "wget 'https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.9.0/alpine-chroot-install' \
&& echo 'e5dfbbdc0c4b3363b99334510976c86bfa6cb251 alpine-chroot-install' | sha1sum -c || exit 1"
- alpine() { /alpine/enter-chroot -u "$USER" "$@"; }
install:
- sudo sh alpine-chroot-install -p 'build-base gfortran perl linux-headers'
before_script: *common-before
script:
# XXX: Disable some warnings for now to avoid exceeding Travis limit for log size.
- alpine make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
CFLAGS="-Wno-misleading-indentation -Wno-sign-conversion -Wno-incompatible-pointer-types"
- alpine make -C test $COMMON_FLAGS $BTYPE
- alpine make -C ctest $COMMON_FLAGS $BTYPE
- alpine make -C utest $COMMON_FLAGS $BTYPE
env:
- TARGET_BOX=LINUX64_MUSL
- BTYPE="BINARY=64"
# - &test-alpine
# os: linux
# dist: trusty
# sudo: true
# language: minimal
# before_install:
# - "wget 'https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.9.0/alpine-chroot-install' \
# && echo 'e5dfbbdc0c4b3363b99334510976c86bfa6cb251 alpine-chroot-install' | sha1sum -c || exit 1"
# - alpine() { /alpine/enter-chroot -u "$USER" "$@"; }
# install:
# - sudo sh alpine-chroot-install -p 'build-base gfortran perl linux-headers'
# before_script: *common-before
# script:
# # XXX: Disable some warnings for now to avoid exceeding Travis limit for log size.
# - alpine make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
# CFLAGS="-Wno-misleading-indentation -Wno-sign-conversion -Wno-incompatible-pointer-types"
# - alpine make -C test $COMMON_FLAGS $BTYPE
# - alpine make -C ctest $COMMON_FLAGS $BTYPE
# - alpine make -C utest $COMMON_FLAGS $BTYPE
# env:
# - TARGET_BOX=LINUX64_MUSL
# - BTYPE="BINARY=64"
# XXX: This job segfaults in TESTS OF THE COMPLEX LEVEL 3 BLAS,
# but only on Travis CI, cannot reproduce it elsewhere.
@@ -142,74 +176,113 @@ matrix:
# - TARGET_BOX=LINUX64_MUSL
# - BTYPE="BINARY=64 USE_OPENMP=1"
- <<: *test-alpine
env:
- TARGET_BOX=LINUX64_MUSL
- BTYPE="BINARY=64 INTERFACE64=1"
# - <<: *test-alpine
# env:
# - TARGET_BOX=LINUX64_MUSL
# - BTYPE="BINARY=64 INTERFACE64=1"
#
# # Build with the same flags as Alpine do in OpenBLAS package.
# - <<: *test-alpine
# env:
# - TARGET_BOX=LINUX64_MUSL
# - BTYPE="BINARY=64 NO_AFFINITY=1 USE_OPENMP=0 NO_LAPACK=0 TARGET=CORE2"
# Build with the same flags as Alpine do in OpenBLAS package.
- <<: *test-alpine
env:
- TARGET_BOX=LINUX64_MUSL
- BTYPE="BINARY=64 NO_AFFINITY=1 USE_OPENMP=0 NO_LAPACK=0 TARGET=CORE2"
# - &test-cmake
# os: linux
# compiler: clang
# addons:
# apt:
# packages:
# - gfortran
# - cmake
# dist: trusty
# sudo: true
# before_script:
# - COMMON_ARGS="-DTARGET=NEHALEM -DNUM_THREADS=32"
# script:
# - mkdir build
# - CONFIG=Release
# - cmake -Bbuild -H. $CMAKE_ARGS $COMMON_ARGS -DCMAKE_BUILD_TYPE=$CONFIG
# - cmake --build build --config $CONFIG -- -j2
# env:
# - CMAKE=1
# - <<: *test-cmake
# env:
# - CMAKE=1 CMAKE_ARGS="-DNOFORTRAN=1"
# - <<: *test-cmake
# compiler: gcc
# env:
# - CMAKE=1
- &test-cmake
# - &test-macos
# os: osx
# osx_image: xcode11.5
# before_script:
# - COMMON_FLAGS="DYNAMIC_ARCH=1 NUM_THREADS=32"
# script:
# - travis_wait 45 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
# env:
# - BTYPE="TARGET=NEHALEM BINARY=64 INTERFACE64=1 FC=gfortran-9"
#
# - <<: *test-macos
# osx_image: xcode12
# before_script:
# - COMMON_FLAGS="DYNAMIC_ARCH=1 NUM_THREADS=32"
# - brew update
# script:
# - travis_wait 45 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
# env:
# - BTYPE="TARGET=HASWELL USE_OPENMP=1 BINARY=64 INTERFACE64=1 CC=gcc-10 FC=gfortran-10"
#
# - <<: *test-macos
# osx_image: xcode12
# before_script:
# - COMMON_FLAGS="DYNAMIC_ARCH=1 NUM_THREADS=32"
# - brew update
# script:
# - travis_wait 45 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
# env:
# - BTYPE="TARGET=NEHALEM BINARY=64 INTERFACE64=1 FC=gfortran-10"
# - <<: *test-macos
# osx_image: xcode10
# env:
# - BTYPE="TARGET=NEHALEM BINARY=32 NOFORTRAN=1"
# - <<: *test-macos
# osx_image: xcode11.5
# before_script:
# - COMMON_FLAGS="DYNAMIC_ARCH=1 NUM_THREADS=32"
# - brew update
# env:
# - CC="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
# - CFLAGS="-O2 -Wno-macro-redefined -isysroot /Applications/Xcode-10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -arch arm64 -miphoneos-version-min=10.0"
# - CC="/Applications/Xcode-11.5.GM.Seed.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
# - CFLAGS="-O2 -Wno-macro-redefined -isysroot /Applications/Xcode-11.5.GM.Seed.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk -arch arm64 -miphoneos-version-min=10.0"
# - BTYPE="TARGET=ARMV8 BINARY=64 HOSTCC=clang NOFORTRAN=1"
# - <<: *test-macos
# osx_image: xcode11.5
# env:
## - CC="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
## - CFLAGS="-O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode-10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -arch armv7 -miphoneos-version-min=5.1"
# - CC="/Applications/Xcode-11.5.GM.Seed.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
# - CFLAGS="-O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode-11.5.GM.Seed.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk -arch armv7 -miphoneos-version-min=5.1"
# - BTYPE="TARGET=ARMV7 HOSTCC=clang NOFORTRAN=1"
- &test-graviton2
os: linux
compiler: clang
arch: arm64-graviton2
dist: focal
group: edge
virt: lxd
compiler: gcc
addons:
apt:
packages:
- gfortran
- cmake
dist: trusty
sudo: true
before_script:
- COMMON_ARGS="-DTARGET=NEHALEM -DNUM_THREADS=32"
script:
- mkdir build
- CONFIG=Release
- cmake -Bbuild -H. $CMAKE_ARGS $COMMON_ARGS -DCMAKE_BUILD_TYPE=$CONFIG
- cmake --build build --config $CONFIG -- -j2
env:
- CMAKE=1
- <<: *test-cmake
env:
- CMAKE=1 CMAKE_ARGS="-DNOFORTRAN=1"
- <<: *test-cmake
compiler: gcc
env:
- CMAKE=1
- &test-macos
os: osx
osx_image: xcode10.1
before_script:
- COMMON_FLAGS="DYNAMIC_ARCH=1 NUM_THREADS=32"
- brew update
- brew install gcc@8 # for gfortran
script:
- travis_wait 45 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
env:
- BTYPE="TARGET=NEHALEM BINARY=64 INTERFACE64=1 FC=gfortran-8"
- <<: *test-macos
osx_image: xcode10.0
env:
- BTYPE="TARGET=NEHALEM BINARY=32 NOFORTRAN=1"
- <<: *test-macos
osx_image: xcode10.1
env:
- CC="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
- CFLAGS="-O2 -Wno-macro-redefined -isysroot /Applications/Xcode-10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -arch arm64 -miphoneos-version-min=10.0"
- BTYPE="TARGET=ARMV8 BINARY=64 HOSTCC=clang NOFORTRAN=1"
- <<: *test-macos
osx_image: xcode10.1
env:
- CC="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
- CFLAGS="-O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode-10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -arch armv7 -miphoneos-version-min=5.1"
- BTYPE="TARGET=ARMV7 HOSTCC=clang NOFORTRAN=1"
- travis_wait 45 make && make lapack-test
# whitelist
branches:
only:

View File

@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.8.5)
project(OpenBLAS C ASM)
set(OpenBLAS_MAJOR_VERSION 0)
set(OpenBLAS_MINOR_VERSION 3)
set(OpenBLAS_PATCH_VERSION 10.dev)
set(OpenBLAS_PATCH_VERSION 18)
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
# Adhere to GNU filesystem layout conventions
@@ -14,6 +14,9 @@ include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
if(MSVC AND NOT DEFINED NOFORTRAN)
set(NOFORTRAN ON)
endif()
#######
if(MSVC)
@@ -29,6 +32,8 @@ option(NO_AFFINITY "Disable support for CPU affinity masks to avoid binding proc
else()
set(NO_AFFINITY 1)
endif()
option(CPP_THREAD_SAFETY_TEST "Run a massively parallel DGEMM test to confirm thread safety of the library (requires OpenMP and about 1.3GB of RAM)" OFF)
option(CPP_THREAD_SAFETY_GEMV "Run a massively parallel DGEMV test to confirm thread safety of the library (requires OpenMP)" OFF)
# Add a prefix or suffix to all exported symbol names in the shared library.
# Avoids conflicts with other BLAS libraries, especially when using
@@ -87,13 +92,13 @@ if (NOT NO_LAPACK)
list(APPEND SUBDIRS lapack)
endif ()
if (NOT DEFINED BUILD_HALF)
set (BUILD_HALF false)
if (NOT DEFINED BUILD_BFLOAT16)
set (BUILD_BFLOAT16 false)
endif ()
# set which float types we want to build for
if (NOT DEFINED BUILD_SINGLE AND NOT DEFINED BUILD_DOUBLE AND NOT DEFINED BUILD_COMPLEX AND NOT DEFINED BUILD_COMPLEX16)
# if none are defined, build for all
# set(BUILD_HALF true)
# set(BUILD_BFLOAT16 true)
set(BUILD_SINGLE true)
set(BUILD_DOUBLE true)
set(BUILD_COMPLEX true)
@@ -125,9 +130,9 @@ if (BUILD_COMPLEX16)
list(APPEND FLOAT_TYPES "ZCOMPLEX") # defines COMPLEX and DOUBLE
endif ()
if (BUILD_HALF)
if (BUILD_BFLOAT16)
message(STATUS "Building Half Precision")
list(APPEND FLOAT_TYPES "HALF") # defines nothing
# list(APPEND FLOAT_TYPES "BFLOAT16") # defines nothing
endif ()
if (NOT DEFINED CORE OR "${CORE}" STREQUAL "UNKNOWN")
@@ -227,13 +232,16 @@ if (NOT NO_CBLAS)
add_subdirectory(utest)
endif()
if (NOT MSVC AND NOT NOFORTRAN)
if (NOT NOFORTRAN)
# Build test and ctest
add_subdirectory(test)
if(NOT NO_CBLAS)
add_subdirectory(ctest)
endif()
add_subdirectory(lapack-netlib/TESTING)
if (CPP_THREAD_SAFETY_TEST OR CPP_THREAD_SAFETY_GEMV)
add_subdirectory(cpp_thread_test)
endif()
endif()
set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES

View File

@@ -187,6 +187,13 @@ In chronological order:
* Marius Hillenbrand <https://github.com/mhillenibm>
* [2020-05-12] Revise dynamic architecture detection for IBM z
* [2020-05-12] Add new sgemm and strmm kernel for IBM z14
* [2020-09-07] Fix builds with clang on IBM z, including dynamic architecture support
* Danfeng Zhang <https://github.com/craft-zhang>
* [2020-05-20] Improve performance of SGEMM and STRMM on Arm Cortex-A53
* [2020-05-20] Improve performance of SGEMM and STRMM on Arm Cortex-A53
* PingTouGe Semiconductor Co., Ltd.
* [2020-10] Add RISC-V Vector (0.7.1) support. Optimize BLAS kernels for Xuantie C910
* River Dillon <oss@outerpassage.net>
* [2021-07-10] fix compilation with musl libc

View File

@@ -1,4 +1,356 @@
OpenBLAS ChangeLog
====================================================================
Version 0.3.18
02-Oct-2021
general:
- when the build-time number of preconfigured threads is exceeded
at runtime (typically by an external program calling BLAS functions
from a larger number of threads in parallel), OpenBLAS will now
allocate an auxiliary control structure for up to 512 additional
threads instead of aborting
- added support for Loongson's LoongArch64 cpu architecture
- fixed building OpenBLAS with CMAKE and -DBUILD_BFLOAT16=ON
- added support for building OpenBLAS as a CMAKE subproject
- added support for building for Windows/ARM64 targets with clang
- improved support for building with the IBM xlf compiler
- imported Reference-LAPACK PR 625 (out-of-bounds reads in ?LARRV)
- imported Reference-LAPACK PR 597 for testsuite compatibility with
LLVM's libomp
x86_64:
- added SkylakeX S/DGEMM kernels for small problem sizes (M*N*K<=1000000)
- added optimized SBGEMM for Intel Cooper Lake
- reinstated the performance patch for AVX512 SGEMV_T with a proper fix
- added a workaround for a gcc11 tree-vectorizer bug that caused spurious
failures in the test programs for complex BLAS3 when compiling at -O3
(the default for cmake "release" builds)
- added support for runtime cpu count detection under Haiku OS
- worked around a long-standing miscompilation issue of the Haswell DGEMV_T
kernel with gcc that could produce NaN output in some corner cases
POWER:
- improved performance of DASUM on POWER10
ARMV8:
- fixed crashes (use of reserved register x18) on Apple M1 under OSX
- fixed building with gcc releases earlier than 5.1
MIPS:
- fixed building under BSD
MIPS64:
- fixed building under BSD
====================================================================
Version 0.3.17
15-Jul-2021
common:
- reverted the optimization of SGEMV_N/DGEMV_N for small input sizes
and consecutive arguments as it led to stack overflows on x86_64
with some operating systems (notably OSX and Windows)
x86_64:
- reverted the performance patch for SGEMV_T on AVX512 as it caused
wrong results in some applications
SPARC:
- fixed compilation with compilers other than gcc
====================================================================
Version 0.3.16
11-Jul-2021
common:
- drastically reduced the stack size requirements for running the LAPACK
testsuite (Reference-LAPACK PR 553)
- fixed spurious test failures in the LAPACK testsuite (Reference-LAPACK
PR 564)
- expressly setting DYNAMIC_ARCH=0 no longer enables dynamic_arch mode
- improved performance of xGER, xSPR, xSPR2, xSYR, xSYR2, xTRSV, SGEMV_N
and DGEMV_N, for small input sizes and consecutive arguments
- improved performance of xGETRF, xPORTF and xPOTRI for small input sizes
by disabling multithreading
- fixed installing with BSD versions of the "install" utility
RISCV:
- fixed the implementation of xIMIN
- improved the performance of DSDOT
- fixed linking of the tests on C910V with current vendor gcc
POWER:
- fixed SBGEMM computation for some odd value inputs
- fixed compilation for PPCG4, PPC970, POWER3, POWER4 and POWER5
x86_64:
- improved performance of SGEMV_N and SGEMV_T for small N on AVX512-capable cpus
- worked around a miscompilation of ZGEMM/ZTRMM on Sandybridge with old gcc
versions
- fixed compilation with MS Visual Studio versions older than 2017
- fixed macro name collision with winnt.h from the latest Win10 SDK
- added cpu type autodetection for Intel Ice Lake SP
- fixed cpu type autodetection for Intel Tiger Lake
- added cpu type autodetection for recent Centaur/Zhaoxin models
- fixed compilation with musl libc
ARM64:
- fixed compilation with gcc/gfortran on the Apple M1
- fixed linking of the tests on FreeBSD
- fixed missing restore of a register in the recently rewritten DNRM2 kernel
for ThunderX2 and Neoverse N1 that could cause spurious failures in e.g.
DGEEV
- added compiler optimization flags for the EMAG8180
- added initial support for Cortex A55
ARM:
- fixed linking of the tests on FreeBSD
====================================================================
Version 0.3.15
2-May-2021
common:
- imported improvements and bugfixes from Reference-LAPACK 3.9.1
- imported LAPACKE interface fixes from Reference-LAPACK PRs 534 + 537
- fixed a problem in the cpu detection of 0.3.14 that prevented cross-compilation
- fixed a sequence problem in the generation of softlinks to the library in GMAKE
RISC V:
- fixed compilation on RISCV (missing entry in getarch)
- fixed a potential division by zero in CROTG and ZROTG
POWER:
- fixed LAPACK testsuite failures seen with the NVIDIA HPC compiler
- improved CGEMM, DGEMM and ZGEMM performance on POWER10
- added an optimized ZGEMV kernel for POWER10
- fixed a potential division by zero in CROTG and ZROTG
x86_64:
- added support for Intel Control-flow Enforcement Technology (CET)
- reverted the DOMATCOPY_RT code to the generic C version
- fixed a bug in the AVX512 SGEMM kernel introduced in 0.3.14
- fixed misapplication of -msse flag to non-SSE cpus in DYNAMIC_ARCH
- added support for compilation of the benchmarks on older OSX versions
- fix propagation of the NO_AVX512 option in CMAKE builds
- fix compilation of the AVX512 SGEMM kernel with clang-cl on Windows
- fixed compilation of the CTESTs with INTERFACE64=1 (random faults on OSX)
- corrected the Haswell DROT kernel to require AVX2/FMA3 rather than AVX512
ARM:
- fixed a potential division by zero in CROTG and ZROTG
- fixed a potential overflow in IMATCOPY/ZIMATCOPY and the CTESTs
ARM64:
- fixed spurious reads outside the array in the SGEMM tcopy macro
- fixed a potential division by zero in CROTG and ZROTG
- fixed a segmentation fault in DYNAMIC_ARCH builds (reappeared in 0.3.14)
MIPS
- fixed a potential division by zero in CROTG and ZROTG
- fixed a potential overflow in IMATCOPY/ZIMATCOPY and the CTESTs
MIPS64:
- fixed a potential division by zero in CROTG and ZROTG
SPARC:
- fixed a potential division by zero in CROTG and ZROTG
====================================================================
Version 0.3.14
17-Mar-2021
common:
* Fixed a race condition on thread shutdown in non-OpenMP builds
* Fixed custom BUFFERSIZE option getting ignored in gmake builds
* Fixed CMAKE compilation of the TRMM kernels for GENERIC platforms
* Added CBLAS interfaces for CROTG, ZROTG, CSROT and ZDROT
* Improved performance of OMATCOPY_RT across all platforms
* Changed perl scripts to use env instead of a hardcoded /usr/bin/perl
* Fixed potential misreading of the GCC compiler version in the build scripts
* Fixed convergence problems in LAPACK complex GGEV/GGES (Reference-LAPACK #477)
* Reduced the stacksize requirements for running the LAPACK testsuite (Reference-LAPACK #335)
RISCV:
* Fixed compilation on RISCV (missing entry in getarch)
POWER:
* Fixed compilation for DYNAMIC_ARCH with clang and with old gcc versions
* Added support for compilation on FreeBSD/ppc64le
* Added optimized POWER10 kernels for SSCAL, DSCAL, CSCAL, ZSCAL
* Added optimized POWER10 kernels for SROT, DROT, CDOT, SASUM, DASUM
* Improved SSWAP, DSWAP, CSWAP, ZSWAP performance on POWER10
* Improved SCOPY and CCOPY performance on POWER10
* Improved SGEMM and DGEMM performance on POWER10
* Added support for compilation with the NVIDIA HPC compiler
x86_64:
* Added an optimized bfloat16 GEMM kernel for Cooperlake
* Added CPUID autodetection for Intel Rocket Lake and Tiger Lake cpus
* Improved the performance of SASUM,DASUM,SROT,DROT on AMD Ryzen cpus
* Added support for compilation with the NAG Fortran compiler
* Fixed recognition of the AMD AOCC compiler
* Fixed compilation for DYNAMIC_ARCH with clang on Windows
* Added support for running the BLAS/CBLAS tests on Windows
* Fixed signatures of the tls callback functions for Windows x64
* Fixed various issues with fma intrinsics support handling
ARM:
* Added support for embedded Cortex M targets via a new option EMBEDDED
ARMV8:
* Fixed the THUNDERX2T99 and NEOVERSEN1 DNRM2/ZNRM2 kernels for inputs with Inf
* Added support for the DYNAMIC_LIST option
* Added support for compilation with the NVIDIA HPC compiler
* Added support for compiling with the NAG Fortran compiler
====================================================================
Version 0.3.13
12-Dec-2020
common:
* Added a generic bfloat16 SBGEMV kernel
* Fixed a potentially severe memory leak after fork in OpenMP builds
that was introduced in 0.3.12
* Added detection of the Fujitsu Fortran compiler
* Added detection of the (e)gfortran compiler on OpenBSD
* Added support for overriding the default name of the library independently
from symbol suffixing in the gmake builds (already supported in cmake)
RISCV:
* Added a RISC V port optimized for C910V
POWER:
* Added optimized POWER10 kernels for SAXPY, CAXPY, SDOT, DDOT and DGEMV_N
* Improved DGEMM performance on POWER10
* Improved STRSM and DTRSM performance on POWER9 and POWER10
* Fixed segmemtation faults in DYNAMIC_ARCH builds
* Fixed compilation with the PGI compiler
x86:
* Fixed compilation of kernels that require SSE2 intrinsics since 0.3.12
x86_64:
* Added an optimized bfloat16 SBGEMV kernel for SkylakeX and Cooperlake
* Improved the performance of SASUM and DASUM kernels through parallelization
* Improved the performance of SROT and DROT kernels
* Improved the performance of multithreaded xSYRK
* Fixed OpenMP builds that use the LLVM Clang compiler together with GNU gfortran
(where linking of both the LLVM libomp and GNU libgomp could lead to lockups or
wrong results)
* Fixed miscompilations by old gcc 4.6
* Fixed misdetection of AVX2 capability in some Sandybridge cpus
* Fixed lockups in builds combining DYNAMIC_ARCH with TARGET=GENERIC on OpenBSD
ARM64:
* Fixed segmemtation faults in DYNAMIC_ARCH builds
MIPS:
* Improved kernels for Loongson 3R3 ("3A") and 3R4 ("3B") models, including MSA
* Fixed bugs in the MSA kernels for CGEMM, CTRMM, CGEMV and ZGEMV
* Added handling of zero increments in the MSA kernels for SSWAP and DSWAP
* Added DYNAMIC_ARCH support for MIPS64 (currently Loongson3R3/3R4 only)
SPARC:
* Fixed building 32 and 64 bit SPARC kernels with the SolarisStudio compilers
====================================================================
Version 0.3.12
24-Oct-2020
common:
* Fixed missing BLAS/LAPACK functions (inadvertently dropped during
the build system restructuring)
* Fixed argument conversion macro in LAPACKE_zgesvdq (LAPACK #458)
POWER:
* Added optimized SCOPY/CCOPY kernels for POWER10
* Increased and unified the default size of the GEMM BUFFER
* Fixed building for POWER10 in DYNAMIC_ARCH mode
* POWER10 compatibility test now checks binutils version as well
* Cleaned up compiler warnings
x86_64:
* corrected compiler version checks for AVX2 compatibility
* added compiler option -mavx2 for building with flang
* fixed direct SGEMM pathway for small matrix sizes (broken by
the code refactoring in 0.3.11)
* fixed unhandled partial register clobbers in several kernels
for AXPY,DOT,GEMV_N and GEMV_T flagged by gcc10 tree-vectorizer
ARMV8:
* improved Apple Vortex support to include cross-compiling
====================================================================
Version 0.3.11
17-Oct-2020
common:
* API change:
the newly added BFLOAT16 functions were renamed to use the
letter "B" instead of "H" to avoid potential confusion with
the IEEE "half precision float" type, i.e. the 0.3.10
SHGEMM is now SBGEMM and the corresponding build option
was changed from "BUILD_HALF" to "BUILD_BFLOAT16".
* Reduced the default BLAS3_MEM_ALLOC_THRESHOLD (used as an upper
limit for placing temporary arrays on the stack) to be compatible
with a stack size of 1mb (as imposed by the JAVA runtime library)
* Added mixed-precision dot function SBDOT and utility functions
shstobf16, shdtobf16, sbf16tos and dbf16tod to convert between
single or double precision float arrays and bfloat16 arrays
* Fixed prototypes of LAPACK_?ggsvp and LAPACK_?ggsvd functions
in lapack.h
* Fixed underflow and rounding errors in LAPACK SLANV2 and DLANV2
(causing miscalculations in e.g. SHSEQR/DHSEQR, LAPACK issue #263)
* Fixed workspace calculation in LAPACK ?GELQ (LAPACK issue #415)
* Fixed several bugs in the LAPACK testsuite
* Improved performance of TRMM and TRSM for certain problem sizes
* Fixed infinite recursions and workspace miscalculations in ReLAPACK
* CMAKE builds no longer require pkg-config for creating the .pc file
* Makefile builds no longer misread NO_CBLAS=0 or NO_LAPACK=0 as
enabling these options
* Fixed detection of gfortran when invoked through an mpi wrapper
* Improve thread reinitialization performance with OpenMP after a fork
* Added support for building only the subset of the library required
for a particular precision by specifying BUILD_SINGLE, BUILD_DOUBLE
* Optional function name prefixes and suffixes are now correctly
reflected in the generated cblas.h
* Added CMAKE build support for the LAPACK and multithreading tests
POWER:
* Added optimized support for POWER10
* Added support for compiling for POWER8 in 32bit mode
* Added support for compilation with LLVM/clang
* Added support for compilation with NVIDIA/PGI compilers
* Fixed building on big-endian POWER8
* Fixed miscompilation of ZDOTC by gcc10
* Fixed alignment errors in the POWER8 SAXPY kernel
* Improved CPU detection on AIX
* Supported building with older compilers on POWER9
x86_64:
* Added support for Intel Cooperlake
* Added autodetection of AMD Renoir/Matisse/Zen3 cpus
* Added autodetection of Intel Comet Lake cpus
* Reimplemented ?sum, ?dot and daxpy using universal intrinsics
* Reset the fpu state before using the fpu on Windows as a workaround
for a problem introduced in Windows 10 build 19041 (a.k.a. SDK 2004)
* Fixed potentially undefined behaviour in the dot and gemv_t kernels
* Fixed a potential segmentation fault in DYNAMIC_ARCH builds
* Fixed building for ZEN with PGI/NVIDIA and AMD AOCC compilers
ARMV7:
* Fixed cpu detection on BSD-like systems
ARMV8:
* Added preliminary support for Apple Vortex cpus
* Added support for the Cavium ThunderX3T110 cpu
* Fixed cpu detection on BSD-like systems
* Fixed compilation in -std=C18 mode
IBM Z:
* Added support for compiling with the clang compiler
* Improved GEMM performance on Z14
====================================================================
Version 0.3.10
14-Jun-2020

View File

@@ -59,6 +59,9 @@ endif
@$(CC) --version > /dev/null 2>&1;\
if [ $$? -eq 0 ]; then \
cverinfo=`$(CC) --version | sed -n '1p'`; \
if [ -z "$${cverinfo}" ]; then \
cverinfo=`$(CC) --version | sed -n '2p'`; \
fi; \
echo " C compiler ... $(C_COMPILER) (cmd & version : $${cverinfo})";\
else \
echo " C compiler ... $(C_COMPILER) (command line : $(CC))";\
@@ -67,6 +70,9 @@ ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
@$(FC) --version > /dev/null 2>&1;\
if [ $$? -eq 0 ]; then \
fverinfo=`$(FC) --version | sed -n '1p'`; \
if [ -z "$${fverinfo}" ]; then \
fverinfo=`$(FC) --version | sed -n '2p'`; \
fi; \
echo " Fortran compiler ... $(F_COMPILER) (cmd & version : $${fverinfo})";\
else \
echo " Fortran compiler ... $(F_COMPILER) (command line : $(FC))";\
@@ -161,7 +167,6 @@ ifeq ($(NO_SHARED), 1)
$(error OpenBLAS: neither static nor shared are enabled.)
endif
endif
@-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
@for d in $(SUBDIRS) ; \
do if test -d $$d; then \
$(MAKE) -C $$d $(@F) || exit 1 ; \
@@ -190,6 +195,7 @@ endif
ifdef USE_THREAD
@echo USE_THREAD=$(USE_THREAD) >> Makefile.conf_last
endif
@-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
@touch lib.grd
prof : prof_blas prof_lapack
@@ -263,12 +269,16 @@ prof_lapack : lapack_prebuild
lapack_prebuild :
ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
-@echo "FC = $(FC)" > $(NETLIB_LAPACK_DIR)/make.inc
-@echo "FFLAGS = $(LAPACK_FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "override FFLAGS = $(LAPACK_FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "FFLAGS_DRV = $(LAPACK_FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "POPTS = $(LAPACK_FPFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "FFLAGS_NOOPT = -O0 $(LAPACK_NOOPT)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "PNOOPT = $(LAPACK_FPFLAGS) -O0" >> $(NETLIB_LAPACK_DIR)/make.inc
ifeq ($(C_COMPILER)$(F_COMPILER)$(USE_OPENMP), CLANGGFORTRAN1)
-@echo "LDFLAGS = $(FFLAGS) $(EXTRALIB) -lomp" >> $(NETLIB_LAPACK_DIR)/make.inc
else
-@echo "LDFLAGS = $(FFLAGS) $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
endif
-@echo "CC = $(CC)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "override CFLAGS = $(LAPACK_CFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "AR = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
@@ -301,6 +311,18 @@ else
endif
ifeq ($(BUILD_LAPACK_DEPRECATED), 1)
-@echo "BUILD_DEPRECATED = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
endif
ifeq ($(BUILD_SINGLE), 1)
-@echo "BUILD_SINGLE = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
endif
ifeq ($(BUILD_DOUBLE), 1)
-@echo "BUILD_DOUBLE = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
endif
ifeq ($(BUILD_COMPLEX), 1)
-@echo "BUILD_COMPLEX = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
endif
ifeq ($(BUILD_COMPLEX16), 1)
-@echo "BUILD_COMPLEX16 = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
endif
-@echo "LAPACKE_WITH_TMG = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
-@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc

View File

@@ -12,3 +12,8 @@ ifeq ($(CORE), ARMV6)
CCOMMON_OPT += -mfpu=vfp
FCOMMON_OPT += -mfpu=vfp
endif
ifdef HAVE_NEON
CCOMMON_OPT += -mfpu=neon
FCOMMON_OPT += -mfpu=neon
endif

View File

@@ -1,28 +1,49 @@
ifneq ($(C_COMPILER), PGI)
ifneq ($(GCCVERSIONGT4), 1)
CCOMMON_OPT += -march=armv8-a
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a
endif
else
ifeq ($(CORE), ARMV8)
CCOMMON_OPT += -march=armv8-a
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a
endif
endif
ifeq ($(CORE), CORTEXA53)
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
endif
endif
ifeq ($(CORE), CORTEXA57)
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a57
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=cortex-a57
endif
endif
ifeq ($(CORE), CORTEXA72)
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
endif
endif
ifeq ($(CORE), CORTEXA73)
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a73
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=cortex-a73
endif
endif
# Use a72 tunings because Neoverse-N1 is only available
# in GCC>=9
@@ -30,46 +51,105 @@ ifeq ($(CORE), NEOVERSEN1)
ifeq ($(GCCVERSIONGTEQ7), 1)
ifeq ($(GCCVERSIONGTEQ9), 1)
CCOMMON_OPT += -march=armv8.2-a -mtune=neoverse-n1
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=neoverse-n1
endif
else
CCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a72
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a72
endif
endif
else
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
endif
endif
endif
# Use a53 tunings because a55 is only available in GCC>=8.1
ifeq ($(CORE), CORTEXA55)
ifeq ($(GCCVERSIONGTEQ7), 1)
ifeq ($(GCCVERSIONGTEQ8), 1)
CCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a55
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a55
endif
else
CCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a53
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a53
endif
endif
else
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
endif
endif
endif
ifeq ($(CORE), THUNDERX)
CCOMMON_OPT += -march=armv8-a -mtune=thunderx
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=thunderx
endif
endif
ifeq ($(CORE), FALKOR)
CCOMMON_OPT += -march=armv8-a -mtune=falkor
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=falkor
endif
endif
ifeq ($(CORE), THUNDERX2T99)
CCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
endif
endif
ifeq ($(CORE), THUNDERX3T110)
ifeq ($(GCCVERSIONGTEQ10), 1)
CCOMMON_OPT += -march=armv8.3-a -mtune=thunderx3t110
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.3-a -mtune=thunderx3t110
endif
else
CCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
endif
endif
endif
ifeq ($(CORE), VORTEX)
CCOMMON_OPT += -march=armv8.3-a
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.3-a
endif
endif
ifeq ($(GCCVERSIONGTEQ9), 1)
ifeq ($(CORE), TSV110)
CCOMMON_OPT += -march=armv8.2-a -mtune=tsv110
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=tsv110
endif
endif
endif
ifeq ($(GCCVERSIONGTEQ9), 1)
ifeq ($(CORE), EMAG8180)
CCOMMON_OPT += -march=armv8-a -mtune=emag
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=emag
endif
endif
endif
endif
endif

View File

@@ -9,7 +9,7 @@ OPENBLAS_INCLUDE_DIR := $(PREFIX)/include
OPENBLAS_LIBRARY_DIR := $(PREFIX)/lib
OPENBLAS_BINARY_DIR := $(PREFIX)/bin
OPENBLAS_BUILD_DIR := $(CURDIR)
OPENBLAS_CMAKE_DIR := $(OPENBLAS_LIBRARY_DIR)/cmake/openblas
OPENBLAS_CMAKE_DIR := $(OPENBLAS_LIBRARY_DIR)/cmake/$(LIBSONAMEBASE)
OPENBLAS_CMAKE_CONFIG := OpenBLASConfig.cmake
OPENBLAS_CMAKE_CONFIG_VERSION := OpenBLASConfigVersion.cmake
OPENBLAS_PKGCONFIG_DIR := $(OPENBLAS_LIBRARY_DIR)/pkgconfig
@@ -74,17 +74,17 @@ endif
ifneq ($(OSNAME), AIX)
ifndef NO_LAPACKE
@echo Copying LAPACKE header files to $(DESTDIR)$(OPENBLAS_INCLUDE_DIR)
@-install -pm644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapack.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapack.h"
@-install -pm644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke.h"
@-install -pm644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_config.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_config.h"
@-install -pm644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_mangling_with_flags.h.in "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_mangling.h"
@-install -pm644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_utils.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_utils.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapack.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapack.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_config.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_config.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_mangling_with_flags.h.in "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_mangling.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_utils.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_utils.h"
endif
#for install static library
ifneq ($(NO_STATIC),1)
@echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
@install -pm644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
@install -m644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
endif
@@ -92,7 +92,7 @@ endif
ifneq ($(NO_SHARED),1)
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku FreeBSD DragonFly))
@install -pm755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
@install -m755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
ln -fs $(LIBSONAME) $(LIBPREFIX).so ; \
ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
@@ -150,13 +150,13 @@ endif
endif
#Generating openblas.pc
@echo Generating openblas.pc in "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)"
@echo 'libdir='$(OPENBLAS_LIBRARY_DIR) > "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
@echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
@echo 'openblas_config= USE_64BITINT='$(USE_64BITINT) 'DYNAMIC_ARCH='$(DYNAMIC_ARCH) 'DYNAMIC_OLDER='$(DYNAMIC_OLDER) 'NO_CBLAS='$(NO_CBLAS) 'NO_LAPACK='$(NO_LAPACK) 'NO_LAPACKE='$(NO_LAPACKE) 'NO_AFFINITY='$(NO_AFFINITY) 'USE_OPENMP='$(USE_OPENMP) $(CORE) 'MAX_THREADS='$(NUM_THREADS)>> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
@echo 'version='$(VERSION) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
@echo 'extralib='$(PKG_EXTRALIB) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
@cat openblas.pc.in >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
@echo Generating $(LIBSONAMEBASE).pc in "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)"
@echo 'libdir='$(OPENBLAS_LIBRARY_DIR) > "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/$(LIBSONAMEBASE).pc"
@echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/$(LIBSONAMEBASE).pc"
@echo 'openblas_config= USE_64BITINT='$(USE_64BITINT) 'DYNAMIC_ARCH='$(DYNAMIC_ARCH) 'DYNAMIC_OLDER='$(DYNAMIC_OLDER) 'NO_CBLAS='$(NO_CBLAS) 'NO_LAPACK='$(NO_LAPACK) 'NO_LAPACKE='$(NO_LAPACKE) 'NO_AFFINITY='$(NO_AFFINITY) 'USE_OPENMP='$(USE_OPENMP) $(CORE) 'MAX_THREADS='$(NUM_THREADS)>> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/$(LIBSONAMEBASE).pc"
@echo 'version='$(VERSION) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/$(LIBSONAMEBASE).pc"
@echo 'extralib='$(PKG_EXTRALIB) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/$(LIBSONAMEBASE).pc"
@cat openblas.pc.in >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/$(LIBSONAMEBASE).pc"
#Generating OpenBLASConfig.cmake

3
Makefile.loongarch64 Normal file
View File

@@ -0,0 +1,3 @@
ifdef BINARY64
else
endif

View File

@@ -10,13 +10,20 @@ USE_OPENMP = 1
endif
ifeq ($(CORE), POWER10)
COMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
ifeq ($(F_COMPILER), IBM)
FCOMMON_OPT += -O2 -qrecur -qnosave
else
FCOMMON_OPT += -O2 -frecursive -mcpu=power10 -mtune=power10 -fno-fast-math
endif
endif
endif
ifeq ($(CORE), POWER9)
ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mvsx -fno-fast-math
ifeq ($(C_COMPILER), GCC)
ifneq ($(GCCVERSIONGT4), 1)
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
CCOMMON_OPT += -mcpu=power8 -mtune=power8
@@ -24,10 +31,18 @@ else
CCOMMON_OPT += -mcpu=power9 -mtune=power9
endif
else
CCOMMON_OPT += -mcpu=power9 -mtune=power9
endif
else
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
endif
ifneq ($(F_COMPILER), PGI)
ifeq ($(F_COMPILER), IBM)
FCOMMON_OPT += -O2 -qrecur -qnosave
else
FCOMMON_OPT += -O2 -frecursive -fno-fast-math
endif
ifeq ($(C_COMPILER), GCC)
ifneq ($(GCCVERSIONGT4), 1)
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
FCOMMON_OPT += -mcpu=power8 -mtune=power8
@@ -35,6 +50,9 @@ else
FCOMMON_OPT += -mcpu=power9 -mtune=power9
endif
else
FCOMMON_OPT += -mcpu=power9 -mtune=power9
endif
else
FCOMMON_OPT += -O2 -Mrecursive
endif
endif
@@ -47,7 +65,11 @@ CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
endif
ifneq ($(F_COMPILER), PGI)
ifeq ($(OSNAME), AIX)
ifeq ($(F_COMPILER), IBM)
FCOMMON_OPT += -O2 -qrecur -qnosave
else
FCOMMON_OPT += -O1 -frecursive -mcpu=power8 -mtune=power8 -fno-fast-math
endif
else
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -fno-fast-math
endif

View File

@@ -41,6 +41,10 @@ ifeq ($(TARGET), I6500)
TARGET_FLAGS = -mips64r6
endif
ifeq ($(TARGET), C910V)
TARGET_FLAGS = -march=rv64gcvxthead -mabi=lp64v
endif
all: getarch_2nd
./getarch_2nd 0 >> $(TARGET_MAKE)
./getarch_2nd 1 >> $(TARGET_CONF)

4
Makefile.riscv64 Normal file
View File

@@ -0,0 +1,4 @@
ifeq ($(CORE), C910V)
CCOMMON_OPT += -march=rv64gcvxthead -mabi=lp64v
FCOMMON_OPT += -march=rv64gcvxthead -mabi=lp64v -static
endif

View File

@@ -3,7 +3,7 @@
#
# This library's version
VERSION = 0.3.10.dev
VERSION = 0.3.18
# If you set the suffix, the library name will be libopenblas_$(LIBNAMESUFFIX).a
# and libopenblas_$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library
@@ -272,10 +272,36 @@ COMMON_PROF = -pg
# work at all.
#
# CPP_THREAD_SAFETY_TEST = 1
#
# use this to run only the less memory-hungry GEMV test
# CPP_THREAD_SAFETY_GEMV = 1
# If you want to enable the experimental BFLOAT16 support
# BUILD_HALF = 1
# BUILD_BFLOAT16 = 1
# Set the thread number threshold beyond which the job array for the threaded level3 BLAS
# will be allocated on the heap rather than the stack. (This array alone requires
# NUM_THREADS*NUM_THREADS*128 bytes of memory so should not pose a problem at low cpu
# counts, but obviously it is not the only item that ends up on the stack.
# The default value of 32 ensures that the overall requirement is compatible
# with the default 1MB stacksize imposed by having the Java VM loaded without use
# of its -Xss parameter.
# The value of 160 formerly used from about version 0.2.7 until 0.3.10 is easily compatible
# with the common Linux stacksize of 8MB but will cause crashes with unwary use of the java
# VM e.g. in Octave or with the java-based libhdfs in numpy or scipy code
# BLAS3_MEM_ALLOC_THRESHOLD = 160
# By default the library contains BLAS functions (and LAPACK if selected) for all input types.
# To build a smaller library supporting e.g. only single precision real (SGEMM etc.) or only
# the functions for complex numbers, uncomment the desired type(s) below
# BUILD_SINGLE = 1
# BUILD_DOUBLE = 1
# BUILD_COMPLEX = 1
# BUILD_COMPLEX16 = 1
#
# End of user configuration
#

View File

@@ -3,21 +3,29 @@ RANLIB = ranlib
ifdef BINARY64
ifeq ($(C_COMPILER), GCC)
CCOMMON_OPT += -mcpu=v9 -m64
else
CCOMMON_OPT += -m64
endif
ifeq ($(COMPILER_F77), g77)
FCOMMON_OPT += -mcpu=v9 -m64
endif
ifeq ($(COMPILER_F77), f90)
FCOMMON_OPT += -xarch=v9
ifeq ($(COMPILER_F77), f95)
FCOMMON_OPT += -m64
endif
else
ifeq ($(C_COMPILER), GCC)
CCOMMON_OPT += -mcpu=v9
else
CCOMMON_OPT += -xarch=v9
endif
ifeq ($(COMPILER_F77), g77)
FCOMMON_OPT += -mcpu=v9
endif
ifeq ($(COMPILER_F77), f90)
ifeq ($(COMPILER_F77), f95)
FCOMMON_OPT += -xarch=v8plusb
endif
@@ -37,4 +45,4 @@ LIBSUNPERF = -L/opt/SUNWspro/lib/v9 -L/opt/SUNWspro/prod/lib/v9 \
else
LIBSUNPERF = -L/opt/SUNWspro/lib -L/opt/SUNWspro/prod/lib \
-Wl,-R,/opt/SUNWspro/lib -lsunperf -lompstubs -lfui -lfsu -lsunmath
endif
endif

View File

@@ -6,10 +6,10 @@
INCLUDED = 1
ifndef TOPDIR
TOPDIR = .
TOPDIR = .
endif
# If ARCH is not set, we use the host system's architecture for getarch compile options.
# If ARCH is not set, we use the host system's architecture for getarch compile options.
ifndef ARCH
HOSTARCH := $(shell uname -m)
else
@@ -21,6 +21,8 @@ ifeq ($(ARCH), amd64)
override ARCH=x86_64
else ifeq ($(ARCH), powerpc64)
override ARCH=power
else ifeq ($(ARCH), powerpc64le)
override ARCH=power
else ifeq ($(ARCH), powerpc)
override ARCH=power
else ifeq ($(ARCH), i386)
@@ -31,6 +33,10 @@ else ifeq ($(ARCH), armv7)
override ARCH=arm
else ifeq ($(ARCH), aarch64)
override ARCH=arm64
else ifeq ($(ARCH), mipsel)
override ARCH=mips
else ifeq ($(ARCH), mips64el)
override ARCH=mips64
else ifeq ($(ARCH), zarch)
override ARCH=zarch
endif
@@ -73,6 +79,18 @@ endif
#
# Beginning of system configuration
#
ifneq ($(BUILD_SINGLE),1)
ifneq ($(BUILD_DOUBLE),1)
ifneq ($(BUILD_COMPLEX),1)
ifneq ($(BUILD_COMPLEX16),1)
override BUILD_SINGLE=1
override BUILD_DOUBLE=1
override BUILD_COMPLEX=1
override BUILD_COMPLEX16=1
endif
endif
endif
endif
ifndef HOSTCC
HOSTCC = $(CC)
@@ -81,6 +99,12 @@ endif
ifdef TARGET
GETARCH_FLAGS := -DFORCE_$(TARGET)
GETARCH_FLAGS += -DUSER_TARGET
ifeq ($(TARGET), GENERIC)
ifeq ($(DYNAMIC_ARCH), 1)
override NO_EXPRECISION=1
export NO_EXPRECiSION
endif
endif
endif
# Force fallbacks for 32bit
@@ -163,7 +187,7 @@ endif
# On x86_64 build getarch with march=native unless the compiler is PGI. This is required to detect AVX512 support in getarch.
ifeq ($(HOSTARCH), x86_64)
ifeq ($(findstring pgcc,$(HOSTCC)),)
ifeq ($(findstring pgcc,$(HOSTCC))$(findstring nvc,$(HOSTCC)),)
GETARCH_FLAGS += -march=native
endif
endif
@@ -225,6 +249,9 @@ ONLY_CBLAS = 0
endif
#For small matrix optimization
ifeq ($(ARCH), x86_64)
SMALL_MATRIX_OPT = 1
endif
ifeq ($(SMALL_MATRIX_OPT), 1)
CCOMMON_OPT += -DSMALL_MATRIX_OPT
endif
@@ -239,6 +266,22 @@ DUMMY := $(shell $(MAKE) -C $(TOPDIR) -f Makefile.prebuild CC="$(CC)" FC="$(FC)"
ifndef TARGET_CORE
include $(TOPDIR)/Makefile.conf
else
HAVE_NEON=
HAVE_VFP=
HAVE_VFPV3=
HAVE_VFPV4=
HAVE_MMX=
HAVE_SSE=
HAVE_SSE2=
HAVE_SSE3=
HAVE_SSSE3=
HAVE_SSE4_1=
HAVE_SSE4_2=
HAVE_SSE4A=
HAVE_SSE5=
HAVE_AVX=
HAVE_AVX2=
HAVE_FMA3=
include $(TOPDIR)/Makefile_kernel.conf
endif
@@ -300,9 +343,9 @@ endif
ifeq ($(C_COMPILER), GCC)
GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
GCCVERSIONGT4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 4)
GCCVERSIONEQ5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` = 5)
GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
GCCVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
GCCVERSIONGTEQ8 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 8)
GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
GCCVERSIONGTEQ10 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 10)
@@ -313,6 +356,7 @@ ifeq ($(GCCVERSIONGTEQ7),1)
else
GCCDUMPVERSION_PARAM := -dumpversion
endif
GCCMINORVERSIONGTEQ1 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d.` \>= 1)
GCCMINORVERSIONGTEQ2 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d.` \>= 2)
GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d.` \>= 7)
endif
@@ -349,6 +393,12 @@ ifeq ($(OSNAME), AIX)
EXTRALIB += -lm
endif
ifeq ($(OSNAME), FreeBSD)
ifeq ($(ARCH), $(filter $(ARCH),arm arm64))
EXTRALIB += -lm
endif
endif
ifeq ($(OSNAME), WINNT)
NEED_PIC = 0
NO_EXPRECISION = 1
@@ -588,51 +638,65 @@ DYNAMIC_CORE += CORTEXA57
DYNAMIC_CORE += CORTEXA72
DYNAMIC_CORE += CORTEXA73
DYNAMIC_CORE += NEOVERSEN1
DYNAMIC_CORE += CORTEXA55
DYNAMIC_CORE += FALKOR
DYNAMIC_CORE += THUNDERX
DYNAMIC_CORE += THUNDERX2T99
DYNAMIC_CORE += TSV110
DYNAMIC_CORE += EMAG8180
DYNAMIC_CORE += THUNDERX3T110
ifdef DYNAMIC_LIST
override DYNAMIC_CORE = ARMV8 $(DYNAMIC_LIST)
XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_ARMV8
XCCOMMON_OPT += $(foreach dcore,$(DYNAMIC_LIST),-DDYN_$(dcore))
endif
endif
ifeq ($(ARCH), mips64)
DYNAMIC_CORE = LOONGSON3R3 LOONGSON3R4
endif
ifeq ($(ARCH), zarch)
DYNAMIC_CORE = ZARCH_GENERIC
# Z13 is supported since gcc-5.2, gcc-6, and in RHEL 7.3 and newer
ifeq ($(GCCVERSIONGT5), 1)
ZARCH_SUPPORT_Z13 := 1
else ifeq ($(GCCVERSIONEQ5), 1)
ifeq ($(GCCMINORVERSIONGTEQ2), 1)
ZARCH_SUPPORT_Z13 := 1
endif
endif
# if the compiler accepts -march=arch11 or -march=z13 and can compile a file
# with z13-specific inline assembly, then we can include support for Z13.
# note: -march=z13 is equivalent to -march=arch11 yet some compiler releases
# only support one or the other.
# note: LLVM version 6.x supported -march=z13 yet could not handle vector
# registers in inline assembly, so the check for supporting the -march flag is
# not enough.
ZARCH_TEST_COMPILE=-c $(TOPDIR)/kernel/zarch/damin_z13.c -I$(TOPDIR) -o /dev/null > /dev/null 2> /dev/null
ZARCH_CC_SUPPORTS_ARCH11=$(shell $(CC) -march=arch11 $(ZARCH_TEST_COMPILE) && echo 1)
ZARCH_CC_SUPPORTS_Z13=$(shell $(CC) -march=z13 $(ZARCH_TEST_COMPILE) && echo 1)
ifeq ($(wildcard /etc/redhat-release), /etc/redhat-release)
ifeq ($(shell source /etc/os-release ; expr $$VERSION_ID \>= "7.3"), 1)
ZARCH_SUPPORT_Z13 := 1
endif
endif
ifeq ($(ZARCH_SUPPORT_Z13), 1)
ifeq ($(or $(ZARCH_CC_SUPPORTS_ARCH11), $(ZARCH_CC_SUPPORTS_Z13)), 1)
DYNAMIC_CORE += Z13
CCOMMON_OPT += -DDYN_Z13
else
$(info OpenBLAS: Not building Z13 kernels because gcc is older than 5.2 or 6.x)
$(info OpenBLAS: Not building Z13 kernels because the compiler $(CC) does not support it)
endif
ifeq ($(GCCVERSIONGTEQ7), 1)
# as above for z13, check for -march=arch12 and z14 support in the compiler.
ZARCH_CC_SUPPORTS_ARCH12=$(shell $(CC) -march=arch12 $(ZARCH_TEST_COMPILE) && echo 1)
ZARCH_CC_SUPPORTS_Z14=$(shell $(CC) -march=z14 $(ZARCH_TEST_COMPILE) && echo 1)
ifeq ($(or $(ZARCH_CC_SUPPORTS_ARCH12), $(ZARCH_CC_SUPPORTS_Z14)), 1)
DYNAMIC_CORE += Z14
CCOMMON_OPT += -DDYN_Z14
else
$(info OpenBLAS: Not building Z14 kernels because gcc is older than 7.x)
endif
$(info OpenBLAS: Not building Z14 kernels because the compiler $(CC) does not support it)
endif
endif # ARCH zarch
ifeq ($(ARCH), power)
ifneq ($(C_COMPILER), PGI)
DYNAMIC_CORE = POWER6
DYNAMIC_CORE += POWER8
ifneq ($(C_COMPILER), GCC)
DYNAMIC_CORE += POWER9
DYNAMIC_CORE += POWER10
CCOMMON_OPT += -DHAVE_P10_SUPPORT
endif
ifeq ($(C_COMPILER), GCC)
ifeq ($(GCCVERSIONGT5), 1)
@@ -640,16 +704,23 @@ DYNAMIC_CORE += POWER9
else
$(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.)
endif
ifeq ($(GCCVERSIONGTEQ11), 1)
LDVERSIONGTEQ35 := $(shell expr `$(CC) -Wl,--version 2> /dev/null | head -1 | cut -f2 -d "." | cut -f1 -d "-"` \>= 35)
ifeq ($(GCCVERSIONGTEQ11)$(LDVERSIONGTEQ35), 11)
DYNAMIC_CORE += POWER10
CCOMMON_OPT += -DHAVE_P10_SUPPORT
else ifeq ($(GCCVERSIONGTEQ10), 1)
ifeq ($(GCCMINORVERSIONGTEQ2), 1)
ifeq ($(GCCMINORVERSIONGTEQ2)$(LDVERSIONGTEQ35), 11)
DYNAMIC_CORE += POWER10
CCOMMON_OPT += -DHAVE_P10_SUPPORT
endif
else
$(info, OpenBLAS: Your gcc version is too old to build the POWER10 kernels.)
endif
endif
else
DYNAMIC_CORE = POWER8
DYNAMIC_CORE += POWER9
endif
endif
# If DYNAMIC_CORE is not set, DYNAMIC_ARCH cannot do anything, so force it to empty
@@ -716,7 +787,15 @@ endif
endif
endif
ifeq ($(ARCH), riscv64)
NO_BINARY_MODE = 1
BINARY_DEFINED = 1
endif
ifeq ($(ARCH), loongarch64)
NO_BINARY_MODE = 1
BINARY_DEFINED = 1
endif
#
@@ -749,14 +828,9 @@ CCOMMON_OPT += -mabi=32
BINARY_DEFINED = 1
endif
ifeq ($(CORE), LOONGSON3A)
CCOMMON_OPT += -march=mips64
FCOMMON_OPT += -march=mips64
endif
ifeq ($(CORE), LOONGSON3B)
CCOMMON_OPT += -march=mips64
FCOMMON_OPT += -march=mips64
ifeq ($(CORE), $(filter $(CORE),LOONGSON3R3 LOONGSON3R4))
CCOMMON_OPT += -march=loongson3a
FCOMMON_OPT += -march=loongson3a
endif
ifeq ($(CORE), MIPS24K)
@@ -793,12 +867,21 @@ ifeq ($(OSNAME), AIX)
BINARY_DEFINED = 1
endif
ifeq ($(ARCH), loongarch64)
ifeq ($(CORE), LOONGSON3R5)
CCOMMON_OPT += -march=loongarch64 -mabi=lp64
FCOMMON_OPT += -march=loongarch64 -mabi=lp64
endif
endif
endif
ifndef BINARY_DEFINED
ifneq ($(OSNAME), AIX)
ifdef BINARY64
ifneq ($(ARCH), riscv64)
CCOMMON_OPT += -m64
endif
else
CCOMMON_OPT += -m32
endif
@@ -808,9 +891,19 @@ endif
endif
ifeq ($(C_COMPILER), PGI)
PGCVERSIONGT20 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \> 20)
PGCVERSIONGTEQ20 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \>= 20)
PGCMINORVERSIONGE11 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -c 4-5` == 11)
PGCVERSIONCHECK := $(PGCVERSIONGT20)$(PGCVERSIONEQ20)$(PGCMINORVERSIONGE11)
ifeq ($(PGCVERSIONCHECK), $(filter $(PGCVERSIONCHECK), 110 111 011))
NEWPGI := 1
endif
ifdef BINARY64
ifeq ($(ARCH), x86_64)
CCOMMON_OPT += -tp p7-64 -D__MMX__ -Mnollvm
CCOMMON_OPT += -tp p7-64
ifneq ($(NEWPGI),1)
CCOMMON_OPT += -D__MMX__ -Mnollvm
endif
else
ifeq ($(ARCH), power)
ifeq ($(CORE), POWER8)
@@ -838,13 +931,25 @@ endif
# Fortran Compiler dependent settings
#
ifeq ($(F_COMPILER), NAG)
FCOMMON_OPT += -dcfuns -recursive -ieee=full -w=obs -thread_safe
ifdef INTERFACE64
ifneq ($(INTERFACE64), 0)
FCOMMON_OPT += -i8
endif
endif
ifeq ($(USE_OPENMP), 1)
FCOMMON_OPT += -openmp
endif
endif
ifeq ($(F_COMPILER), FLANG)
CCOMMON_OPT += -DF_INTERFACE_FLANG
FCOMMON_OPT += -Mrecursive -Kieee
ifeq ($(OSNAME), Linux)
ifeq ($(ARCH), x86_64)
FLANG_VENDOR := $(shell expr `$(FC) --version|cut -f 1 -d "."|head -1`)
ifeq ($(FLANG_VENDOR),AOCC)
FLANG_VENDOR := $(shell $(FC) --version|head -1 |cut -f 1 -d " ")
ifeq ($(FLANG_VENDOR), AMD)
FCOMMON_OPT += -fno-unroll-loops
endif
endif
@@ -919,8 +1024,10 @@ endif
else
ifdef BINARY64
ifneq ($(OSNAME), AIX)
ifneq ($(ARCH), riscv64)
FCOMMON_OPT += -m64
endif
endif
ifdef INTERFACE64
ifneq ($(INTERFACE64), 0)
FCOMMON_OPT += -fdefault-integer-8
@@ -988,18 +1095,24 @@ ifeq ($(ARCH), x86_64)
FCOMMON_OPT += -tp p7-64
else
ifeq ($(ARCH), power)
ifeq ($(CORE), POWER6)
$(warning NVIDIA HPC compilers do not support POWER6.)
endif
ifeq ($(CORE), POWER8)
FCOMMON_OPT += -tp pwr8
endif
ifeq ($(CORE), POWER9)
FCOMMON_OPT += -tp pwr9
endif
ifeq ($(CORE), POWER10)
$(warning NVIDIA HPC compilers do not support POWER10.)
endif
endif
endif
else
FCOMMON_OPT += -tp p7
endif
FCOMMON_OPT += -Mrecursive
FCOMMON_OPT += -Mrecursive -Kieee
ifeq ($(USE_OPENMP), 1)
FCOMMON_OPT += -mp
endif
@@ -1036,11 +1149,11 @@ FCOMMON_OPT += -n32
else
FCOMMON_OPT += -n64
endif
ifeq ($(CORE), LOONGSON3A)
ifeq ($(CORE), LOONGSON3R3)
FCOMMON_OPT += -loongson3 -static
endif
ifeq ($(CORE), LOONGSON3B)
ifeq ($(CORE), LOONGSON3R4)
FCOMMON_OPT += -loongson3 -static
endif
@@ -1066,11 +1179,11 @@ CCOMMON_OPT += -n32
else
CCOMMON_OPT += -n64
endif
ifeq ($(CORE), LOONGSON3A)
ifeq ($(CORE), LOONGSON3R3)
CCOMMON_OPT += -loongson3 -static
endif
ifeq ($(CORE), LOONGSON3B)
ifeq ($(CORE), LOONGSON3R4)
CCOMMON_OPT += -loongson3 -static
endif
@@ -1089,16 +1202,25 @@ CCOMMON_OPT += -w
ifeq ($(ARCH), x86)
CCOMMON_OPT += -m32
else
FCOMMON_OPT += -m64
ifdef BINARY64
CCOMMON_OPT += -m64
else
CCOMMON_OPT += -m32
endif
endif
endif
ifeq ($(F_COMPILER), SUN)
CCOMMON_OPT += -DF_INTERFACE_SUN
FCOMMON_OPT += -ftrap=%none -xrecursive
ifeq ($(ARCH), x86)
FCOMMON_OPT += -m32
else
ifdef BINARY64
FCOMMON_OPT += -m64
else
FCOMMON_OPT += -m32
endif
endif
ifeq ($(USE_OPENMP), 1)
FCOMMON_OPT += -xopenmp=parallel
@@ -1129,6 +1251,8 @@ CCOMMON_OPT += -fPIC
endif
ifeq ($(F_COMPILER), SUN)
FCOMMON_OPT += -pic
else ifeq ($(F_COMPILER), NAG)
FCOMMON_OPT += -PIC
else
FCOMMON_OPT += -fPIC
endif
@@ -1172,10 +1296,8 @@ ifdef SMP
CCOMMON_OPT += -DSMP_SERVER
ifeq ($(ARCH), mips64)
ifneq ($(CORE), LOONGSON3B)
USE_SIMPLE_THREADED_LEVEL3 = 1
endif
endif
ifeq ($(USE_OPENMP), 1)
# USE_SIMPLE_THREADED_LEVEL3 = 1
@@ -1208,6 +1330,10 @@ CCOMMON_OPT += -DUSE_PAPI
EXTRALIB += -lpapi -lperfctr
endif
ifdef BUFFERSIZE
CCOMMON_OPT += -DBUFFERSIZE=$(BUFFERSIZE)
endif
ifdef DYNAMIC_THREADS
CCOMMON_OPT += -DDYNAMIC_THREADS
endif
@@ -1224,8 +1350,20 @@ ifeq ($(USE_TLS), 1)
CCOMMON_OPT += -DUSE_TLS
endif
ifeq ($(BUILD_HALF), 1)
CCOMMON_OPT += -DBUILD_HALF
ifeq ($(BUILD_BFLOAT16), 1)
CCOMMON_OPT += -DBUILD_BFLOAT16
endif
ifeq ($(BUILD_SINGLE), 1)
CCOMMON_OPT += -DBUILD_SINGLE=1
endif
ifeq ($(BUILD_DOUBLE), 1)
CCOMMON_OPT += -DBUILD_DOUBLE=1
endif
ifeq ($(BUILD_COMPLEX), 1)
CCOMMON_OPT += -DBUILD_COMPLEX=1
endif
ifeq ($(BUILD_COMPLEX16), 1)
CCOMMON_OPT += -DBUILD_COMPLEX16=1
endif
CCOMMON_OPT += -DVERSION=\"$(VERSION)\"
@@ -1238,10 +1376,14 @@ ifndef SYMBOLSUFFIX
SYMBOLSUFFIX =
endif
ifndef LIBSONAMEBASE
LIBSONAMEBASE = openblas
endif
ifndef LIBNAMESUFFIX
LIBNAMEBASE = $(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)
LIBNAMEBASE = $(SYMBOLPREFIX)$(LIBSONAMEBASE)$(SYMBOLSUFFIX)
else
LIBNAMEBASE = $(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
LIBNAMEBASE = $(SYMBOLPREFIX)$(LIBSONAMEBASE)$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
endif
ifeq ($(OSNAME), CYGWIN_NT)
@@ -1255,8 +1397,10 @@ KERNELDIR = $(TOPDIR)/kernel/$(ARCH)
include $(TOPDIR)/Makefile.$(ARCH)
ifneq ($(C_COMPILER), PGI)
ifneq ($(C_COMPILER), SUN)
CCOMMON_OPT += -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME
endif
endif
CCOMMON_OPT += -DASMNAME=$(FU)$(*F) -DASMFNAME=$(FU)$(*F)$(BU) -DNAME=$(*F)$(BU) -DCNAME=$(*F) -DCHAR_NAME=\"$(*F)$(BU)\" -DCHAR_CNAME=\"$(*F)\"
ifeq ($(CORE), PPC440)
@@ -1273,11 +1417,9 @@ endif
ifneq ($(ARCH), x86_64)
ifneq ($(ARCH), x86)
ifneq ($(CORE), LOONGSON3B)
NO_AFFINITY = 1
endif
endif
endif
ifdef NO_AFFINITY
ifeq ($(NO_AFFINITY), 0)
@@ -1369,6 +1511,10 @@ LAPACK_FFLAGS := $(FFLAGS)
LAPACK_FPFLAGS := $(FPFLAGS)
endif
ifeq ($(F_COMPILER),NAG)
LAPACK_FFLAGS := $(filter-out -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 ,$(FFLAGS))
endif
LAPACK_CFLAGS = $(CFLAGS)
LAPACK_CFLAGS += -DHAVE_LAPACK_CONFIG_H
ifdef INTERFACE64
@@ -1491,6 +1637,8 @@ export HAVE_SSE4_2
export HAVE_SSE4A
export HAVE_SSE5
export HAVE_AVX
export HAVE_AVX2
export HAVE_FMA3
export HAVE_VFP
export HAVE_VFPV3
export HAVE_VFPV4
@@ -1501,10 +1649,11 @@ export KERNELDIR
export FUNCTION_PROFILE
export TARGET_CORE
export NO_AVX512
export BUILD_HALF
export NO_AVX2
export BUILD_BFLOAT16
export SHGEMM_UNROLL_M
export SHGEMM_UNROLL_N
export SBGEMM_UNROLL_M
export SBGEMM_UNROLL_N
export SGEMM_UNROLL_M
export SGEMM_UNROLL_N
export DGEMM_UNROLL_M

View File

@@ -1,17 +1,18 @@
SHBLASOBJS_P = $(SHBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
SBBLASOBJS_P = $(SBBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
SBLASOBJS_P = $(SBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
DBLASOBJS_P = $(DBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
QBLASOBJS_P = $(QBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
CBLASOBJS_P = $(CBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
ZBLASOBJS_P = $(ZBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
XBLASOBJS_P = $(XBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
SBEXTOBJS_P = $(SBEXTOBJS:.$(SUFFIX)=.$(PSUFFIX))
COMMONOBJS_P = $(COMMONOBJS:.$(SUFFIX)=.$(PSUFFIX))
HPLOBJS_P = $(HPLOBJS:.$(SUFFIX)=.$(PSUFFIX))
BLASOBJS = $(SHBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS)
BLASOBJS_P = $(SHBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P)
BLASOBJS = $(SBEXTOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(CBAUXOBJS)
BLASOBJS_P = $(SBEXTOBJS_P) $(SBBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) $(CBAUXOBJS_P)
ifdef EXPRECISION
BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
@@ -23,21 +24,23 @@ BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
BLASOBJS_P += $(QBLASOBJS_P) $(XBLASOBJS_P)
endif
$(SHBLASOBJS) $(SHBLASOBJS_P) : override CFLAGS += -DHALF -UDOUBLE -UCOMPLEX
$(SBBLASOBJS) $(SBBLASOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
$(SBLASOBJS) $(SBLASOBJS_P) : override CFLAGS += -UDOUBLE -UCOMPLEX
$(DBLASOBJS) $(DBLASOBJS_P) : override CFLAGS += -DDOUBLE -UCOMPLEX
$(QBLASOBJS) $(QBLASOBJS_P) : override CFLAGS += -DXDOUBLE -UCOMPLEX
$(CBLASOBJS) $(CBLASOBJS_P) : override CFLAGS += -UDOUBLE -DCOMPLEX
$(ZBLASOBJS) $(ZBLASOBJS_P) : override CFLAGS += -DDOUBLE -DCOMPLEX
$(XBLASOBJS) $(XBLASOBJS_P) : override CFLAGS += -DXDOUBLE -DCOMPLEX
$(SBEXTOBJS) $(SBEXTOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
$(SHBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(SBBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(SBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(DBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(QBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(CBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(ZBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(XBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(SBEXTOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
libs :: $(BLASOBJS) $(COMMONOBJS)
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^

View File

@@ -1,5 +1,21 @@
# COMPILER_PREFIX = mingw32-
ifneq ($(DYNAMIC_ARCH),1)
ADD_CPUFLAGS = 1
else
ifdef TARGET_CORE
ADD_CPUFLAGS = 1
endif
endif
ifdef ADD_CPUFLAGS
ifdef HAVE_SSE
CCOMMON_OPT += -msse
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -msse
endif
endif
endif
ifeq ($(OSNAME), Interix)
ARFLAGS = -m x86
@@ -54,3 +70,20 @@ LIBATLAS = -L$(ATLASPATH)/32 -lcblas -lf77blas -latlas -lm
else
LIBATLAS = -L$(ATLASPATH)/32 -lptf77blas -lptatlas -lpthread -lm
endif
ifdef HAVE_SSE2
CCOMMON_OPT += -msse2
FCOMMON_OPT += -msse2
endif
ifdef HAVE_SSE3
CCOMMON_OPT += -msse3
FCOMMON_OPT += -msse3
ifdef HAVE_SSSE3
CCOMMON_OPT += -mssse3
FCOMMON_OPT += -mssse3
endif
ifdef HAVE_SSE4_1
CCOMMON_OPT += -msse4.1
FCOMMON_OPT += -msse4.1
endif
endif

View File

@@ -8,11 +8,57 @@ endif
endif
endif
ifneq ($(DYNAMIC_ARCH),1)
ADD_CPUFLAGS = 1
else
ifdef TARGET_CORE
ADD_CPUFLAGS = 1
endif
endif
ifdef ADD_CPUFLAGS
ifdef HAVE_SSE3
CCOMMON_OPT += -msse3
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -msse3
endif
endif
ifdef HAVE_SSSE3
CCOMMON_OPT += -mssse3
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -mssse3
endif
endif
ifdef HAVE_SSE4_1
CCOMMON_OPT += -msse4.1
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -msse4.1
endif
endif
ifndef OLDGCC
ifdef HAVE_AVX
CCOMMON_OPT += -mavx
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -mavx
endif
endif
endif
ifndef NO_AVX2
ifdef HAVE_AVX2
CCOMMON_OPT += -mavx2
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -mavx2
endif
endif
endif
ifeq ($(CORE), SKYLAKEX)
ifndef DYNAMIC_ARCH
ifndef NO_AVX512
CCOMMON_OPT += -march=skylake-avx512
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=skylake-avx512
endif
ifeq ($(OSNAME), CYGWIN_NT)
CCOMMON_OPT += -fno-asynchronous-unwind-tables
FCOMMON_OPT += -fno-asynchronous-unwind-tables
@@ -25,20 +71,18 @@ endif
endif
endif
endif
endif
ifeq ($(CORE), COOPERLAKE)
ifndef DYNAMIC_ARCH
ifndef NO_AVX512
ifeq ($(C_COMPILER), GCC)
# cooperlake support was added in 10.1
GCCVERSIONGTEQ10 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 10)
GCCMINORVERSIONGTEQ1 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 1)
ifeq ($(GCCVERSIONGTEQ10)$(GCCMINORVERSIONGTEQ1), 11)
CCOMMON_OPT += -march=cooperlake
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=cooperlake
endif
endif
endif
ifeq ($(OSNAME), CYGWIN_NT)
CCOMMON_OPT += -fno-asynchronous-unwind-tables
FCOMMON_OPT += -fno-asynchronous-unwind-tables
@@ -51,31 +95,38 @@ endif
endif
endif
endif
endif
ifeq ($(CORE), HASWELL)
ifndef DYNAMIC_ARCH
ifdef HAVE_AVX2
ifndef NO_AVX2
ifeq ($(C_COMPILER), GCC)
# AVX2 support was added in 4.7.0
GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 7)
ifeq ($(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7), 11)
GCCVERSIONCHECK := $(GCCVERSIONGT4)$(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7)
ifeq ($(GCCVERSIONCHECK), $(filter $(GCCVERSIONCHECK), 011 110 111))
CCOMMON_OPT += -mavx2
endif
else
ifeq ($(C_COMPILER), CLANG)
CCOMMON_OPT += -mavx2
endif
endif
ifeq ($(F_COMPILER), GFORTRAN)
# AVX2 support was added in 4.7.0
GCCVERSIONGTEQ4 := $(shell expr `$(FC) -dumpversion | cut -f1 -d.` \>= 4)
GCCVERSIONGTEQ5 := $(shell expr `$(FC) -dumpversion | cut -f1 -d.` \>= 5)
GCCMINORVERSIONGTEQ7 := $(shell expr `$(FC) -dumpversion | cut -f2 -d.` \>= 7)
ifeq ($(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7), 11)
GCCVERSIONCHECK := $(GCCVERSIONGTEQ5)$(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7)
ifeq ($(GCCVERSIONCHECK), $(filter $(GCCVERSIONCHECK), 011 110 111))
FCOMMON_OPT += -mavx2
endif
else
ifeq ($(F_COMPILER), FLANG)
FCOMMON_OPT += -mavx2
endif
endif
endif
endif
endif
endif
ifeq ($(OSNAME), Interix)

View File

@@ -8,3 +8,9 @@ ifeq ($(CORE), Z14)
CCOMMON_OPT += -march=z14 -mzvector -O3
FCOMMON_OPT += -march=z14 -mzvector
endif
# Enable floating-point expression contraction for clang, since it is the
# default for gcc
ifeq ($(C_COMPILER), CLANG)
CCOMMON_OPT += -ffp-contract=on
endif

View File

@@ -2,7 +2,7 @@
[![Join the chat at https://gitter.im/xianyi/OpenBLAS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/xianyi/OpenBLAS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Travis CI: [![Build Status](https://travis-ci.org/xianyi/OpenBLAS.svg?branch=develop)](https://travis-ci.org/xianyi/OpenBLAS)
Travis CI: [![Build Status](https://travis-ci.com/xianyi/OpenBLAS.svg?branch=develop)](https://travis-ci.com/xianyi/OpenBLAS)
AppVeyor: [![Build status](https://ci.appveyor.com/api/projects/status/09sohd35n8nkkx64/branch/develop?svg=true)](https://ci.appveyor.com/project/xianyi/openblas/branch/develop)
@@ -13,17 +13,21 @@ Drone CI: [![Build Status](https://cloud.drone.io/api/badges/xianyi/OpenBLAS/sta
## Introduction
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
OpenBLAS is an optimized BLAS (Basic Linear Algebra Subprograms) library based on GotoBLAS2 1.13 BSD version.
Please read the documentation on the OpenBLAS wiki pages: <https://github.com/xianyi/OpenBLAS/wiki>.
For a general introduction to the BLAS routines, please refer to the extensive documentation of their reference implementation hosted at netlib:
<https://www.netlib.org/blas>. On that site you will likewise find documentation for the reference implementation of the higher-level library LAPACK - the **L**inear **A**lgebra **Pack**age that comes included with OpenBLAS. If you are looking for a general primer or refresher on Linear Algebra, the set of six
20-minute lecture videos by Prof. Gilbert Strang on either MIT OpenCourseWare <https://ocw.mit.edu/resources/res-18-010-a-2020-vision-of-linear-algebra-spring-2020/> or Youtube <https://www.youtube.com/playlist?list=PLUl4u3cNGP61iQEFiWLE21EJCxwmWvvek> may be helpful.
## Binary Packages
We provide official binary packages for the following platform:
* Windows x86/x86_64
You can download them from [file hosting on sourceforge.net](https://sourceforge.net/projects/openblas/files/).
You can download them from [file hosting on sourceforge.net](https://sourceforge.net/projects/openblas/files/) or from the Releases section of the github project page, [https://github.com/xianyi/OpenBLAS/releases](https://github.com/xianyi/OpenBLAS/releases).
## Installation from Source
@@ -46,7 +50,10 @@ Building OpenBLAS requires the following to be installed:
Simply invoking `make` (or `gmake` on BSD) will detect the CPU automatically.
To set a specific target CPU, use `make TARGET=xxx`, e.g. `make TARGET=NEHALEM`.
The full target list is in the file `TargetList.txt`.
The full target list is in the file `TargetList.txt`. For building with `cmake`, the
usual conventions apply, i.e. create a build directory either underneath the toplevel
OpenBLAS source directory or separate from it, and invoke `cmake` there with the path
to the source tree and any build options you plan to set.
### Cross compile
@@ -121,6 +128,7 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
- **Intel Sandy Bridge**: Optimized Level-3 and Level-2 BLAS with AVX on x86-64.
- **Intel Haswell**: Optimized Level-3 and Level-2 BLAS with AVX2 and FMA on x86-64.
- **Intel Skylake-X**: Optimized Level-3 and Level-2 BLAS with AVX512 and FMA on x86-64.
- **Intel Cooper Lake**: as Skylake-X with improved BFLOAT16 support.
- **AMD Bobcat**: Used GotoBLAS2 Barcelona codes.
- **AMD Bulldozer**: x86-64 ?GEMM FMA4 kernels. (Thanks to Werner Saar)
- **AMD PILEDRIVER**: Uses Bulldozer codes with some optimizations.
@@ -146,39 +154,52 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
- **ARMv8**: Basic ARMV8 with small caches, optimized Level-3 and Level-2 BLAS
- **Cortex-A53**: same as ARMV8 (different cpu specifications)
- **Cortex-A55**: same as ARMV8 (different cpu specifications)
- **Cortex A57**: Optimized Level-3 and Level-2 functions
- **Cortex A72**: same as A57 ( different cpu specifications)
- **Cortex A73**: same as A57 (different cpu specifications)
- **Falkor**: same as A57 (different cpu specifications)
- **ThunderX**: Optimized some Level-1 functions
- **ThunderX2T99**: Optimized Level-3 BLAS and parts of Levels 1 and 2
- **ThunderX3T110**
- **TSV110**: Optimized some Level-3 helper functions
- **EMAG 8180**: preliminary support based on A57
- **Neoverse N1**: (AWS Graviton2) preliminary support
- **Apple Vortex**: preliminary support based on ARMV8
#### PPC/PPC64
- **POWER8**: Optimized BLAS, only for PPC64LE (Little Endian), only with `USE_OPENMP=1`
- **POWER9**: Optimized Level-3 BLAS (real) and some Level-1,2. PPC64LE with OpenMP only.
- **POWER10**:
#### IBM zEnterprise System
- **Z13**: Optimized Level-3 BLAS and Level-1,2
- **Z14**: Optimized Level-3 BLAS and (single precision) Level-1,2
#### RISC-V
- **C910V**: Optimized Level-3 BLAS (real) and Level-1,2 by RISC-V Vector extension 0.7.1.
```sh
make HOSTCC=gcc TARGET=C910V CC=riscv64-unknown-linux-gnu-gcc FC=riscv64-unknown-linux-gnu-gfortran
```
(also known to work on C906)
### Support for multiple targets in a single library
OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying DYNAMIC_ARCH=1 in Makefile.rule, on the gmake command line or as -DDYNAMIC_ARCH=TRUE in cmake.
OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying `DYNAMIC_ARCH=1` in Makefile.rule, on the gmake command line or as `-DDYNAMIC_ARCH=TRUE` in cmake.
For **x86_64**, the list of targets this activates contains Prescott, Core2, Nehalem, Barcelona, Sandybridge, Bulldozer, Piledriver, Steamroller, Excavator, Haswell, Zen, SkylakeX. For cpu generations not included in this list, the corresponding older model is used. If you also specify DYNAMIC_OLDER=1, specific support for Penryn, Dunnington, Opteron, Opteron/SSE3, Bobcat, Atom and Nano is added. Finally there is an option DYNAMIC_LIST that allows to specify an individual list of targets to include instead of the default.
For **x86_64**, the list of targets this activates contains Prescott, Core2, Nehalem, Barcelona, Sandybridge, Bulldozer, Piledriver, Steamroller, Excavator, Haswell, Zen, SkylakeX. For cpu generations not included in this list, the corresponding older model is used. If you also specify `DYNAMIC_OLDER=1`, specific support for Penryn, Dunnington, Opteron, Opteron/SSE3, Bobcat, Atom and Nano is added. Finally there is an option `DYNAMIC_LIST` that allows to specify an individual list of targets to include instead of the default.
DYNAMIC_ARCH is also supported on **x86**, where it translates to Katmai, Coppermine, Northwood, Prescott, Banias,
`DYNAMIC_ARCH` is also supported on **x86**, where it translates to Katmai, Coppermine, Northwood, Prescott, Banias,
Core2, Penryn, Dunnington, Nehalem, Athlon, Opteron, Opteron_SSE3, Barcelona, Bobcat, Atom and Nano.
On **ARMV8**, it enables support for CortexA53, CortexA57, CortexA72, CortexA73, Falkor, ThunderX, ThunderX2T99, TSV110 as well as generic ARMV8 cpus.
For **POWER**, the list encompasses POWER6, POWER8 and POWER9, on **ZARCH** it comprises Z13 and Z14.
The TARGET option can be used in conjunction with DYNAMIC_ARCH=1 to specify which cpu model should be assumed for all the
The `TARGET` option can be used in conjunction with `DYNAMIC_ARCH=1` to specify which cpu model should be assumed for all the
common code in the library, usually you will want to set this to the oldest model you expect to encounter.
Please note that it is not possible to combine support for different architectures, so no combined 32 and 64 bit or x86_64 and arm64 in the same library.
@@ -194,7 +215,8 @@ Please note that it is not possible to combine support for different architectur
- **Android**: Supported by the community. Please read <https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android>.
- **AIX**: Supported on PPC up to POWER8
- **Haiku**: Supported by the community. We don't actively test the library on this OS.
- **SunOS**: Supported by the community. We don't actively test the library on this OS:
- **SunOS**: Supported by the community. We don't actively test the library on this OS.
- **Cortex-M**: Supported by the community. Please read <https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-on-Cortex-M>.
## Usage
@@ -226,7 +248,8 @@ We provide the following functions to control the number of threads at runtime:
void goto_set_num_threads(int num_threads);
void openblas_set_num_threads(int num_threads);
```
Note that these are only used once at library initialization, and are not available for
fine-tuning thread numbers in individual BLAS calls.
If you compile this library with `USE_OPENMP=1`, you should use the above functions too.
## Reporting bugs

View File

@@ -92,14 +92,23 @@ CORTEXA57
CORTEXA72
CORTEXA73
NEOVERSEN1
CORTEXA55
EMAG8180
FALKOR
THUNDERX
THUNDERX2T99
TSV110
THUNDERX3T110
VORTEX
9.System Z:
ZARCH_GENERIC
Z13
Z14
10.RISC-V 64:
RISCV64_GENERIC
C910V
11.LOONGARCH64:
LOONGSON3R5

View File

@@ -30,10 +30,10 @@ environment:
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64
matrix:
- COMPILER: clang-cl
WITH_FORTRAN: yes
WITH_FORTRAN: ON
- COMPILER: clang-cl
DYNAMIC_ARCH: ON
WITH_FORTRAN: no
WITH_FORTRAN: OFF
- COMPILER: cl
- COMPILER: MinGW64-gcc-7.2.0-mingw
DYNAMIC_ARCH: OFF
@@ -47,12 +47,8 @@ environment:
install:
- if [%COMPILER%]==[clang-cl] call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- if [%COMPILER%]==[clang-cl] conda config --add channels conda-forge --force
- if [%COMPILER%]==[clang-cl] conda install --yes --quiet clangdev cmake
- if [%WITH_FORTRAN%]==[no] conda install --yes --quiet ninja
- if [%WITH_FORTRAN%]==[yes] conda install --yes --quiet -c isuruf kitware-ninja
- if [%WITH_FORTRAN%]==[yes] conda install --yes --quiet flang
- if [%COMPILER%]==[clang-cl] conda config --set auto_update_conda false
- if [%COMPILER%]==[clang-cl] conda install --yes --quiet clangdev cmake ninja flang=11.0.1
- if [%COMPILER%]==[clang-cl] call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
- if [%COMPILER%]==[clang-cl] set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%"
- if [%COMPILER%]==[clang-cl] set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%"
@@ -68,15 +64,14 @@ before_build:
- if [%COMPILER%]==[MinGW64-gcc-7.2.0-mingw] cmake -G "MinGW Makefiles" -DNOFORTRAN=1 ..
- if [%COMPILER%]==[MinGW-gcc-6.3.0-32] cmake -G "MSYS Makefiles" -DNOFORTRAN=1 ..
- if [%COMPILER%]==[MinGW-gcc-5.3.0] cmake -G "MSYS Makefiles" -DNOFORTRAN=1 ..
- if [%WITH_FORTRAN%]==[no] cmake -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DMSVC_STATIC_CRT=ON ..
- if [%WITH_FORTRAN%]==[yes] cmake -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 ..
- if [%WITH_FORTRAN%]==[OFF] cmake -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DMSVC_STATIC_CRT=ON ..
- if [%WITH_FORTRAN%]==[ON] cmake -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 ..
- if [%USE_OPENMP%]==[ON] cmake -DUSE_OPENMP=ON ..
- if [%DYNAMIC_ARCH%]==[ON] cmake -DDYNAMIC_ARCH=ON -DDYNAMIC_LIST='CORE2;NEHALEM;SANDYBRIDGE;BULLDOZER;HASWELL' ..
build_script:
- cmake --build .
test_script:
- echo Running Test
- cd utest
- openblas_utest
- ctest -j2

View File

@@ -4,14 +4,22 @@ trigger:
branches:
include:
- develop
resources:
containers:
- container: oneapi-hpckit
image: intel/oneapi-hpckit:latest
options: '-v /usr/bin/sudo:/usr/bin/sudo -v /usr/lib/sudo/libsudo_util.so.0:/usr/lib/sudo/libsudo_util.so.0 -v /usr/lib/sudo/sudoers.so:/usr/lib/sudo/sudoers.so'
- container: oneapi-basekit
image: intel/oneapi-basekit:latest
options: '-v /usr/bin/sudo:/usr/bin/sudo -v /usr/lib/sudo/libsudo_util.so.0:/usr/lib/sudo/libsudo_util.so.0 -v /usr/lib/sudo/sudoers.so:/usr/lib/sudo/sudoers.so'
jobs:
# manylinux1 is useful to test because the
# standard Docker container uses an old version
# of gcc / glibc
- job: manylinux1_gcc
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- script: |
echo "FROM quay.io/pypa/manylinux1_x86_64
@@ -27,7 +35,7 @@ jobs:
displayName: Run manylinux1 docker build
- job: Intel_SDE_skx
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-latest'
steps:
- script: |
# at the time of writing the available Azure Ubuntu vm image
@@ -68,4 +76,147 @@ jobs:
dir
openblas_utest.exe
- job: OSX_OpenMP
pool:
vmImage: 'macOS-10.15'
steps:
- script: |
brew update
make TARGET=CORE2 DYNAMIC_ARCH=1 USE_OPENMP=1 INTERFACE64=1 CC=gcc-10 FC=gfortran-10
make TARGET=CORE2 DYNAMIC_ARCH=1 USE_OPENMP=1 INTERFACE64=1 CC=gcc-10 FC=gfortran-10 PREFIX=../blasinst install
ls -lR ../blasinst
- job: OSX_GCC_Nothreads
pool:
vmImage: 'macOS-10.15'
steps:
- script: |
brew update
make USE_THREADS=0 CC=gcc-10 FC=gfortran-10
- job: OSX_OpenMP_Clang
pool:
vmImage: 'macOS-10.15'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
steps:
- script: |
brew update
brew install llvm libomp
make TARGET=CORE2 USE_OPENMP=1 INTERFACE64=1 DYNAMIC_ARCH=1 CC=/usr/local/opt/llvm/bin/clang FC=gfortran-10
- job: OSX_OpenMP_Clang_cmake
pool:
vmImage: 'macOS-10.15'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
steps:
- script: |
brew update
brew install llvm libomp
mkdir build
cd build
cmake -DTARGET=CORE2 -DUSE_OPENMP=1 -DINTERFACE64=1 -DDYNAMIC_ARCH=1 -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DNOFORTRAN=1 -DNO_AVX512=1 ..
make
ctest
- job: OSX_OpenMP_Clang_gf_cmake
pool:
vmImage: 'macOS-10.15'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
steps:
- script: |
brew update
brew install llvm libomp
mkdir build
cd build
cmake -DTARGET=CORE2 -DUSE_OPENMP=1 -DINTERFACE64=1 -DDYNAMIC_ARCH=1 -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DNO_AVX512=1 ..
make
ctest
- job: OSX_Ifort_Clang
pool:
vmImage: 'macOS-10.15'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17643/m_HPCKit_p_2021.2.0.2903_offline.dmg
LIBRARY_PATH: /usr/local/opt/llvm/lib
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler
steps:
- script: |
brew update
brew install llvm libomp
sudo mkdir -p /opt/intel
sudo chown $USER /opt/intel
displayName: prepare for cache restore
- task: Cache@2
inputs:
path: /opt/intel/oneapi
key: '"install" | "$(MACOS_HPCKIT_URL)" | "$(MACOS_FORTRAN_COMPONENTS)"'
cacheHitVar: CACHE_RESTORED
- script: |
curl --output webimage.dmg --url $(MACOS_HPCKIT_URL) --retry 5 --retry-delay 5
hdiutil attach webimage.dmg
sudo /Volumes/"$(basename "$(MACOS_HPCKIT_URL)" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components="$(MACOS_FORTRAN_COMPONENTS)" --eula=accept --continue-with-optional-error=yes --log-dir=.
installer_exit_code=$?
hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet
exit $installer_exit_code
displayName: install
condition: ne(variables.CACHE_RESTORED, 'true')
- script: |
source /opt/intel/oneapi/setvars.sh
make CC=/usr/local/opt/llvm/bin/clang FC=ifort
- job: OSX_NDK_ARMV7
pool:
vmImage: 'macOS-10.15'
steps:
- script: |
brew update
brew install --cask android-ndk
export ANDROID_NDK_HOME=/usr/local/share/android-ndk
make TARGET=ARMV7 ONLY_CBLAS=1 CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi21-clang AR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar HOSTCC=gcc ARM_SOFTFP_ABI=1 -j4
- job: OSX_IOS_ARMV8
pool:
vmImage: 'macOS-10.15'
variables:
CC: /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk -arch arm64 -miphoneos-version-min=10.0
steps:
- script: |
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
- job: OSX_IOS_ARMV7
pool:
vmImage: 'macOS-10.15'
variables:
CC: /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk -arch armv7 -miphoneos-version-min=5.1
steps:
- script: |
make TARGET=ARMV7 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
- job: ALPINE_MUSL
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
wget https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.13.1/alpine-chroot-install \
&& echo '7c7e3fa378e69aecc7f5f01bbc759e5f0a9d9b74 alpine-chroot-install' | sha1sum -c \
|| exit 1
alpine() { /alpine/enter-chroot -u "$USER" "$@"; }
sudo sh alpine-chroot-install -p 'build-base gfortran perl linux-headers sudo'
alpine make DYNAMIC_ARCH=1 BINARY=64
alpine make DYNAMIC_ARCH=1 BINARY=64 PREFIX=mytestdir install
alpine ls -l mytestdir/include
alpine echo "// tests that inclusion of openblas_config.h works with musl" >test_install.c
alpine echo "#include <openblas_config.h>" >>test_install.c
alpine echo "int main(){" >> test_install.c
alpine echo "cpu_set_t* cpu_set = NULL;}" >>test_install.c
alpine gcc -Imytestdir/include test_install.c -Lmytestdir/lib -lopenblas -lpthread -lgfortran -o test_install

View File

@@ -49,8 +49,8 @@ else
GOTO_LAPACK_TARGETS=
endif
ifeq ($(BUILD_HALF),1)
GOTO_HALF_TARGETS=shgemm.goto
ifeq ($(BUILD_BFLOAT16),1)
GOTO_HALF_TARGETS=sbgemm.goto
else
GOTO_HALF_TARGETS=
endif
@@ -620,8 +620,8 @@ zcholesky.essl : zcholesky.$(SUFFIX)
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBESSL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
##################################### Sgemm ####################################################
ifeq ($(BUILD_HALF),1)
shgemm.goto : shgemm.$(SUFFIX) ../$(LIBNAME)
ifeq ($(BUILD_BFLOAT16),1)
sbgemm.goto : sbgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
endif
@@ -2927,8 +2927,8 @@ ccholesky.$(SUFFIX) : cholesky.c
zcholesky.$(SUFFIX) : cholesky.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
ifeq ($(BUILD_HALF),1)
shgemm.$(SUFFIX) : gemm.c
ifeq ($(BUILD_BFLOAT16),1)
sbgemm.$(SUFFIX) : gemm.c
$(CC) $(CFLAGS) -c -DHALF -UCOMPLEX -UDOUBLE -o $(@F) $^
endif

View File

@@ -25,164 +25,106 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef AMAX
#ifdef COMPLEX
#ifdef DOUBLE
#define AMAX BLASFUNC(dzamax)
#define AMAX BLASFUNC(dzamax)
#else
#define AMAX BLASFUNC(scamax)
#define AMAX BLASFUNC(scamax)
#endif
#else
#ifdef DOUBLE
#define AMAX BLASFUNC(damax)
#define AMAX BLASFUNC(damax)
#else
#define AMAX BLASFUNC(samax)
#define AMAX BLASFUNC(samax)
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
int main(int argc, char *argv[])
{
FLOAT *x;
blasint m, i;
blasint inc_x=1;
blasint inc_x = 1;
int loops = 1;
int l;
char *p;
int from = 1;
int to = 200;
int step = 1;
int from = 1;
int to = 200;
int step = 1;
double time1, timeg;
struct timeval start, stop;
double time1,timeg;
argc--;
argv++;
argc--;argv++;
if (argc > 0) { from = atol(*argv); argc--; argv++;}
if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++;}
if (argc > 0) { step = atol(*argv); argc--; argv++;}
if ((p = getenv("OPENBLAS_LOOPS"))) loops = atoi(p);
if ((p = getenv("OPENBLAS_INCX"))) inc_x = atoi(p);
fprintf(stderr, "From : %3d To : %3d Step = %3d Inc_x = %d Loops = %d\n", from, to, step,inc_x,loops);
if (( x = (FLOAT *)malloc(sizeof(FLOAT) * to * abs(inc_x) * COMPSIZE)) == NULL){
fprintf(stderr,"Out of Memory!!\n");exit(1);
if (argc > 0)
{
from = atol(*argv);
argc--;
argv++;
}
if (argc > 0)
{
to = MAX(atol(*argv), from);
argc--;
argv++;
}
if (argc > 0)
{
step = atol(*argv);
argc--;
argv++;
}
#ifdef linux
if ((p = getenv("OPENBLAS_LOOPS")))
loops = atoi(p);
if ((p = getenv("OPENBLAS_INCX")))
inc_x = atoi(p);
fprintf(stderr, "From : %3d To : %3d Step = %3d Inc_x = %d Loops = %d\n", from, to, step, inc_x, loops);
if ((x = (FLOAT *)malloc(sizeof(FLOAT) * to * abs(inc_x) * COMPSIZE)) == NULL)
{
fprintf(stderr, "Out of Memory!!\n");
exit(1);
}
#ifdef __linux
srandom(getpid());
#endif
fprintf(stderr, " SIZE Flops\n");
for(m = from; m <= to; m += step)
for (m = from; m <= to; m += step)
{
timeg=0;
timeg = 0;
fprintf(stderr, " %6d : ", (int)m);
fprintf(stderr, " %6d : ", (int)m);
for (l = 0; l < loops; l++)
{
for (i = 0; i < m * COMPSIZE * abs(inc_x); i++)
{
x[i] = ((FLOAT)rand() / (FLOAT)RAND_MAX) - 0.5;
}
for (l=0; l<loops; l++)
{
for(i = 0; i < m * COMPSIZE * abs(inc_x); i++){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
AMAX (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += time1;
begin();
AMAX(&m, x, &inc_x);
end();
timeg += getsec();
}
timeg /= loops;
fprintf(stderr,
" %10.2f MFlops %10.6f sec\n",
COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6, timeg);
" %10.2f MFlops %10.6f sec\n",
COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6, timeg);
}
return 0;

View File

@@ -25,165 +25,110 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef AMIN
#ifdef COMPLEX
#ifdef DOUBLE
#define AMIN BLASFUNC(dzamin)
#define AMIN BLASFUNC(dzamin)
#else
#define AMIN BLASFUNC(scamin)
#define AMIN BLASFUNC(scamin)
#endif
#else
#ifdef DOUBLE
#define AMIN BLASFUNC(damin)
#define AMIN BLASFUNC(damin)
#else
#define AMIN BLASFUNC(samin)
#define AMIN BLASFUNC(samin)
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
int main(int argc, char *argv[])
{
FLOAT *x;
blasint m, i;
blasint inc_x=1;
blasint inc_x = 1;
int loops = 1;
int l;
char *p;
int from = 1;
int to = 200;
int step = 1;
int from = 1;
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
double time1, timeg;
argc--;argv++;
argc--;
argv++;
if (argc > 0) { from = atol(*argv); argc--; argv++;}
if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++;}
if (argc > 0) { step = atol(*argv); argc--; argv++;}
if ((p = getenv("OPENBLAS_LOOPS"))) loops = atoi(p);
if ((p = getenv("OPENBLAS_INCX"))) inc_x = atoi(p);
fprintf(stderr, "From : %3d To : %3d Step = %3d Inc_x = %d Loops = %d\n", from, to, step,inc_x,loops);
if (( x = (FLOAT *)malloc(sizeof(FLOAT) * to * abs(inc_x) * COMPSIZE)) == NULL){
fprintf(stderr,"Out of Memory!!\n");exit(1);
if (argc > 0)
{
from = atol(*argv);
argc--;
argv++;
}
if (argc > 0)
{
to = MAX(atol(*argv), from);
argc--;
argv++;
}
if (argc > 0)
{
step = atol(*argv);
argc--;
argv++;
}
#ifdef linux
if ((p = getenv("OPENBLAS_LOOPS")))
loops = atoi(p);
if ((p = getenv("OPENBLAS_INCX")))
inc_x = atoi(p);
fprintf(stderr, "From : %3d To : %3d Step = %3d Inc_x = %d Loops = %d\n", from, to, step, inc_x, loops);
if ((x = (FLOAT *)malloc(sizeof(FLOAT) * to * abs(inc_x) * COMPSIZE)) == NULL)
{
fprintf(stderr, "Out of Memory!!\n");
exit(1);
}
#ifdef __linux
srandom(getpid());
#endif
fprintf(stderr, " SIZE Flops\n");
for(m = from; m <= to; m += step)
for (m = from; m <= to; m += step)
{
timeg=0;
timeg = 0;
fprintf(stderr, " %6d : ", (int)m);
fprintf(stderr, " %6d : ", (int)m);
for (l = 0; l < loops; l++)
{
for (l=0; l<loops; l++)
{
for (i = 0; i < m * COMPSIZE * abs(inc_x); i++)
{
x[i] = ((FLOAT)rand() / (FLOAT)RAND_MAX) - 0.5;
}
for(i = 0; i < m * COMPSIZE * abs(inc_x); i++){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
begin();
gettimeofday( &start, (struct timezone *)0);
AMIN(&m, x, &inc_x);
AMIN (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += time1;
end();
timeg += getsec();
}
timeg /= loops;
fprintf(stderr,
" %10.2f MFlops %10.6f sec\n",
COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6, timeg);
" %10.2f MFlops %10.6f sec\n",
COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6, timeg);
}
return 0;

View File

@@ -25,169 +25,108 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef ASUM
#ifdef COMPLEX
#ifdef DOUBLE
#define ASUM BLASFUNC(dzasum)
#define ASUM BLASFUNC(dzasum)
#else
#define ASUM BLASFUNC(scasum)
#define ASUM BLASFUNC(scasum)
#endif
#else
#ifdef DOUBLE
#define ASUM BLASFUNC(dasum)
#define ASUM BLASFUNC(dasum)
#else
#define ASUM BLASFUNC(sasum)
#define ASUM BLASFUNC(sasum)
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
int main(int argc, char *argv[])
{
FLOAT *x;
FLOAT result;
blasint m, i;
blasint inc_x=1;
blasint inc_x = 1;
int loops = 1;
int l;
char *p;
int from = 1;
int to = 200;
int step = 1;
int from = 1;
int to = 200;
int step = 1;
double time1, timeg;
struct timeval start, stop;
double time1,timeg;
argc--;
argv++;
argc--;argv++;
if (argc > 0) { from = atol(*argv); argc--; argv++;}
if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++;}
if (argc > 0) { step = atol(*argv); argc--; argv++;}
if ((p = getenv("OPENBLAS_LOOPS"))) loops = atoi(p);
if ((p = getenv("OPENBLAS_INCX"))) inc_x = atoi(p);
fprintf(stderr, "From : %3d To : %3d Step = %3d Inc_x = %d Loops = %d\n", from, to, step,inc_x,loops);
if (( x = (FLOAT *)malloc(sizeof(FLOAT) * to * abs(inc_x) * COMPSIZE)) == NULL){
fprintf(stderr,"Out of Memory!!\n");exit(1);
if (argc > 0)
{
from = atol(*argv);
argc--;
argv++;
}
if (argc > 0)
{
to = MAX(atol(*argv), from);
argc--;
argv++;
}
if (argc > 0)
{
step = atol(*argv);
argc--;
argv++;
}
if ((p = getenv("OPENBLAS_LOOPS")))
loops = atoi(p);
if ((p = getenv("OPENBLAS_INCX")))
inc_x = atoi(p);
#ifdef linux
fprintf(stderr, "From : %3d To : %3d Step = %3d Inc_x = %d Loops = %d\n", from, to, step, inc_x, loops);
if ((x = (FLOAT *)malloc(sizeof(FLOAT) * to * abs(inc_x) * COMPSIZE)) == NULL)
{
fprintf(stderr, "Out of Memory!!\n");
exit(1);
}
#ifdef __linux
srandom(getpid());
#endif
fprintf(stderr, " SIZE Flops\n");
for(m = from; m <= to; m += step)
for (m = from; m <= to; m += step)
{
timeg=0;
timeg = 0;
fprintf(stderr, " %6d : ", (int)m);
fprintf(stderr, " %6d : ", (int)m);
for (l = 0; l < loops; l++)
{
for (l=0; l<loops; l++)
{
for(i = 0; i < m * COMPSIZE * abs(inc_x); i++){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
result = ASUM (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += time1;
for (i = 0; i < m * COMPSIZE * abs(inc_x); i++)
{
x[i] = ((FLOAT)rand() / (FLOAT)RAND_MAX) - 0.5;
}
begin();
result = ASUM(&m, x, &inc_x);
end();
timeg += getsec();
}
timeg /= loops;
if (loops > 1)
timeg /= loops;
#ifdef COMPLEX
fprintf(stderr, " %10.2f MFlops %10.6f sec\n", 4. * (double)m / timeg * 1.e-6, timeg);
#else
fprintf(stderr, " %10.2f MFlops %10.6f sec\n", 2. * (double)m / timeg * 1.e-6, timeg);
#endif
}
return 0;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef AXPBY
@@ -49,71 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -129,7 +58,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -152,7 +80,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -176,16 +104,10 @@ int main(int argc, char *argv[]){
for (l=0; l<loops; l++)
{
gettimeofday( &start, (struct timezone *)0);
begin();
AXPBY (&m, alpha, x, &inc_x, beta, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += time1;
end();
timeg += getsec();
}
timeg /= loops;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef AXPY
@@ -49,71 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -127,8 +56,6 @@ int main(int argc, char *argv[]){
int from = 1;
int to = 200;
int step = 1;
struct timespec start, stop;
double time1,timeg;
argc--;argv++;
@@ -151,7 +78,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -175,13 +102,13 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
clock_gettime( CLOCK_REALTIME, &start);
begin();
AXPY (&m, alpha, x, &inc_x, y, &inc_y );
clock_gettime( CLOCK_REALTIME, &stop);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_nsec - start.tv_nsec)) * 1.e-9;
time1 = getsec();
timeg += time1;

116
benchmark/bench.h Normal file
View File

@@ -0,0 +1,116 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#elif defined(__APPLE__)
#include <mach/mach_time.h>
#endif
#include "common.h"
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
#if defined(__WIN32__) || defined(__WIN64__) || !defined(_POSIX_TIMERS)
struct timeval start, stop;
#elif defined(__APPLE__)
mach_timebase_info_data_t info;
uint64_t start = 0, stop = 0;
#else
struct timespec start = { 0, 0 }, stop = { 0, 0 };
#endif
double getsec()
{
#if defined(__WIN32__) || defined(__WIN64__) || !defined(_POSIX_TIMERS)
return (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
#elif defined(__APPLE__)
mach_timebase_info(&info);
return (double)(((stop - start) * info.numer)/info.denom) * 1.e-9;
#else
return (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_nsec - start.tv_nsec)) * 1.e-9;
#endif
}
void begin() {
#if defined(__WIN32__) || defined(__WIN64__) || !defined(_POSIX_TIMERS)
gettimeofday( &start, (struct timezone *)0);
#elif defined(__APPLE__)
start = clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
#else
clock_gettime(CLOCK_REALTIME, &start);
#endif
}
void end() {
#if defined(__WIN32__) || defined(__WIN64__) || !defined(_POSIX_TIMERS)
gettimeofday( &stop, (struct timezone *)0);
#elif defined(__APPLE__)
stop = clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
#else
clock_gettime(CLOCK_REALTIME, &stop);
#endif
}

View File

@@ -36,12 +36,7 @@
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
double fabs(double);
@@ -71,41 +66,6 @@ double fabs(double);
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
static __inline double getmflops(int ratio, int m, double secs){
double mm = (double)m;
@@ -145,7 +105,6 @@ int main(int argc, char *argv[]){
FLOAT maxerr;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -220,20 +179,19 @@ int main(int argc, char *argv[]){
SYRK(uplo[uplos], trans[uplos], &m, &m, alpha, a, &m, beta, b, &m);
gettimeofday( &start, (struct timezone *)0);
begin();
POTRF(uplo[uplos], &m, b, &m, &info);
gettimeofday( &stop, (struct timezone *)0);
end();
if (info != 0) {
fprintf(stderr, "Info = %d\n", info);
exit(1);
}
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
maxerr = 0.;
if (!(uplos & 1)) {
for (j = 0; j < m; j++) {

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef COPY
@@ -49,71 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -128,11 +57,9 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1 = 0.0, timeg = 0.0;
long nanos = 0;
time_t seconds = 0;
struct timespec time_start = { 0, 0 }, time_end = { 0, 0 };
argc--;argv++;
@@ -154,7 +81,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -176,15 +103,10 @@ int main(int argc, char *argv[]){
for (l=0; l<loops; l++)
{
clock_gettime(CLOCK_REALTIME, &time_start);
begin();
COPY (&m, x, &inc_x, y, &inc_y );
clock_gettime(CLOCK_REALTIME, &time_end);
nanos = time_end.tv_nsec - time_start.tv_nsec;
seconds = time_end.tv_sec - time_start.tv_sec;
time1 = seconds + nanos / 1.e9;
timeg += time1;
end();
timeg += getsec();
}
timeg /= loops;

View File

@@ -25,89 +25,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef DOT
#ifdef DOUBLE
#define DOT BLASFUNC(ddot)
#else
#define DOT BLASFUNC(sdot)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -122,7 +49,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -145,7 +71,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -169,15 +95,12 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
result = DOT (&m, x, &inc_x, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += time1;
end();
timeg += getsec();
}

View File

@@ -36,13 +36,7 @@
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef GEEV
@@ -74,71 +68,6 @@ extern void GEEV( char* jobvl, char* jobvr, blasint* n, FLOAT* a,
FLOAT* vr, blasint* ldvr, FLOAT* work, blasint* lwork, FLOAT *rwork, blasint* info );
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a,*vl,*vr,*wi,*wr,*work,*rwork;
@@ -154,7 +83,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -214,7 +142,7 @@ int main(int argc, char *argv[]){
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -223,7 +151,7 @@ int main(int argc, char *argv[]){
for(m = from; m <= to; m += step){
fprintf(stderr, " %6d : ", (int)m);
gettimeofday( &start, (struct timezone *)0);
begin();
lwork = -1;
#ifndef COMPLEX
@@ -239,14 +167,14 @@ int main(int argc, char *argv[]){
GEEV (&job, &jobr, &m, a, &m, wr, vl, &m, vr, &m, work, &lwork,rwork, &info);
#endif
gettimeofday( &stop, (struct timezone *)0);
end();
if (info) {
fprintf(stderr, "failed to compute eigenvalues .. %d\n", info);
exit(1);
}
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops : %10.2f Sec : %d\n",

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef GEMM
@@ -40,7 +34,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef DOUBLE
#define GEMM BLASFUNC(dgemm)
#elif defined(HALF)
#define GEMM BLASFUNC(shgemm)
#define GEMM BLASFUNC(sbgemm)
#else
#define GEMM BLASFUNC(sgemm)
#endif
@@ -55,71 +49,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
IFLOAT *a, *b;
@@ -139,7 +68,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1, timeg;
argc--;argv++;
@@ -197,7 +125,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -228,14 +156,14 @@ int main(int argc, char *argv[]){
ldc = m;
fprintf(stderr, " M=%4d, N=%4d, K=%4d : ", (int)m, (int)n, (int)k);
gettimeofday( &start, (struct timezone *)0);
begin();
for (j=0; j<loops; j++) {
GEMM (&transa, &transb, &m, &n, &k, alpha, a, &lda, b, &ldb, beta, c, &ldc);
}
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
end();
time1 = getsec();
timeg = time1/loops;
fprintf(stderr,

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef GEMM
@@ -53,71 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b, *c;
@@ -133,7 +62,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -163,7 +91,7 @@ int main(int argc, char *argv[]){
loops = atoi(p);
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -187,16 +115,12 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
GEMM (&trans, &trans, &m, &m, &m, alpha, a, &m, b, &m, beta, c, &m );
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += time1;
end();
timeg += getsec();
}
timeg /= loops;

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef GEMV
@@ -52,72 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
@@ -137,7 +66,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -181,7 +109,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -211,10 +139,10 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
GEMV (&trans, &m, &n, alpha, a, &m, x, &inc_x, beta, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
end();
time1 = getsec();
timeg += time1;
}
@@ -248,10 +176,10 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
GEMV (&trans, &m, &n, alpha, a, &m, x, &inc_x, beta, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
end();
time1 = getsec();
timeg += time1;
}

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef GER
@@ -49,72 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
@@ -131,7 +59,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -165,7 +92,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -198,16 +125,13 @@ int main(int argc, char *argv[]){
for (l=0; l<loops; l++)
{
gettimeofday( &start, (struct timezone *)0);
begin();
GER (&m, &n, alpha, x, &inc_x, y, &inc_y, a , &m);
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += time1;
end();
timeg += getsec();
}
timeg /= loops;

View File

@@ -36,12 +36,7 @@
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
double fabs(double);
@@ -66,71 +61,6 @@ double fabs(double);
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b;
@@ -142,7 +72,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -165,7 +94,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -194,22 +123,18 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
GESV (&m, &m, a, &m, ipiv, b, &m, &info);
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
end();
time1 = getsec();
fprintf(stderr,
"%10.2f MFlops %10.6f s\n",
COMPSIZE * COMPSIZE * (2. / 3. * (double)m * (double)m * (double)m + 2. * (double)m * (double)m * (double)m ) / (time1) * 1.e-6 , time1);
}
return 0;

View File

@@ -36,12 +36,7 @@
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef GETRF
#undef GETRI
@@ -72,84 +67,22 @@
extern void GETRI(blasint *m, FLOAT *a, blasint *lda, blasint *ipiv, FLOAT *work, blasint *lwork, blasint *info);
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a,*work;
FLOAT wkopt[4];
blasint *ipiv;
blasint m, i, j, info,lwork;
blasint m, i, j, l, info,lwork;
int from = 1;
int to = 200;
int step = 1;
int loops = 1;
struct timeval start, stop;
double time1;
double time1,timeg;
char *p;
char btest = 'I';
argc--;argv++;
@@ -157,6 +90,9 @@ int main(int argc, char *argv[]){
if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++;}
if (argc > 0) { step = atol(*argv); argc--; argv++;}
if ((p = getenv("OPENBLAS_TEST"))) btest=*p;
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
fprintf(stderr, "From : %3d To : %3d Step = %3d\n", from, to, step);
@@ -188,39 +124,48 @@ int main(int argc, char *argv[]){
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
fprintf(stderr, " SIZE FLops Time Lwork\n");
for(m = from; m <= to; m += step){
timeg = 0.;
fprintf(stderr, " %6d : ", (int)m);
GETRF (&m, &m, a, &m, ipiv, &info);
for (l = 0; l < loops; l++) {
if (btest == 'F') begin();
GETRF (&m, &m, a, &m, ipiv, &info);
if (btest == 'F') {
end();
timeg += getsec();
}
if (info) {
fprintf(stderr, "Matrix is not singular .. %d\n", info);
exit(1);
}
gettimeofday( &start, (struct timezone *)0);
if (btest == 'I') begin();
lwork = -1;
GETRI(&m, a, &m, ipiv, wkopt, &lwork, &info);
lwork = (blasint)wkopt[0];
GETRI(&m, a, &m, ipiv, work, &lwork, &info);
gettimeofday( &stop, (struct timezone *)0);
if (btest == 'I') end();
if (info) {
fprintf(stderr, "failed compute inverse matrix .. %d\n", info);
exit(1);
}
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
if (btest == 'I')
timeg += getsec();
} // loops
time1 = timeg/(double)loops;
fprintf(stderr,
" %10.2f MFlops : %10.2f Sec : %d\n",
COMPSIZE * COMPSIZE * (4.0/3.0 * (double)m * (double)m *(double)m - (double)m *(double)m + 5.0/3.0* (double)m) / time1 * 1.e-6,time1,lwork);

View File

@@ -25,89 +25,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef HBMV
#ifdef DOUBLE
#define HBMV BLASFUNC(zhbmv)
#else
#define HBMV BLASFUNC(chbmv)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz) {
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size) {
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
@@ -125,7 +52,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -158,7 +84,7 @@ int main(int argc, char *argv[]){
exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -186,15 +112,13 @@ int main(int argc, char *argv[]){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
HBMV (&uplo, &m, &k, alpha, a, &m, x, &inc_x, beta, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += time1;
timeg += getsec();
}

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef HEMM
@@ -41,72 +35,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define HEMM BLASFUNC(chemm)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b, *c;
@@ -126,7 +54,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -151,7 +78,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -170,13 +97,13 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
HEMM (&side, &uplo, &m, &m, alpha, a, &m, b, &m, beta, c, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops\n",

View File

@@ -25,89 +25,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef HEMV
#ifdef DOUBLE
#define HEMV BLASFUNC(zhemv)
#else
#define HEMV BLASFUNC(chemv)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
@@ -124,7 +51,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -152,7 +78,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -182,13 +108,13 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
HEMV (&uplo, &m, alpha, a, &m, x, &inc_x, beta, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,89 +25,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef HER
#ifdef DOUBLE
#define HER BLASFUNC(zher)
#else
#define HER BLASFUNC(cher)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x;
@@ -126,8 +53,6 @@ int main(int argc, char *argv[]){
int from = 1;
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -149,7 +74,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -166,15 +91,13 @@ int main(int argc, char *argv[]){
x[ (long)j * COMPSIZE] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
HER (&uplo, &m, alpha, x, &incx, a, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
gettimeofday( &start, (struct timezone *)0);
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops\n",

View File

@@ -25,89 +25,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef HER2
#ifdef DOUBLE
#define HER2 BLASFUNC(zher2)
#else
#define HER2 BLASFUNC(cher2)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
@@ -127,7 +54,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -151,7 +77,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -169,16 +95,13 @@ int main(int argc, char *argv[]){
y[ (long)j * COMPSIZE] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
HER2 (&uplo, &m, alpha, x, &inc, y, &inc, a, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
gettimeofday( &start, (struct timezone *)0);
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops\n",

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef HER2K
#ifdef DOUBLE
@@ -40,72 +34,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define HER2K BLASFUNC(cher2k)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b, *c;
@@ -125,7 +53,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -150,7 +77,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -169,13 +96,13 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
HER2K (&uplo, &trans, &m, &m, alpha, a, &m, b, &m, beta, c, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops\n",

View File

@@ -25,89 +25,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef HERK
#ifdef DOUBLE
#define HERK BLASFUNC(zherk)
#else
#define HERK BLASFUNC(cherk)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *c;
@@ -127,7 +54,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -149,7 +75,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -167,18 +93,17 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
HERK (&uplo, &trans, &m, &m, alpha, a, &m, beta, c, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops\n",
COMPSIZE * COMPSIZE * 1. * (double)m * (double)m * (double)m / time1 * 1.e-6);
}
return 0;

View File

@@ -25,89 +25,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef HPMV
#ifdef DOUBLE
#define HPMV BLASFUNC(zhpmv)
#else
#define HPMV BLASFUNC(chpmv)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz) {
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size) {
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
@@ -124,7 +51,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -155,7 +81,7 @@ int main(int argc, char *argv[]){
exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -183,13 +109,13 @@ int main(int argc, char *argv[]){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
HPMV (&uplo, &m, alpha, a, x, &inc_x, beta, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef IAMAX
@@ -49,71 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x;
@@ -127,7 +56,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -145,7 +73,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -166,13 +94,13 @@ int main(int argc, char *argv[]){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
IAMAX (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef IAMIN
@@ -49,71 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x;
@@ -127,7 +56,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -145,7 +73,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -166,13 +94,13 @@ int main(int argc, char *argv[]){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
IAMIN (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef IMAX
@@ -43,71 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x;
@@ -121,7 +50,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -139,7 +67,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -160,13 +88,13 @@ int main(int argc, char *argv[]){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
IMAX (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef IMIN
@@ -43,71 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x;
@@ -121,7 +50,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -139,7 +67,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -160,13 +88,13 @@ int main(int argc, char *argv[]){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
IMIN (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -36,12 +36,7 @@
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
double fabs(double);
@@ -72,88 +67,26 @@ double fabs(double);
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b;
blasint *ipiv;
blasint m, i, j, info;
blasint m, i, j, l, info;
blasint unit = 1;
int from = 1;
int to = 200;
int step = 1;
int loops = 1;
FLOAT maxerr;
struct timeval start, stop;
double time1, time2;
double time1, time2, timeg1,timeg2;
char *p;
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
argc--;argv++;
if (argc > 0) { from = atol(*argv); argc--; argv++;}
@@ -174,16 +107,16 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
fprintf(stderr, " SIZE Residual Decompose Solve Total\n");
for(m = from; m <= to; m += step){
timeg1 = timeg2 = 0.;
fprintf(stderr, " %6d : ", (int)m);
for (l = 0; l < loops; l++) {
for(j = 0; j < m; j++){
for(i = 0; i < m * COMPSIZE; i++){
a[(long)i + (long)j * (long)m * COMPSIZE] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
@@ -198,32 +131,34 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
GETRF (&m, &m, a, &m, ipiv, &info);
gettimeofday( &stop, (struct timezone *)0);
end();
if (info) {
fprintf(stderr, "Matrix is not singular .. %d\n", info);
exit(1);
}
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg1 += getsec();
gettimeofday( &start, (struct timezone *)0);
begin();
GETRS("N", &m, &unit, a, &m, ipiv, b, &m, &info);
gettimeofday( &stop, (struct timezone *)0);
end();
if (info) {
fprintf(stderr, "Matrix is not singular .. %d\n", info);
exit(1);
}
time2 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg2 += getsec();
} //loops
time1=timeg1/(double)loops;
time2=timeg2/(double)loops;
maxerr = 0.;
for(i = 0; i < m; i++){

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef NAMAX
@@ -43,71 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x;
@@ -121,7 +50,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -139,7 +67,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -160,13 +88,13 @@ int main(int argc, char *argv[]){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
NAMAX (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef NAMIN
@@ -43,71 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x;
@@ -121,7 +50,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -139,7 +67,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -160,13 +88,13 @@ int main(int argc, char *argv[]){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
NAMIN (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef NRM2
@@ -49,71 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x;
@@ -127,7 +56,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -145,7 +73,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -166,13 +94,13 @@ int main(int argc, char *argv[]){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
NRM2 (&m, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -36,12 +36,7 @@
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
double fabs(double);
@@ -86,37 +81,7 @@ double fabs(double);
// extern void POTRI(char *uplo, blasint *m, FLOAT *a, blasint *lda, blasint *info);
// extern void POTRS(char *uplo, blasint *m, blasint *n, FLOAT *a, blasint *lda, FLOAT *b, blasint *ldb, blasint *info);
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
int main(int argc, char *argv[]){
@@ -134,15 +99,15 @@ int main(int argc, char *argv[]){
char *p;
char btest = 'F';
blasint m, i, j, info, uplos=0;
double flops;
blasint m, i, j, l, info, uplos=0;
double flops = 0.;
int from = 1;
int to = 200;
int step = 1;
int loops = 1;
struct timeval start, stop;
double time1;
double time1, timeg;
argc--;argv++;
@@ -155,6 +120,8 @@ int main(int argc, char *argv[]){
if ((p = getenv("OPENBLAS_TEST"))) btest=*p;
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
fprintf(stderr, "From : %3d To : %3d Step = %3d Uplo = %c\n", from, to, step,*uplo[uplos]);
if (( a = (FLOAT *)malloc(sizeof(FLOAT) * to * to * COMPSIZE)) == NULL){
@@ -165,19 +132,21 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
for(m = from; m <= to; m += step){
for(m = from; m <= to; m += step){
timeg=0.;
for (l = 0; l < loops; l++) {
#ifndef COMPLEX
if (uplos & 1) {
for (j = 0; j < m; j++) {
for(i = 0; i < j; i++) a[(long)i + (long)j * (long)m] = 0.;
a[(long)j + (long)j * (long)m] = ((double) rand() / (double) RAND_MAX) + 8.;
a[(long)j + (long)j * (long)m] = ((double) rand() / (double) RAND_MAX) + 8.;
for(i = j + 1; i < m; i++) a[(long)i + (long)j * (long)m] = ((double) rand() / (double) RAND_MAX) - 0.5;
}
} else {
for (j = 0; j < m; j++) {
for(i = 0; i < j; i++) a[(long)i + (long)j * (long)m] = ((double) rand() / (double) RAND_MAX) - 0.5;
a[(long)j + (long)j * (long)m] = ((double) rand() / (double) RAND_MAX) + 8.;
a[(long)j + (long)j * (long)m] = ((double) rand() / (double) RAND_MAX) + 8.;
for(i = j + 1; i < m; i++) a[(long)i + (long)j * (long)m] = 0.;
}
}
@@ -217,19 +186,19 @@ int main(int argc, char *argv[]){
SYRK(uplo[uplos], trans[uplos], &m, &m, alpha, a, &m, beta, b, &m);
gettimeofday( &start, (struct timezone *)0);
begin();
POTRF(uplo[uplos], &m, b, &m, &info);
gettimeofday( &stop, (struct timezone *)0);
end();
if (info != 0) {
fprintf(stderr, "Potrf info = %d\n", info);
exit(1);
}
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
flops = COMPSIZE * COMPSIZE * (1.0/3.0 * (double)m * (double)m *(double)m +1.0/2.0* (double)m *(double)m + 1.0/6.0* (double)m) / time1 * 1.e-6;
if ( btest == 'F')
timeg += getsec();
if ( btest == 'S' )
{
@@ -240,39 +209,43 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
POTRS(uplo[uplos], &m, &m, b, &m, a, &m, &info);
gettimeofday( &stop, (struct timezone *)0);
end();
if (info != 0) {
fprintf(stderr, "Potrs info = %d\n", info);
exit(1);
}
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
flops = COMPSIZE * COMPSIZE * (2.0 * (double)m * (double)m *(double)m ) / time1 * 1.e-6;
timeg += getsec();
}
if ( btest == 'I' )
{
gettimeofday( &start, (struct timezone *)0);
begin();
POTRI(uplo[uplos], &m, b, &m, &info);
gettimeofday( &stop, (struct timezone *)0);
end();
if (info != 0) {
fprintf(stderr, "Potri info = %d\n", info);
exit(1);
}
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
flops = COMPSIZE * COMPSIZE * (2.0/3.0 * (double)m * (double)m *(double)m +1.0/2.0* (double)m *(double)m + 5.0/6.0* (double)m) / time1 * 1.e-6;
timeg += getsec();
}
} // loops
time1 = timeg/(double)loops;
if ( btest == 'F')
flops = COMPSIZE * COMPSIZE * (1.0/3.0 * (double)m * (double)m *(double)m +1.0/2.0* (double)m *(double)m + 1.0/6.0* (double)m) / time1 * 1.e-6;
if ( btest == 'S')
flops = COMPSIZE * COMPSIZE * (2.0 * (double)m * (double)m *(double)m ) / time1 * 1.e-6;
if ( btest == 'I')
flops = COMPSIZE * COMPSIZE * (2.0/3.0 * (double)m * (double)m *(double)m +1.0/2.0* (double)m *(double)m + 5.0/6.0* (double)m) / time1 * 1.e-6;
fprintf(stderr, "%8d : %10.2f MFlops : %10.3f Sec : Test=%c\n",m,flops ,time1,btest);

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef ROT
@@ -52,71 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -133,7 +63,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -156,7 +85,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -179,13 +108,13 @@ int main(int argc, char *argv[]){
for (l=0; l<loops; l++)
{
gettimeofday( &start, (struct timezone *)0);
begin();
ROT (&m, x, &inc_x, y, &inc_y, c, s);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,12 +25,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef ROTM
@@ -40,72 +35,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ROTM BLASFUNC(srotm)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz)
{
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv) {
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size)
{
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =
shmget(IPC_PRIVATE, (size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT | 0600)) < 0) {
printf("Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1) {
printf("Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[])
{
@@ -122,7 +51,7 @@ int main(int argc, char *argv[])
int to = 200;
int step = 1;
struct timeval start, stop;
double time1, timeg;
argc--;
@@ -168,7 +97,7 @@ int main(int argc, char *argv[])
exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -188,14 +117,13 @@ int main(int argc, char *argv[])
}
for (l = 0; l < loops; l++) {
gettimeofday(&start, (struct timezone *)0);
begin();
ROTM(&m, x, &inc_x, y, &inc_y, param);
gettimeofday(&stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) +
(double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;
}

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SCAL
@@ -49,71 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -128,7 +57,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -150,7 +78,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -174,13 +102,13 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
SCAL (&m, alpha, x, &inc_x);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,17 +25,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SPMV
#ifndef COMPLEX
#ifdef DOUBLE
@@ -54,71 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
@@ -135,7 +63,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -163,7 +90,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -193,13 +120,13 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
SPMV (&uplo, &m, alpha, a, x, &inc_x, beta, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SPR
@@ -41,73 +35,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define SPR BLASFUNC(sspr)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a,*c;
@@ -129,7 +56,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -149,7 +75,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -173,13 +99,13 @@ int main(int argc, char *argv[]){
c[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
SPR (&uplo, &m, alpha, c, &inc_x, a);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;
}

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SPR2
@@ -42,72 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a,*b,*c;
@@ -129,7 +58,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -153,7 +81,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -182,13 +110,13 @@ int main(int argc, char *argv[]){
c[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
SPR2 (&uplo, &m, alpha, c, &inc_x, b, &inc_y, a);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;
}

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SWAP
@@ -49,71 +44,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -128,7 +58,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -151,7 +80,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -175,13 +104,13 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
SWAP (&m, x, &inc_x, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SYMM
@@ -53,71 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b, *c;
@@ -137,7 +66,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -162,7 +90,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -181,13 +109,13 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
SYMM (&side, &uplo, &m, &m, alpha, a, &m, b, &m, beta, c, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops\n",

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SYMV
@@ -53,71 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
@@ -134,7 +63,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -162,7 +90,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -192,13 +120,13 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
SYMV (&uplo, &m, alpha, a, &m, x, &inc_x, beta, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SYR
@@ -42,72 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x,*a;
@@ -124,7 +53,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -144,7 +72,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -165,13 +93,13 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
SYR (&uplo, &m, alpha, x, &inc_x, a, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops\n",

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SYR2
@@ -42,72 +36,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define SYR2 BLASFUNC(ssyr2)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y, *a;
@@ -118,15 +46,17 @@ int main(int argc, char *argv[]){
if ((p = getenv("OPENBLAS_UPLO"))) uplo=*p;
blasint m, i, j;
blasint m, i, j, l;
blasint inc_x= 1;
blasint inc_y= 1;
int from = 1;
int to = 200;
int step = 1;
int loops = 1;
struct timeval start, stop;
double time1;
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
double time1,timeg;
argc--;argv++;
@@ -150,7 +80,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -158,8 +88,9 @@ int main(int argc, char *argv[]){
for(m = from; m <= to; m += step)
{
timeg = 0.;
fprintf(stderr, " %6d : ", (int)m);
for (l = 0; l < loops; l++) {
for(i = 0; i < m * COMPSIZE * abs(inc_x); i++){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
@@ -174,14 +105,16 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
SYR2 (&uplo, &m, alpha, x, &inc_x, y, &inc_y, a, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
timeg += getsec();
} // loops
time1 = timeg/(double)loops;
fprintf(stderr,
" %10.2f MFlops\n",
COMPSIZE * COMPSIZE * 2. * (double)m * (double)m / time1 * 1.e-6);

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SYR2K
@@ -53,71 +48,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b, *c;
@@ -137,7 +67,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -162,7 +91,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -181,13 +110,13 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
SYR2K (&uplo, &trans, &m, &m, alpha, a, &m, b, &m, beta, c, &m );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops\n",

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef SYRK
@@ -53,71 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *c;
@@ -127,18 +56,20 @@ int main(int argc, char *argv[]){
char uplo='U';
char trans='N';
if ((p = getenv("OPENBLAS_UPLO"))) uplo=*p;
if ((p = getenv("OPENBLAS_TRANS"))) trans=*p;
blasint m, i, j;
blasint m, i, j, l;
int from = 1;
int to = 200;
int step = 1;
int loops = 1;
struct timeval start, stop;
double time1;
if ((p = getenv("OPENBLAS_LOOPS"))) loops=*p;
double time1,timeg;
argc--;argv++;
@@ -159,7 +90,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -167,9 +98,12 @@ int main(int argc, char *argv[]){
for(m = from; m <= to; m += step)
{
timeg = 0.;
fprintf(stderr, " %6d : ", (int)m);
for(l = 0; l < loops; l++) {
for(j = 0; j < m; j++){
for(i = 0; i < m * COMPSIZE; i++){
a[(long)i + (long)j * (long)m * COMPSIZE] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
@@ -177,14 +111,16 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
SYRK (&uplo, &trans, &m, &m, alpha, a, &m, beta, c, &m );
gettimeofday( &stop, (struct timezone *)0);
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
end();
timeg += getsec();
} //loops
time1 = timeg / (double)loops;
fprintf(stderr,
" %10.2f MFlops\n",
COMPSIZE * COMPSIZE * 1. * (double)m * (double)m * (double)m / time1 * 1.e-6);

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef TPMV
@@ -52,40 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size)
{
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1) {
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[])
{
@@ -112,7 +73,6 @@ int main(int argc, char *argv[])
int to = 200;
int step = 1;
struct timespec start = { 0, 0 }, stop = { 0, 0 };
double time1, timeg;
argc--;argv++;
@@ -132,7 +92,7 @@ int main(int argc, char *argv[])
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -153,11 +113,11 @@ int main(int argc, char *argv[])
}
for (l = 0; l < loops; l++) {
clock_gettime(CLOCK_REALTIME, &start);
begin();
TPMV (&uplo, &trans, &diag, &n, a, x, &inc_x);
clock_gettime(CLOCK_REALTIME, &stop);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_nsec - start.tv_nsec)) / 1.e9;
time1 = getsec();
timeg += time1;
}

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef TPSV
@@ -52,40 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size)
{
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1) {
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[])
{
@@ -112,7 +73,6 @@ int main(int argc, char *argv[])
int to = 200;
int step = 1;
struct timespec start = { 0, 0 }, stop = { 0, 0 };
double time1, timeg;
argc--;argv++;
@@ -132,7 +92,7 @@ int main(int argc, char *argv[])
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -153,11 +113,11 @@ int main(int argc, char *argv[])
}
for (l = 0; l < loops; l++) {
clock_gettime(CLOCK_REALTIME, &start);
begin();
TPSV (&uplo, &trans, &diag, &n, a, x, &inc_x);
clock_gettime(CLOCK_REALTIME, &stop);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_nsec - start.tv_nsec)) / 1.e9;
time1 = getsec();
timeg += time1;
}

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef TRMM
@@ -53,71 +48,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b;
@@ -141,7 +71,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -162,7 +91,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -180,13 +109,13 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
TRMM (&side, &uplo, &trans, &diag, &m, &m, alpha, a, &m, b, &m);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
fprintf(stderr,
" %10.2f MFlops %10.6f sec\n",

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef TRMV
@@ -52,40 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size)
{
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1) {
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[])
{
@@ -112,7 +73,6 @@ int main(int argc, char *argv[])
int to = 200;
int step = 1;
struct timespec start = { 0, 0 }, stop = { 0, 0 };
double time1, timeg;
argc--;argv++;
@@ -132,7 +92,7 @@ int main(int argc, char *argv[])
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -153,11 +113,11 @@ int main(int argc, char *argv[])
}
for (l = 0; l < loops; l++) {
clock_gettime(CLOCK_REALTIME, &start);
begin();
TRMV (&uplo, &trans, &diag, &n, a, &n, x, &inc_x);
clock_gettime(CLOCK_REALTIME, &stop);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_nsec - start.tv_nsec)) / 1.e9;
time1 = getsec();
timeg += time1;
}

View File

@@ -25,12 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef TRSM
@@ -53,71 +48,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b;
@@ -151,7 +81,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1;
argc--;argv++;
@@ -172,7 +101,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -196,13 +125,13 @@ int main(int argc, char *argv[]){
}
}
gettimeofday( &start, (struct timezone *)0);
begin();
TRSM (&side, &uplo, &trans, &diag, &m, &m, alpha, a, &m, b, &m);
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;
}

View File

@@ -25,14 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include <time.h>
#include "common.h"
#include "bench.h"
#undef GEMV
#undef TRSV
@@ -55,71 +48,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x;
@@ -133,7 +61,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timespec time_start, time_end;
time_t seconds = 0;
double time1,timeg;
@@ -159,7 +86,7 @@ int main(int argc, char *argv[]){
uplo,diag,loops);
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -189,19 +116,13 @@ int main(int argc, char *argv[]){
for(l =0;l< loops;l++){
clock_gettime(CLOCK_PROCESS_CPUTIME_ID,&time_start);
begin();
TRSV(&uplo,&transa,&diag,&n,a,&n,x,&inc_x);
clock_gettime(CLOCK_PROCESS_CPUTIME_ID,&time_end);
nanos = time_end.tv_nsec - time_start.tv_nsec;
seconds = time_end.tv_sec - time_start.tv_sec;
time1 = seconds + nanos /1.e9;
end();
time1 = getsec();
timeg += time1;
}
timeg /= loops;
long long muls = n*(n+1)/2.0;
long long adds = (n - 1.0)*n/2.0;

View File

@@ -25,90 +25,18 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#define RETURN_BY_STACK 1
#include "common.h"
#include "bench.h"
#define RETURN_BY_STACK 1
#undef DOT
#ifdef DOUBLE
#define DOT BLASFUNC(zdotu)
#else
#define DOT BLASFUNC(cdotu)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -123,7 +51,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -146,7 +73,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -170,13 +97,13 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
DOT (&result, &m, x, &inc_x, y, &inc_y );
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

View File

@@ -25,13 +25,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN32__
#include <sys/time.h>
#endif
#include "common.h"
#include "bench.h"
#undef DOT
@@ -42,72 +36,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define DOT BLASFUNC(cdotu)
#endif
#if defined(__WIN32__) || defined(__WIN64__)
#ifndef DELTA_EPOCH_IN_MICROSECS
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
int gettimeofday(struct timeval *tv, void *tz){
FILETIME ft;
unsigned __int64 tmpres = 0;
static int tzflag;
if (NULL != tv)
{
GetSystemTimeAsFileTime(&ft);
tmpres |= ft.dwHighDateTime;
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}
return 0;
}
#endif
#if !defined(__WIN32__) && !defined(__WIN64__) && !defined(__CYGWIN32__) && 0
static void *huge_malloc(BLASLONG size){
int shmid;
void *address;
#ifndef SHM_HUGETLB
#define SHM_HUGETLB 04000
#endif
if ((shmid =shmget(IPC_PRIVATE,
(size + HUGE_PAGESIZE) & ~(HUGE_PAGESIZE - 1),
SHM_HUGETLB | IPC_CREAT |0600)) < 0) {
printf( "Memory allocation failed(shmget).\n");
exit(1);
}
address = shmat(shmid, NULL, SHM_RND);
if ((BLASLONG)address == -1){
printf( "Memory allocation failed(shmat).\n");
exit(1);
}
shmctl(shmid, IPC_RMID, 0);
return address;
}
#define malloc huge_malloc
#endif
int main(int argc, char *argv[]){
FLOAT *x, *y;
@@ -122,7 +50,6 @@ int main(int argc, char *argv[]){
int to = 200;
int step = 1;
struct timeval start, stop;
double time1,timeg;
argc--;argv++;
@@ -145,7 +72,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif
@@ -169,15 +96,15 @@ int main(int argc, char *argv[]){
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
gettimeofday( &start, (struct timezone *)0);
begin();
#ifdef RETURN_BY_STACK
DOT (&result , &m, x, &inc_x, y, &inc_y );
#else
result = DOT (&m, x, &inc_x, y, &inc_y );
#endif
gettimeofday( &stop, (struct timezone *)0);
end();
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
time1 = getsec();
timeg += time1;

79
c_check
View File

@@ -1,14 +1,15 @@
#!/usr/bin/perl
#!/usr/bin/env perl
#use File::Basename;
# use File::Temp qw(tempfile);
# Checking cross compile
$hostos = `uname -s | sed -e s/\-.*//`; chop($hostos);
$hostarch = `uname -m | sed -e s/i.86/x86/`;chop($hostarch);
$hostarch = `uname -p` if ($hostos eq "AIX");
$hostarch = `uname -m | sed -e s/i.86/x86/`;
$hostarch = `uname -p` if ($hostos eq "AIX" || $hostos eq "SunOS");
chop($hostarch);
$hostarch = "x86_64" if ($hostarch eq "amd64");
$hostarch = "arm" if ($hostarch =~ /^arm.*/);
$hostarch = "arm" if ($hostarch ne "arm64" && $hostarch =~ /^arm.*/);
$hostarch = "arm64" if ($hostarch eq "aarch64");
$hostarch = "power" if ($hostarch =~ /^(powerpc|ppc).*/);
$hostarch = "zarch" if ($hostarch eq "s390x");
@@ -81,17 +82,19 @@ $os = Interix if ($data =~ /OS_INTERIX/);
$os = Android if ($data =~ /OS_ANDROID/);
$os = Haiku if ($data =~ /OS_HAIKU/);
$architecture = x86 if ($data =~ /ARCH_X86/);
$architecture = x86_64 if ($data =~ /ARCH_X86_64/);
$architecture = power if ($data =~ /ARCH_POWER/);
$architecture = mips if ($data =~ /ARCH_MIPS/);
$architecture = mips64 if ($data =~ /ARCH_MIPS64/);
$architecture = alpha if ($data =~ /ARCH_ALPHA/);
$architecture = sparc if ($data =~ /ARCH_SPARC/);
$architecture = ia64 if ($data =~ /ARCH_IA64/);
$architecture = arm if ($data =~ /ARCH_ARM/);
$architecture = arm64 if ($data =~ /ARCH_ARM64/);
$architecture = zarch if ($data =~ /ARCH_ZARCH/);
$architecture = x86 if ($data =~ /ARCH_X86/);
$architecture = x86_64 if ($data =~ /ARCH_X86_64/);
$architecture = power if ($data =~ /ARCH_POWER/);
$architecture = mips if ($data =~ /ARCH_MIPS/);
$architecture = mips64 if ($data =~ /ARCH_MIPS64/);
$architecture = alpha if ($data =~ /ARCH_ALPHA/);
$architecture = sparc if ($data =~ /ARCH_SPARC/);
$architecture = ia64 if ($data =~ /ARCH_IA64/);
$architecture = arm if ($data =~ /ARCH_ARM/);
$architecture = arm64 if ($data =~ /ARCH_ARM64/);
$architecture = zarch if ($data =~ /ARCH_ZARCH/);
$architecture = riscv64 if ($data =~ /ARCH_RISCV64/);
$architecture = loongarch64 if ($data =~ /ARCH_LOONGARCH64/);
$defined = 0;
@@ -136,6 +139,16 @@ if (($architecture eq "x86") && ($os ne Darwin) && ($os ne SunOS)) {
$binary =32;
}
if ($architecture eq "riscv64") {
$defined = 1;
$binary = 64;
}
if ($architecture eq "loongarch64") {
$defined = 1;
$binary = 64;
}
if ($compiler eq "PGI") {
$compiler_name .= " -tp p7" if ($binary eq "32");
$compiler_name .= " -tp p7-64" if ($binary eq "64");
@@ -192,7 +205,7 @@ if (($architecture eq "mips") || ($architecture eq "mips64")) {
} else {
$tmpf = new File::Temp( SUFFIX => '.c' , UNLINK => 1 );
$code = '"addvi.b $w0, $w1, 1"';
$msa_flags = "-mmsa -mfp64 -msched-weight -mload-store-pairs";
$msa_flags = "-mmsa -mfp64 -mload-store-pairs";
print $tmpf "#include <msa.h>\n\n";
print $tmpf "void main(void){ __asm__ volatile($code); }\n";
@@ -208,17 +221,18 @@ if (($architecture eq "mips") || ($architecture eq "mips64")) {
}
}
$architecture = x86 if ($data =~ /ARCH_X86/);
$architecture = x86_64 if ($data =~ /ARCH_X86_64/);
$architecture = power if ($data =~ /ARCH_POWER/);
$architecture = mips if ($data =~ /ARCH_MIPS/);
$architecture = mips64 if ($data =~ /ARCH_MIPS64/);
$architecture = alpha if ($data =~ /ARCH_ALPHA/);
$architecture = sparc if ($data =~ /ARCH_SPARC/);
$architecture = ia64 if ($data =~ /ARCH_IA64/);
$architecture = arm if ($data =~ /ARCH_ARM/);
$architecture = arm64 if ($data =~ /ARCH_ARM64/);
$architecture = zarch if ($data =~ /ARCH_ZARCH/);
$architecture = x86 if ($data =~ /ARCH_X86/);
$architecture = x86_64 if ($data =~ /ARCH_X86_64/);
$architecture = power if ($data =~ /ARCH_POWER/);
$architecture = mips if ($data =~ /ARCH_MIPS/);
$architecture = mips64 if ($data =~ /ARCH_MIPS64/);
$architecture = alpha if ($data =~ /ARCH_ALPHA/);
$architecture = sparc if ($data =~ /ARCH_SPARC/);
$architecture = ia64 if ($data =~ /ARCH_IA64/);
$architecture = arm if ($data =~ /ARCH_ARM/);
$architecture = arm64 if ($data =~ /ARCH_ARM64/);
$architecture = zarch if ($data =~ /ARCH_ZARCH/);
$architecture = loongarch64 if ($data =~ /ARCH_LOONGARCH64/);
$binformat = bin32;
$binformat = bin64 if ($data =~ /BINARY_64/);
@@ -270,6 +284,15 @@ if ($data =~ /HAVE_C11/) {
}
}
if ($compiler eq "GCC" &&( ($architecture eq "x86") || ($architecture eq "x86_64"))) {
$no_avx2 = 0;
$oldgcc = 0;
$data = `$compiler_name -dumpversion`;
if ($data <= 4.6) {
$no_avx2 = 1;
$oldgcc = 1;
}
}
$data = `$compiler_name $flags -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`;
@@ -362,6 +385,8 @@ print MAKEFILE "CEXTRALIB=$linker_L $linker_l $linker_a\n";
print MAKEFILE "HAVE_MSA=1\n" if $have_msa eq 1;
print MAKEFILE "MSA_FLAGS=$msa_flags\n" if $have_msa eq 1;
print MAKEFILE "NO_AVX512=1\n" if $no_avx512 eq 1;
print MAKEFILE "NO_AVX2=1\n" if $no_avx2 eq 1;
print MAKEFILE "OLDGCC=1\n" if $oldgcc eq 1;
$os =~ tr/[a-z]/[A-Z]/;
$architecture =~ tr/[a-z]/[A-Z]/;

30
cblas.h
View File

@@ -125,9 +125,14 @@ void cblas_zswap(OPENBLAS_CONST blasint n, void *x, OPENBLAS_CONST blasint incx,
void cblas_srot(OPENBLAS_CONST blasint N, float *X, OPENBLAS_CONST blasint incX, float *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float c, OPENBLAS_CONST float s);
void cblas_drot(OPENBLAS_CONST blasint N, double *X, OPENBLAS_CONST blasint incX, double *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double c, OPENBLAS_CONST double s);
void cblas_csrot(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float c, OPENBLAS_CONST float s);
void cblas_zdrot(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double c, OPENBLAS_CONST double s);
void cblas_srotg(float *a, float *b, float *c, float *s);
void cblas_drotg(double *a, double *b, double *c, double *s);
void cblas_crotg(void *a, void *b, float *c, void *s);
void cblas_zrotg(void *a, void *b, double *c, void *s);
void cblas_srotm(OPENBLAS_CONST blasint N, float *X, OPENBLAS_CONST blasint incX, float *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float *P);
void cblas_drotm(OPENBLAS_CONST blasint N, double *X, OPENBLAS_CONST blasint incX, double *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double *P);
@@ -382,18 +387,21 @@ void cblas_cgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint
void cblas_zgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double *calpha, double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double *cbeta,
double *c, OPENBLAS_CONST blasint cldc);
void cblas_sgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST float * alpha_array, OPENBLAS_CONST float ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST float ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST float * beta_array, float ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_dgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST double * alpha_array, OPENBLAS_CONST double ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST double ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST double * beta_array, double ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_cgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST void * alpha_array, OPENBLAS_CONST void ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST void ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST void * beta_array, void ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_zgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST void * alpha_array, OPENBLAS_CONST void ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST void ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST void * beta_array, void ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
/*** BFLOAT16 and INT8 extensions ***/
/* convert float array to BFLOAT16 array by rounding */
void cblas_sbstobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
/* convert double array to BFLOAT16 array by rounding */
void cblas_sbdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
/* convert BFLOAT16 array to float array */
void cblas_sbf16tos(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, float *out, OPENBLAS_CONST blasint incout);
/* convert BFLOAT16 array to double array */
void cblas_dbf16tod(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, double *out, OPENBLAS_CONST blasint incout);
/* dot production of BFLOAT16 input arrays, and output as float */
float cblas_sbdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 *y, OPENBLAS_CONST blasint incy);
void cblas_sbgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
void cblas_sbgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@@ -1,4 +1,3 @@
##
## Author: Hank Anderson <hank@statease.com>
## Description: Ported from portion of OpenBLAS/Makefile.system
## Sets various variables based on architecture.
@@ -45,11 +44,15 @@ endif ()
if (DYNAMIC_ARCH)
if (ARM64)
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA55 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
if (DYNAMIC_LIST)
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
endif ()
endif ()
if (POWER)
set(DYNAMIC_CORE POWER6 POWER8 POWER9 POWER10)
set(CCOMMON_OPT "${CCOMMON_OPT} -DHAVE_P10_SUPPORT")
endif ()
if (X86)
@@ -80,10 +83,14 @@ if (DYNAMIC_ARCH)
string(REGEX REPLACE "-march=native" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif ()
if (DYNAMIC_LIST)
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
endif ()
endif ()
if (EXISTS ${PROJECT_SOURCE_DIR}/config_kernel.h)
message (FATAL_ERROR "Your build directory contains a file config_kernel.h, probably from a previous compilation with make. This will conflict with the cmake compilation and cause strange compiler errors - please remove the file before trying again")
endif ()
if (NOT DYNAMIC_CORE)
message (STATUS "DYNAMIC_ARCH is not supported on this architecture, removing from options")
unset(DYNAMIC_ARCH CACHE)
@@ -106,6 +113,10 @@ if (MIPS64)
set(NO_BINARY_MODE 1)
endif ()
if (LOONGARCH64)
set(NO_BINARY_MODE 1)
endif ()
if (${ARCH} STREQUAL "alpha")
set(NO_BINARY_MODE 1)
set(BINARY_DEFINED 1)

View File

@@ -29,6 +29,15 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "LS
set(FCOMMON_OPT "${FCOMMON_OPT} -march=mips64")
endif ()
if (LOONGARCH64)
if (BINARY64)
set(CCOMMON_OPT "${CCOMMON_OPT} -mabi=lp64")
else ()
set(CCOMMON_OPT "${CCOMMON_OPT} -mabi=lp32")
endif ()
set(BINARY_DEFINED 1)
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
set(BINARY_DEFINED 1)
endif ()
@@ -96,7 +105,7 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "SUN")
endif ()
endif ()
if (${CORE} STREQUAL "SKYLAKEX")
if (${CORE} STREQUAL SKYLAKEX)
if (NOT DYNAMIC_ARCH)
if (NOT NO_AVX512)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
@@ -104,15 +113,42 @@ if (${CORE} STREQUAL "SKYLAKEX")
endif ()
endif ()
if (${CORE} STREQUAL "COOPERLAKE")
if (${CORE} STREQUAL COOPERLAKE)
if (NOT DYNAMIC_ARCH)
if (NOT NO_AVX512)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL 10.1)
set (CCOMMON_OPT = "${CCOMMON_OPT} -march=cooperlake")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=cooperlake")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
endif()
endif ()
endif ()
endif ()
if (NOT DYNAMIC_ARCH)
if (HAVE_AVX2)
set (CCOMMON_OPT "${CCOMMON_OPT} -mavx2")
endif ()
if (HAVE_AVX)
set (CCOMMON_OPT "${CCOMMON_OPT} -mavx")
endif ()
# if (HAVE_FMA3)
#set (CCOMMON_OPT "${CCOMMON_OPT} -mfma")
#endif ()
if (HAVE_SSE)
set (CCOMMON_OPT "${CCOMMON_OPT} -msse")
endif ()
if (HAVE_SSE2)
set (CCOMMON_OPT "${CCOMMON_OPT} -msse2")
endif ()
if (HAVE_SSE3)
set (CCOMMON_OPT "${CCOMMON_OPT} -msse3")
endif ()
if (HAVE_SSSE3)
set (CCOMMON_OPT "${CCOMMON_OPT} -mssse3")
endif ()
if (HAVE_SSE4_1)
set (CCOMMON_OPT "${CCOMMON_OPT} -msse4.1")
endif ()
endif()

View File

@@ -61,6 +61,13 @@ if (${F_COMPILER} STREQUAL "GFORTRAN")
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=n32")
endif ()
endif ()
if (LOONGARCH64)
if (BINARY64)
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64")
else ()
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp32")
endif ()
endif ()
else ()
if (BINARY64)
set(FCOMMON_OPT "${FCOMMON_OPT} -m64")
@@ -97,7 +104,7 @@ endif ()
if (${F_COMPILER} STREQUAL "IBM")
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_IBM")
# FCOMMON_OPT += -qarch=440
set(FCOMMON_OPT "${FCOMMON_OPT} -qrecur")
if (BINARY64)
set(FCOMMON_OPT "${FCOMMON_OPT} -q64")
if (INTERFACE64)

View File

@@ -113,7 +113,7 @@ macro(SetDefaultL1)
set(ZSUMKERNEL zsum.S)
set(QSUMKERNEL sum.S)
set(XSUMKERNEL zsum.S)
if (BUILD_HALF)
if (BUILD_BFLOAT16)
set(SHAMINKERNEL ../arm/amin.c)
set(SHAMAXKERNEL ../arm/amax.c)
set(SHMAXKERNEL ../arm/max.c)
@@ -126,12 +126,16 @@ if (BUILD_HALF)
set(SHAXPYKERNEL ../arm/axpy.c)
set(SHAXPBYKERNEL ../arm/axpby.c)
set(SHCOPYKERNEL ../arm/copy.c)
set(SHDOTKERNEL ../arm/dot.c)
set(SBDOTKERNEL ../x86_64/sbdot.c)
set(SHROTKERNEL ../arm/rot.c)
set(SHSCALKERNEL ../arm/scal.c)
set(SHNRM2KERNEL ../arm/nrm2.c)
set(SHSUMKERNEL ../arm/sum.c)
set(SHSWAPKERNEL ../arm/swap.c)
set(TOBF16KERNEL ../x86_64/tobf16.c)
set(BF16TOKERNEL ../x86_64/bf16to.c)
set(SBGEMVNKERNEL ../x86_64/sbgemv_n.c)
set(SBGEMVTKERNEL ../x86_64/sbgemv_t.c)
endif ()
endmacro ()
@@ -181,9 +185,9 @@ macro(SetDefaultL2)
set(XHEMV_L_KERNEL ../generic/zhemv_k.c)
set(XHEMV_V_KERNEL ../generic/zhemv_k.c)
set(XHEMV_M_KERNEL ../generic/zhemv_k.c)
if (BUILD_HALF)
set(SHGEMVNKERNEL ../arm/gemv_n.c)
set(SHGEMVTKERNEL ../arm/gemv_t.c)
if (BUILD_BFLOAT16)
set(SBGEMVNKERNEL ../x86_64/sbgemv_n.c)
set(SBGEMVTKERNEL ../x86_64/sbgemv_t.c)
set(SHGERKERNEL ../generic/ger.c)
endif ()
endmacro ()
@@ -193,18 +197,18 @@ macro(SetDefaultL3)
set(DGEADD_KERNEL ../generic/geadd.c)
set(CGEADD_KERNEL ../generic/zgeadd.c)
set(ZGEADD_KERNEL ../generic/zgeadd.c)
if (BUILD_HALF)
if (BUILD_BFLOAT16)
set(SHGEADD_KERNEL ../generic/geadd.c)
set(SHGEMMKERNEL ../generic/gemmkernel_2x2.c)
set(SHGEMM_BETA ../generic/gemm_beta.c)
set(SHGEMMINCOPY ../generic/gemm_ncopy_2.c)
set(SHGEMMITCOPY ../generic/gemm_tcopy_2.c)
set(SHGEMMONCOPY ../generic/gemm_ncopy_2.c)
set(SHGEMMOTCOPY ../generic/gemm_tcopy_2.c)
set(SHGEMMINCOPYOBJ shgemm_incopy.o)
set(SHGEMMITCOPYOBJ shgemm_itcopy.o)
set(SHGEMMONCOPYOBJ shgemm_oncopy.o)
set(SHGEMMOTCOPYOBJ shgemm_otcopy.o)
set(SBGEMMKERNEL ../generic/gemmkernel_2x2.c)
set(SBGEMM_BETA ../generic/gemm_beta.c)
set(SBGEMMINCOPY ../generic/gemm_ncopy_2.c)
set(SBGEMMITCOPY ../generic/gemm_tcopy_2.c)
set(SBGEMMONCOPY ../generic/gemm_ncopy_2.c)
set(SBGEMMOTCOPY ../generic/gemm_tcopy_2.c)
set(SBGEMMINCOPYOBJ sbgemm_incopy.o)
set(SBGEMMITCOPYOBJ sbgemm_itcopy.o)
set(SBGEMMONCOPYOBJ sbgemm_oncopy.o)
set(SBGEMMOTCOPYOBJ sbgemm_otcopy.o)
endif ()
endmacro ()

View File

@@ -1,11 +1,12 @@
# Sources for compiling lapack-netlib. Can't use CMakeLists.txt because lapack-netlib already has its own cmake files.
set(ALLAUX ilaenv.f ilaenv2stage.f ieeeck.f lsamen.f iparmq.f iparam2stage.F
ilaprec.f ilatrans.f ilauplo.f iladiag.f chla_transtype.f
ilaprec.f ilatrans.f ilauplo.f iladiag.f chla_transtype.f dlaset.f
../INSTALL/ilaver.f xerbla_array.f
../INSTALL/slamch.f)
set(SCLAUX
scombssq.f sbdsvdx.f sstevx.f sstein.f
sbdsdc.f
sbdsqr.f sdisna.f slabad.f slacpy.f sladiv.f slae2.f slaebz.f
slaed0.f slaed1.f slaed2.f slaed3.f slaed4.f slaed5.f slaed6.f
@@ -25,6 +26,7 @@ set(SCLAUX
set(DZLAUX
dbdsdc.f
dbdsvdx.f dstevx.f dstein.f
dbdsqr.f ddisna.f dlabad.f dlacpy.f dladiv.f dlae2.f dlaebz.f
dlaed0.f dlaed1.f dlaed2.f dlaed3.f dlaed4.f dlaed5.f dlaed6.f
dlaed7.f dlaed8.f dlaed9.f dlaeda.f dlaev2.f dlagtf.f
@@ -35,14 +37,14 @@ set(DZLAUX
dlartg.f dlaruv.f dlas2.f dlascl.f
dlasd0.f dlasd1.f dlasd2.f dlasd3.f dlasd4.f dlasd5.f dlasd6.f
dlasd7.f dlasd8.f dlasda.f dlasdq.f dlasdt.f
dlaset.f dlasq1.f dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f
dlasq1.f dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f
dlasr.f dlasrt.f dlassq.f dlasv2.f dpttrf.f dstebz.f dstedc.f
dsteqr.f dsterf.f dlaisnan.f disnan.f
dlartgp.f dlartgs.f
../INSTALL/dlamch.f ../INSTALL/dsecnd_${TIMER}.f)
set(SLASRC
sbdsvdx.f sgbbrd.f sgbcon.f sgbequ.f sgbrfs.f sgbsv.f
sgbbrd.f sgbcon.f sgbequ.f sgbrfs.f sgbsv.f
sgbsvx.f sgbtf2.f sgbtrf.f sgbtrs.f sgebak.f sgebal.f sgebd2.f
sgebrd.f sgecon.f sgeequ.f sgees.f sgeesx.f sgeev.f sgeevx.f
sgehd2.f sgehrd.f sgelq2.f sgelqf.f
@@ -64,7 +66,7 @@ set(SLASRC
slaqgb.f slaqge.f slaqp2.f slaqps.f slaqsb.f slaqsp.f slaqsy.f
slaqr0.f slaqr1.f slaqr2.f slaqr3.f slaqr4.f slaqr5.f
slaqtr.f slar1v.f slar2v.f ilaslr.f ilaslc.f
slarf.f slarfb.f slarfg.f slarfgp.f slarft.f slarfx.f slarfy.f slargv.f
slarf.f slarfb.f slarfb_gett.f slarfg.f slarfgp.f slarft.f slarfx.f slarfy.f slargv.f
slarrv.f slartv.f
slarz.f slarzb.f slarzt.f slasy2.f
slasyf.f slasyf_rook.f slasyf_rk.f slasyf_aa.f
@@ -83,8 +85,8 @@ set(SLASRC
ssbev.f ssbevd.f ssbevx.f ssbgst.f ssbgv.f ssbgvd.f ssbgvx.f
ssbtrd.f sspcon.f sspev.f sspevd.f sspevx.f sspgst.f
sspgv.f sspgvd.f sspgvx.f ssprfs.f sspsv.f sspsvx.f ssptrd.f
ssptrf.f ssptri.f ssptrs.f sstegr.f sstein.f sstev.f sstevd.f sstevr.f
sstevx.f ssycon.f ssyev.f ssyevd.f ssyevr.f ssyevx.f ssygs2.f
ssptrf.f ssptri.f ssptrs.f sstegr.f sstev.f sstevd.f sstevr.f
ssycon.f ssyev.f ssyevd.f ssyevr.f ssyevx.f ssygs2.f
ssygst.f ssygv.f ssygvd.f ssygvx.f ssyrfs.f ssysv.f ssysvx.f
ssytd2.f ssytf2.f ssytrd.f ssytrf.f ssytri.f ssytri2.f ssytri2x.f
ssyswapr.f ssytrs.f ssytrs2.f
@@ -110,14 +112,14 @@ set(SLASRC
sgeqrt.f sgeqrt2.f sgeqrt3.f sgemqrt.f
stpqrt.f stpqrt2.f stpmqrt.f stprfb.f
sgelqt.f sgelqt3.f sgemlqt.f
sgetsls.f sgeqr.f slatsqr.f slamtsqr.f sgemqr.f
sgetsls.f sgetsqrhrt.f sgeqr.f slatsqr.f slamtsqr.f sgemqr.f
sgelq.f slaswlq.f slamswlq.f sgemlq.f
stplqt.f stplqt2.f stpmlqt.f
ssytrd_2stage.f ssytrd_sy2sb.f ssytrd_sb2st.F ssb2st_kernels.f
ssyevd_2stage.f ssyev_2stage.f ssyevx_2stage.f ssyevr_2stage.f
ssbev_2stage.f ssbevx_2stage.f ssbevd_2stage.f ssygv_2stage.f
scombssq.f sgesvdq.f slaorhr_col_getrfnp.f
slaorhr_col_getrfnp2.f sorgtsqr.f sorhr_col.f )
sgesvdq.f slaorhr_col_getrfnp.f
slaorhr_col_getrfnp2.f sorgtsqr.f sorgtsqr_row.f sorhr_col.f )
set(SXLASRC sgesvxx.f sgerfsx.f sla_gerfsx_extended.f sla_geamv.f
sla_gercond.f sla_gerpvgrw.f ssysvxx.f ssyrfsx.f
@@ -169,7 +171,7 @@ set(CLASRC
claqhb.f claqhe.f claqhp.f claqp2.f claqps.f claqsb.f
claqr0.f claqr1.f claqr2.f claqr3.f claqr4.f claqr5.f
claqsp.f claqsy.f clar1v.f clar2v.f ilaclr.f ilaclc.f
clarf.f clarfb.f clarfg.f clarfgp.f clarft.f
clarf.f clarfb.f clarfb_gett.f clarfg.f clarfgp.f clarft.f
clarfx.f clarfy.f clargv.f clarnv.f clarrv.f clartg.f clartv.f
clarz.f clarzb.f clarzt.f clascl.f claset.f clasr.f classq.f
clasyf.f clasyf_rook.f clasyf_rk.f clasyf_aa.f
@@ -207,14 +209,14 @@ set(CLASRC
cgeqrt.f cgeqrt2.f cgeqrt3.f cgemqrt.f
ctpqrt.f ctpqrt2.f ctpmqrt.f ctprfb.f
cgelqt.f cgelqt3.f cgemlqt.f
cgetsls.f cgeqr.f clatsqr.f clamtsqr.f cgemqr.f
cgetsls.f cgetsqrhrt.f cgeqr.f clatsqr.f clamtsqr.f cgemqr.f
cgelq.f claswlq.f clamswlq.f cgemlq.f
ctplqt.f ctplqt2.f ctpmlqt.f
chetrd_2stage.f chetrd_he2hb.f chetrd_hb2st.F chb2st_kernels.f
cheevd_2stage.f cheev_2stage.f cheevx_2stage.f cheevr_2stage.f
chbev_2stage.f chbevx_2stage.f chbevd_2stage.f chegv_2stage.f
cgesvdq.f claunhr_col_getrfnp.f claunhr_col_getrfnp2.f
cungtsqr.f cunhr_col.f )
cungtsqr.f cungtsqr_row.f cunhr_col.f )
set(CXLASRC cgesvxx.f cgerfsx.f cla_gerfsx_extended.f cla_geamv.f
cla_gercond_c.f cla_gercond_x.f cla_gerpvgrw.f
@@ -229,7 +231,7 @@ set(CXLASRC cgesvxx.f cgerfsx.f cla_gerfsx_extended.f cla_geamv.f
cla_lin_berr.f clarscl2.f clascl2.f cla_wwaddw.f)
set(DLASRC
dbdsvdx.f dgbbrd.f dgbcon.f dgbequ.f dgbrfs.f dgbsv.f
dgbbrd.f dgbcon.f dgbequ.f dgbrfs.f dgbsv.f
dgbsvx.f dgbtf2.f dgbtrf.f dgbtrs.f dgebak.f dgebal.f dgebd2.f
dgebrd.f dgecon.f dgeequ.f dgees.f dgeesx.f dgeev.f dgeevx.f
dgehd2.f dgehrd.f dgelq2.f dgelqf.f
@@ -251,7 +253,7 @@ set(DLASRC
dlaqgb.f dlaqge.f dlaqp2.f dlaqps.f dlaqsb.f dlaqsp.f dlaqsy.f
dlaqr0.f dlaqr1.f dlaqr2.f dlaqr3.f dlaqr4.f dlaqr5.f
dlaqtr.f dlar1v.f dlar2v.f iladlr.f iladlc.f
dlarf.f dlarfb.f dlarfg.f dlarfgp.f dlarft.f dlarfx.f dlarfy.f
dlarf.f dlarfb.f dlarfb_gett.f dlarfg.f dlarfgp.f dlarft.f dlarfx.f dlarfy.f
dlargv.f dlarrv.f dlartv.f
dlarz.f dlarzb.f dlarzt.f dlasy2.f
dlasyf.f dlasyf_rook.f dlasyf_rk.f dlasyf_aa.f
@@ -270,8 +272,8 @@ set(DLASRC
dsbev.f dsbevd.f dsbevx.f dsbgst.f dsbgv.f dsbgvd.f dsbgvx.f
dsbtrd.f dspcon.f dspev.f dspevd.f dspevx.f dspgst.f
dspgv.f dspgvd.f dspgvx.f dsprfs.f dspsv.f dspsvx.f dsptrd.f
dsptrf.f dsptri.f dsptrs.f dstegr.f dstein.f dstev.f dstevd.f dstevr.f
dstevx.f dsycon.f dsyev.f dsyevd.f dsyevr.f
dsptrf.f dsptri.f dsptrs.f dstegr.f dstev.f dstevd.f dstevr.f
dsycon.f dsyev.f dsyevd.f dsyevr.f
dsyevx.f dsygs2.f dsygst.f dsygv.f dsygvd.f dsygvx.f dsyrfs.f
dsysv.f dsysvx.f
dsytd2.f dsytf2.f dsytrd.f dsytrf.f dsytri.f dsytrs.f dsytrs2.f
@@ -298,14 +300,14 @@ set(DLASRC
dgeqrt.f dgeqrt2.f dgeqrt3.f dgemqrt.f
dtpqrt.f dtpqrt2.f dtpmqrt.f dtprfb.f
dgelqt.f dgelqt3.f dgemlqt.f
dgetsls.f dgeqr.f dlatsqr.f dlamtsqr.f dgemqr.f
dgetsls.f dgetsqrhrt.f dgeqr.f dlatsqr.f dlamtsqr.f dgemqr.f
dgelq.f dlaswlq.f dlamswlq.f dgemlq.f
dtplqt.f dtplqt2.f dtpmlqt.f
dsytrd_2stage.f dsytrd_sy2sb.f dsytrd_sb2st.F dsb2st_kernels.f
dsyevd_2stage.f dsyev_2stage.f dsyevx_2stage.f dsyevr_2stage.f
dsbev_2stage.f dsbevx_2stage.f dsbevd_2stage.f dsygv_2stage.f
dcombssq.f dgesvdq.f dlaorhr_col_getrfnp.f
dlaorhr_col_getrfnp2.f dorgtsqr.f dorhr_col.f )
dlaorhr_col_getrfnp2.f dorgtsqr.f dorgtsqr_row.f dorhr_col.f )
set(DXLASRC dgesvxx.f dgerfsx.f dla_gerfsx_extended.f dla_geamv.f
dla_gercond.f dla_gerpvgrw.f dsysvxx.f dsyrfsx.f
@@ -358,7 +360,7 @@ set(ZLASRC
zlaqhb.f zlaqhe.f zlaqhp.f zlaqp2.f zlaqps.f zlaqsb.f
zlaqr0.f zlaqr1.f zlaqr2.f zlaqr3.f zlaqr4.f zlaqr5.f
zlaqsp.f zlaqsy.f zlar1v.f zlar2v.f ilazlr.f ilazlc.f
zlarcm.f zlarf.f zlarfb.f
zlarcm.f zlarf.f zlarfb.f zlarfb_gett.f
zlarfg.f zlarfgp.f zlarft.f
zlarfx.f zlarfy.f zlargv.f zlarnv.f zlarrv.f zlartg.f zlartv.f
zlarz.f zlarzb.f zlarzt.f zlascl.f zlaset.f zlasr.f
@@ -400,13 +402,13 @@ set(ZLASRC
ztpqrt.f ztpqrt2.f ztpmqrt.f ztprfb.f
ztplqt.f ztplqt2.f ztpmlqt.f
zgelqt.f zgelqt3.f zgemlqt.f
zgetsls.f zgeqr.f zlatsqr.f zlamtsqr.f zgemqr.f
zgetsls.f zgetsqrhrt.f zgeqr.f zlatsqr.f zlamtsqr.f zgemqr.f
zgelq.f zlaswlq.f zlamswlq.f zgemlq.f
zhetrd_2stage.f zhetrd_he2hb.f zhetrd_hb2st.F zhb2st_kernels.f
zheevd_2stage.f zheev_2stage.f zheevx_2stage.f zheevr_2stage.f
zhbev_2stage.f zhbevx_2stage.f zhbevd_2stage.f zhegv_2stage.f
zgesvdq.f zlaunhr_col_getrfnp.f zlaunhr_col_getrfnp2.f
zungtsqr.f zunhr_col.f)
zungtsqr.f zungtsqr_row.f zunhr_col.f)
set(ZXLASRC zgesvxx.f zgerfsx.f zla_gerfsx_extended.f zla_geamv.f
zla_gercond_c.f zla_gercond_x.f zla_gerpvgrw.f zsysvxx.f zsyrfsx.f
@@ -474,12 +476,16 @@ endif()
if(BUILD_COMPLEX)
set(LA_REL_SRC ${LA_REL_SRC} ${CLASRC} ${ZCLASRC} ${ALLAUX} ${SCLAUX})
SET(LA_GEN_SRC ${LA_GEN_SRC} ${CMATGEN} ${SCATGEN})
message(STATUS "Building Complex Precision")
message(STATUS "Building Single Precision Complex")
endif()
if(BUILD_COMPLEX16)
set(LA_REL_SRC ${LA_REL_SRC} ${ZLASRC} ${ZCLASRC} ${ALLAUX} ${DZLAUX})
SET(LA_GEN_SRC ${LA_GEN_SRC} ${ZMATGEN} ${DZATGEN})
message(STATUS "Building Double Complex Precision")
# for zlange/zlanhe
if (NOT BUILD_DOUBLE)
set (LA_REL_SRC ${LA_REL_SRC} dcombssq.f)
endif ()
message(STATUS "Building Double Precision Complex")
endif()
# add lapack-netlib folder to the sources

View File

@@ -114,6 +114,8 @@ set(CSRC
lapacke_cgetrs_work.c
lapacke_cgetsls.c
lapacke_cgetsls_work.c
lapacke_cgetsqrhrt.c
lapacke_cgetsqrhrt_work.c
lapacke_cggbak.c
lapacke_cggbak_work.c
lapacke_cggbal.c
@@ -590,6 +592,8 @@ set(CSRC
lapacke_cungrq_work.c
lapacke_cungtr.c
lapacke_cungtr_work.c
lapacke_cungtsqr_row.c
lapacke_cungtsqr_row_work.c
lapacke_cunmbr.c
lapacke_cunmbr_work.c
lapacke_cunmhr.c
@@ -735,6 +739,8 @@ set(DSRC
lapacke_dgetrs_work.c
lapacke_dgetsls.c
lapacke_dgetsls_work.c
lapacke_dgetsqrhrt.c
lapacke_dgetsqrhrt_work.c
lapacke_dggbak.c
lapacke_dggbak_work.c
lapacke_dggbal.c
@@ -862,6 +868,8 @@ set(DSRC
lapacke_dorgrq_work.c
lapacke_dorgtr.c
lapacke_dorgtr_work.c
lapacke_dorgtsqr_row.c
lapacke_dorgtsqr_row_work.c
lapacke_dormbr.c
lapacke_dormbr_work.c
lapacke_dormhr.c
@@ -1309,6 +1317,8 @@ set(SSRC
lapacke_sgetrs_work.c
lapacke_sgetsls.c
lapacke_sgetsls_work.c
lapacke_sgetsqrhrt.c
lapacke_sgetsqrhrt_work.c
lapacke_sggbak.c
lapacke_sggbak_work.c
lapacke_sggbal.c
@@ -1435,6 +1445,8 @@ set(SSRC
lapacke_sorgrq_work.c
lapacke_sorgtr.c
lapacke_sorgtr_work.c
lapacke_sorgtsqr_row.c
lapacke_sorgtsqr_row_work.c
lapacke_sormbr.c
lapacke_sormbr_work.c
lapacke_sormhr.c
@@ -1877,6 +1889,8 @@ set(ZSRC
lapacke_zgetrs_work.c
lapacke_zgetsls.c
lapacke_zgetsls_work.c
lapacke_zgetsqrhrt.c
lapacke_zgetsqrhrt_work.c
lapacke_zggbak.c
lapacke_zggbak_work.c
lapacke_zggbal.c
@@ -2351,6 +2365,8 @@ set(ZSRC
lapacke_zungrq_work.c
lapacke_zungtr.c
lapacke_zungtr_work.c
lapacke_zungtsqr_row.c
lapacke_zungtsqr_row_work.c
lapacke_zunmbr.c
lapacke_zunmbr_work.c
lapacke_zunmhr.c
@@ -2499,6 +2515,5 @@ foreach (Utils_FILE ${Utils_SRC})
endforeach ()
set(lapacke_include_dir "${NETLIB_LAPACK_DIR}/LAPACKE/include")
configure_file("${lapacke_include_dir}/lapacke_mangling_with_flags.h.in" "${lapacke_include_dir}/lapacke_mangling.h" COPYONLY)
include_directories(${lapacke_include_dir})
set_source_files_properties(${LAPACKE_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS}")

View File

@@ -84,6 +84,14 @@ if (X86)
set(NO_EXPRECISION 1)
endif ()
if (DYNAMIC_ARCH)
if (TARGET)
if (${TARGET} STREQUAL "GENERIC")
set(NO_EXPRECISION 1)
endif ()
endif ()
endif ()
if (UTEST_CHECK)
set(CCOMMON_OPT "${CCOMMON_OPT} -DUTEST_CHECK")
set(SANITY_CHECK 1)

View File

@@ -16,8 +16,8 @@
# HAVE_SSE2
# HAVE_SSE3
# MAKE
# SHGEMM_UNROLL_M
# SHGEMM_UNROLL_N
# SBGEMM_UNROLL_M
# SBGEMM_UNROLL_N
# SGEMM_UNROLL_M
# SGEMM_UNROLL_N
# DGEMM_UNROLL_M
@@ -177,7 +177,7 @@ if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSS
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "CORTEXA57" OR "${TCORE}" STREQUAL "CORTEXA53")
elseif ("${TCORE}" STREQUAL "CORTEXA57" OR "${TCORE}" STREQUAL "CORTEXA53" OR "${TCORE}" STREQUAL "CORTEXA55")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_CODE_SIZE\t32768\n"
"#define L1_CODE_LINESIZE\t64\n"
@@ -416,6 +416,29 @@ endif ()
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "VORTEX")
file(APPEND ${TARGET_CONF_TEMP}
"#define ARMV8\n"
"#define L1_CODE_SIZE\t32768\n"
"#define L1_CODE_LINESIZE\t64\n"
"#define L1_CODE_ASSOCIATIVE\t4\n"
"#define L1_DATA_SIZE\t32768\n"
"#define L1_DATA_LINESIZE\t64\n"
"#define L1_DATA_ASSOCIATIVE\t4\n"
"#define L2_SIZE\t5262144\n"
"#define L2_LINESIZE\t64\n"
"#define L2_ASSOCIATIVE\t8\n"
"#define DTB_DEFAULT_ENTRIES\t64\n"
"#define DTB_SIZE\t4096\n")
set(SGEMM_UNROLL_M 16)
set(SGEMM_UNROLL_N 4)
set(DGEMM_UNROLL_M 8)
set(DGEMM_UNROLL_N 4)
set(CGEMM_UNROLL_M 8)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "POWER6")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE 32768\n"
@@ -471,8 +494,8 @@ endif ()
set(ZGEMM_UNROLL_N 2)
set(SYMV_P 8)
endif()
set(SHGEMM_UNROLL_M 8)
set(SHGEMM_UNROLL_N 4)
set(SBGEMM_UNROLL_M 8)
set(SBGEMM_UNROLL_N 4)
# Or should this actually be NUM_CORES?
if (${NUM_THREADS} GREATER 0)
@@ -533,6 +556,21 @@ else(NOT CMAKE_CROSSCOMPILING)
MESSAGE(FATAL_ERROR "Compiling getarch failed ${GETARCH_LOG}")
endif ()
endif ()
unset (HAVE_AVX2)
unset (HAVE_AVX)
unset (HAVE_FMA3)
unset (HAVE_MMX)
unset (HAVE_SSE)
unset (HAVE_SSE2)
unset (HAVE_SSE3)
unset (HAVE_SSSE3)
unset (HAVE_SSE4A)
unset (HAVE_SSE4_1)
unset (HAVE_SSE4_2)
unset (HAVE_NEON)
unset (HAVE_VFP)
unset (HAVE_VFPV3)
unset (HAVE_VFPV4)
message(STATUS "Running getarch")
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way

View File

@@ -39,40 +39,14 @@ if (DEFINED BINARY AND DEFINED TARGET AND BINARY EQUAL 32)
if (${TARGET} STREQUAL "BULLDOZER" OR ${TARGET} STREQUAL "PILEDRIVER" OR ${TARGET} STREQUAL "ZEN")
set(TARGET "BARCELONA")
endif ()
if (${TARGET} STREQUAL "ARMV8" OR ${TARGET} STREQUAL "CORTEXA57" OR ${TARGET} STREQUAL "CORTEXA53")
if (${TARGET} STREQUAL "ARMV8" OR ${TARGET} STREQUAL "CORTEXA57" OR ${TARGET} STREQUAL "CORTEXA53" OR ${TARGET} STREQUAL "CORTEXA55")
set(TARGET "ARMV7")
endif ()
endif ()
if (DEFINED TARGET)
if (${TARGET} STREQUAL "COOPERLAKE" AND NOT NO_AVX512)
# if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL 10.1)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake")
else()
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
endif()
# elseif (${CMAKE_C_COMPILER_ID} STREQUAL "CLANG")
# set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
# endif()
endif()
if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
endif()
if (${TARGET} STREQUAL "HASWELL" AND NOT NO_AVX2)
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (${GCC_VERSION} VERSION_GREATER 4.7 OR ${GCC_VERSION} VERSION_EQUAL 4.7)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
endif()
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "CLANG")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
endif()
endif()
endif()
if (DEFINED TARGET)
message(STATUS "-- -- -- -- -- -- -- -- -- -- -- -- --")
message(STATUS "Targeting the ${TARGET} architecture.")
set(GETARCH_FLAGS "-DFORCE_${TARGET}")
endif ()
@@ -110,6 +84,11 @@ if (NO_AVX2)
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DNO_AVX2")
endif ()
if (NO_AVX512)
message(STATUS "Disabling Advanced Vector Extensions 512 (AVX512).")
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DNO_AVX512")
endif ()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(GETARCH_FLAGS "${GETARCH_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
endif ()
@@ -167,6 +146,67 @@ else()
endif ()
include("${PROJECT_SOURCE_DIR}/cmake/prebuild.cmake")
if (DEFINED TARGET)
if (${TARGET} STREQUAL COOPERLAKE AND NOT NO_AVX512)
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 10.09)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake")
else()
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
endif()
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "AppleClang")
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 8.99)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake")
else()
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
endif()
endif()
endif()
if (${TARGET} STREQUAL SKYLAKEX AND NOT NO_AVX512)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
endif()
if (${TARGET} STREQUAL HASWELL AND NOT NO_AVX2)
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (${GCC_VERSION} VERSION_GREATER 4.7 OR ${GCC_VERSION} VERSION_EQUAL 4.7)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
endif()
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "CLANG")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
endif()
endif()
if (DEFINED HAVE_AVX)
if (NOT NO_AVX)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx")
endif()
endif()
if (DEFINED HAVE_AVX2)
if (NOT NO_AVX2)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
endif()
endif()
# if (DEFINED HAVE_FMA3)
# if (NOT NO_AVX2)
# set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mfma")
# endif()
# endif()
if (DEFINED HAVE_SSE)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse")
endif()
if (DEFINED HAVE_SSE2)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse2")
endif()
if (DEFINED HAVE_SSE3)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
endif()
if (DEFINED HAVE_SSSE3)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mssse3")
endif()
if (DEFINED HAVE_SSE4_1)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse4.1")
endif()
endif()
if (DEFINED BINARY)
message(STATUS "Compiling a ${BINARY}-bit binary.")
endif ()
@@ -197,6 +237,11 @@ if (BINARY64)
endif ()
endif ()
if(EMBEDDED)
set(CCOMMON_OPT "${CCOMMON_OPT} -DOS_EMBEDDED")
set(CCOMMON_OPT "${CCOMMON_OPT} -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16")
endif()
if (NEED_PIC)
if (${CMAKE_C_COMPILER} STREQUAL "IBM")
set(CCOMMON_OPT "${CCOMMON_OPT} -qpic=large")
@@ -213,6 +258,13 @@ if (NEED_PIC)
endif()
endif ()
if (X86_64)
set(SMALL_MATRIX_OPT TRUE)
endif ()
if (SMALL_MATRIX_OPT)
set(CCOMMON_OPT "${CCOMMON_OPT} -DSMALL_MATRIX_OPT")
endif ()
if (DYNAMIC_ARCH)
if (X86 OR X86_64 OR ARM64 OR PPC)
set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH")
@@ -254,6 +306,10 @@ if (NO_AVX2)
set(CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX2")
endif ()
if (NO_AVX512)
set(CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
endif ()
if (USE_THREAD)
# USE_SIMPLE_THREADED_LEVEL3 = 1
# NO_AFFINITY = 1
@@ -318,7 +374,13 @@ else ()
set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=2048")
endif ()
endif ()
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
if (DEFINED BLAS3_MEM_ALLOC_THRESHOLD)
if (NOT ${BLAS3_MEM_ALLOC_THRESHOLD} EQUAL 32)
set(CCOMMON_OPT "${CCOMMON_OPT} -DBLAS3_MEM_ALLOC_THRESHOLD=${BLAS3_MEM_ALLOC_THRESHOLD}")
endif()
endif()
endif()
if (DEFINED LIBNAMESUFFIX)
set(LIBPREFIX "libopenblas_${LIBNAMESUFFIX}")
else ()
@@ -388,6 +450,28 @@ set(REVISION "-r${OpenBLAS_VERSION}")
set(MAJOR_VERSION ${OpenBLAS_MAJOR_VERSION})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CCOMMON_OPT}")
if (NOT BUILD_SINGLE AND NOT BUILD_DOUBLE AND NOT BUILD_COMPLEX AND NOT BUILD_COMPLEX16)
set (BUILD_SINGLE ON)
set (BUILD_DOUBLE ON)
set (BUILD_COMPLEX ON)
set (BUILD_COMPLEX16 ON)
endif()
if (BUILD_SINGLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_SINGLE")
endif()
if (BUILD_DOUBLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_DOUBLE")
endif()
if (BUILD_COMPLEX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_COMPLEX")
endif()
if (BUILD_COMPLEX16)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_COMPLEX16")
endif()
if (BUILD_BFLOAT16)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_BFLOAT16")
endif()
if(NOT MSVC)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${CCOMMON_OPT}")
endif()
@@ -560,8 +644,8 @@ endif ()
#export FUNCTION_PROFILE
#export TARGET_CORE
#
#export SHGEMM_UNROLL_M
#export SHGEMM_UNROLL_N
#export SBGEMM_UNROLL_M
#export SBGEMM_UNROLL_N
#export SGEMM_UNROLL_M
#export SGEMM_UNROLL_N
#export DGEMM_UNROLL_M

View File

@@ -38,6 +38,8 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc.*|power.*|Power.*")
set(PPC 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips64.*")
set(MIPS64 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64.*")
set(LOONGARCH64 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
if (NOT BINARY)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
@@ -54,14 +56,14 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
set(X86 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
set(ARM 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(ARM64 1)
else()
set(ARM 1)
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
set(ARM 1)
elseif (${CMAKE_CROSSCOMPILING})
if (${TARGET} STREQUAL "CORE2")
if (NOT BINARY)
@@ -95,7 +97,7 @@ else()
endif ()
if (NOT BINARY)
if (X86_64 OR ARM64 OR PPC OR MIPS64)
if (X86_64 OR ARM64 OR PPC OR MIPS64 OR LOONGARCH64)
set(BINARY 64)
else ()
set(BINARY 32)
@@ -109,6 +111,7 @@ else()
endif()
if (X86_64 OR X86)
if (NOT NO_AVX512)
file(WRITE ${PROJECT_BINARY_DIR}/avx512.c "#include <immintrin.h>\n\nint main(void){ __asm__ volatile(\"vbroadcastss -4 * 4(%rsi), %zmm2\"); }")
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -c -v -o ${PROJECT_BINARY_DIR}/avx512.o ${PROJECT_BINARY_DIR}/avx512.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
if (NO_AVX512 EQUAL 1)
@@ -116,10 +119,10 @@ set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
endif()
file(REMOVE "avx512.c" "avx512.o")
endif()
endif()
include(CheckIncludeFile)
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
if (HAVE_C11 EQUAL 1)
message (STATUS found stdatomic.h)
set (CCOMMON_OPT "${CCOMMON_OPT} -DHAVE_C11")
endif()

View File

@@ -74,6 +74,9 @@ macro(ParseMakefileVars MAKEFILE_IN)
string(REGEX MATCH "ifneq \\(\\$\\(([_A-Z]+)\\),[ \t]*([0-9_A-Z]+)\\)" line_match "${makefile_line}")
if (NOT "${line_match}" STREQUAL "")
# message(STATUS "IFNEQ: ${line_match} first: ${CMAKE_MATCH_1} second: ${CMAKE_MATCH_2}")
if ( ${CMAKE_MATCH_1} STREQUAL C_COMPILER)
set (CMAKE_MATCH_1 CMAKE_C_COMPILER)
endif ()
if (NOT ( ${${CMAKE_MATCH_1}} STREQUAL ${CMAKE_MATCH_2}))
# message (STATUS "condition is true")
set (IfElse 1)
@@ -154,31 +157,31 @@ endfunction ()
# STRING - compiles only the given type (e.g. DOUBLE)
function(GenerateNamedObjects sources_in)
if (DEFINED ARGV1)
if (${ARGC} GREATER 1)
set(defines_in ${ARGV1})
endif ()
if (DEFINED ARGV2 AND NOT "${ARGV2}" STREQUAL "")
if (${ARGC} GREATER 2 AND NOT "${ARGV2}" STREQUAL "")
set(name_in ${ARGV2})
# strip off extension for kernel files that pass in the object name.
get_filename_component(name_in ${name_in} NAME_WE)
endif ()
if (DEFINED ARGV3)
if (${ARGC} GREATER 3)
set(use_cblas ${ARGV3})
else ()
set(use_cblas false)
endif ()
if (DEFINED ARGV4)
if (${ARGC} GREATER 4)
set(replace_last_with ${ARGV4})
endif ()
if (DEFINED ARGV5)
if (${ARGC} GREATER 5)
set(append_with ${ARGV5})
endif ()
if (DEFINED ARGV6)
if (${ARGC} GREATER 6)
set(no_float_type ${ARGV6})
else ()
set(no_float_type false)
@@ -193,7 +196,7 @@ function(GenerateNamedObjects sources_in)
set(real_only false)
set(complex_only false)
set(mangle_complex_sources false)
if (DEFINED ARGV7 AND NOT "${ARGV7}" STREQUAL "")
if (${ARGC} GREATER 7 AND NOT "${ARGV7}" STREQUAL "")
if (${ARGV7} EQUAL 1)
set(real_only true)
elseif (${ARGV7} EQUAL 2)
@@ -211,7 +214,7 @@ function(GenerateNamedObjects sources_in)
if (complex_only)
list(REMOVE_ITEM float_list "SINGLE")
list(REMOVE_ITEM float_list "DOUBLE")
list(REMOVE_ITEM float_list "HALF")
list(REMOVE_ITEM float_list "BFLOAT16")
elseif (real_only)
list(REMOVE_ITEM float_list "COMPLEX")
list(REMOVE_ITEM float_list "ZCOMPLEX")
@@ -225,8 +228,8 @@ function(GenerateNamedObjects sources_in)
if (NOT no_float_type)
string(SUBSTRING ${float_type} 0 1 float_char)
string(TOLOWER ${float_char} float_char)
if (${float_type} STREQUAL "HALF")
set (float_char "sh")
if (${float_type} STREQUAL "BFLOAT16")
set (float_char "sb")
endif ()
endif ()
@@ -251,6 +254,19 @@ function(GenerateNamedObjects sources_in)
# now add the object and set the defines
set(obj_defines ${defines_in})
list(FIND obj_defines "RC" def_idx)
if (${def_idx} GREATER -1)
# list(REMOVE_AT ${obj_defines} ${def_idx})
list (REMOVE_ITEM obj_defines "RC")
list(APPEND obj_defines "RC=RC")
endif ()
list(FIND obj_defines "CR" def_idx)
if (${def_idx} GREATER -1)
# list(REMOVE_AT ${obj_defines} ${def_idx})
list (REMOVE_ITEM obj_defines "CR")
list(APPEND obj_defines "CR=CR")
endif ()
if (use_cblas)
set(obj_name "cblas_${obj_name}")
list(APPEND obj_defines "CBLAS")
@@ -262,8 +278,8 @@ function(GenerateNamedObjects sources_in)
if (${float_type} STREQUAL "DOUBLE" OR ${float_type} STREQUAL "ZCOMPLEX")
list(APPEND obj_defines "DOUBLE")
endif ()
if (${float_type} STREQUAL "HALF")
list(APPEND obj_defines "HALF")
if (${float_type} STREQUAL "BFLOAT16")
list(APPEND obj_defines "BFLOAT16")
endif ()
if (${float_type} STREQUAL "COMPLEX" OR ${float_type} STREQUAL "ZCOMPLEX")
list(APPEND obj_defines "COMPLEX")
@@ -295,7 +311,15 @@ function(GenerateNamedObjects sources_in)
configure_file(${new_source_file}.tmp ${new_source_file} COPYONLY)
file(REMOVE ${new_source_file}.tmp)
list(APPEND SRC_LIST_OUT ${new_source_file})
message (STATUS ${new_source_file})
if (DEFINED HAVE_FMA3)
if ( ${new_source_file} MATCHES "(s|d?)rot_k.*c")
set_source_files_properties(${new_source_file} PROPERTIES COMPILE_OPTIONS "-mfma")
endif ()
if ( ${new_source_file} MATCHES "dgemv_t_k.*c")
set_source_files_properties(${new_source_file} PROPERTIES COMPILE_OPTIONS "-mfma")
endif ()
endif ()
endforeach ()
endforeach ()
@@ -318,17 +342,17 @@ endfunction ()
function(GenerateCombinationObjects sources_in defines_in absent_codes_in all_defines_in replace_scheme)
set(alternate_name_in "")
if (DEFINED ARGV5)
if (${ARGC} GREATER 5)
set(alternate_name_in ${ARGV5})
endif ()
set(no_float_type false)
if (DEFINED ARGV6)
if (${ARGC} GREATER 6)
set(no_float_type ${ARGV6})
endif ()
set(complex_filename_scheme "")
if (DEFINED ARGV7)
if (${ARGC} GREATER 7)
set(complex_filename_scheme ${ARGV7})
endif ()

View File

@@ -122,7 +122,7 @@ extern "C" {
#define ATOM GOTO_ATOM
#undef GOTO_ATOM
#endif
#else
#elif !defined(OS_EMBEDDED)
#include <sys/mman.h>
#ifndef NO_SYSV_IPC
#include <sys/shm.h>
@@ -134,6 +134,9 @@ extern "C" {
#if defined(SMP) || defined(USE_LOCKING)
#include <pthread.h>
#endif
#else
#include <time.h>
#include <math.h>
#endif
#if defined(OS_SUNOS)
@@ -257,9 +260,10 @@ typedef long BLASLONG;
typedef unsigned long BLASULONG;
#endif
#ifndef BFLOAT16
typedef unsigned short bfloat16;
#define HALFCONVERSION 1
#ifndef bfloat16
#include <stdint.h>
typedef uint16_t bfloat16;
#define BFLOAT16CONVERSION 1
#endif
#ifdef USE64BITINT
@@ -302,7 +306,7 @@ typedef int blasint;
#define SIZE 8
#define BASE_SHIFT 3
#define ZBASE_SHIFT 4
#elif defined(HALF)
#elif defined(BFLOAT16)
#define IFLOAT bfloat16
#define XFLOAT IFLOAT
#define FLOAT float
@@ -351,7 +355,7 @@ typedef int blasint;
#endif
#if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) || defined(ARMV5)
#define YIELDING asm volatile ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
#define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
#endif
#ifdef BULLDOZER
@@ -401,7 +405,7 @@ please https://github.com/xianyi/OpenBLAS/issues/246
#endif
#ifndef BLAS3_MEM_ALLOC_THRESHOLD
#define BLAS3_MEM_ALLOC_THRESHOLD 160
#define BLAS3_MEM_ALLOC_THRESHOLD 32
#endif
#ifdef QUAD_PRECISION
@@ -412,6 +416,15 @@ please https://github.com/xianyi/OpenBLAS/issues/246
#include "common_alpha.h"
#endif
#if (defined(ARCH_X86) || defined(ARCH_X86_64)) && defined(__CET__) && defined(__has_include)
#if __has_include(<cet.h>)
#include <cet.h>
#endif
#endif
#ifndef _CET_ENDBR
#define _CET_ENDBR
#endif
#ifdef ARCH_X86
#include "common_x86.h"
#endif
@@ -436,6 +449,11 @@ please https://github.com/xianyi/OpenBLAS/issues/246
#include "common_mips.h"
#endif
#ifdef ARCH_RISCV64
#include "common_riscv64.h"
#endif
#ifdef ARCH_MIPS64
#include "common_mips64.h"
#endif
@@ -452,6 +470,10 @@ please https://github.com/xianyi/OpenBLAS/issues/246
#include "common_zarch.h"
#endif
#ifdef ARCH_LOONGARCH64
#include "common_loongarch64.h"
#endif
#ifndef ASSEMBLER
#ifdef OS_WINDOWSSTORE
typedef char env_var_t[MAX_PATH];
@@ -482,10 +504,12 @@ static inline unsigned long long rpcc(void){
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (unsigned long long)ts.tv_sec * 1000000000ull + ts.tv_nsec;
#else
#elif !defined(OS_EMBEDDED)
struct timeval tv;
gettimeofday(&tv,NULL);
return (unsigned long long)tv.tv_sec * 1000000000ull + tv.tv_usec * 1000;
#else
return 0;
#endif
}
#define RPCC_DEFINED
@@ -515,6 +539,10 @@ static void __inline blas_lock(volatile BLASULONG *address){
#include "common_linux.h"
#endif
#ifdef OS_EMBEDDED
#define DTB_DEFAULT_ENTRIES 64
#endif
#define MMAP_ACCESS (PROT_READ | PROT_WRITE)
#ifdef __NetBSD__

View File

@@ -39,7 +39,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INLINE inline
#ifdef F_INTERFACE_FLANG
#if defined( F_INTERFACE_FLANG) || defined(F_INTERFACE_PGI)
#define RETURN_BY_STACK
#else
#define RETURN_BY_COMPLEX
@@ -120,7 +120,7 @@ static inline int blas_quickdivide(blasint x, blasint y){
.text ;
.p2align 2 ;
.global REALNAME ;
#ifndef __APPLE__
#if !defined(__APPLE__) && !defined(_WIN32)
.type REALNAME, %function ;
#endif
REALNAME:
@@ -142,14 +142,8 @@ REALNAME:
#define HUGE_PAGESIZE ( 4 << 20)
#ifndef BUFFERSIZE
#if defined(CORTEXA57)
#define BUFFER_SIZE (20 << 20)
#elif defined(TSV110) || defined(EMAG8180)
#define BUFFER_SIZE (32 << 20)
#else
#define BUFFER_SIZE (16 << 20)
#endif
#else
#define BUFFER_SIZE (32 << BUFFERSIZE)
#endif

View File

@@ -232,45 +232,7 @@
#define CGEADD_K cgeadd_k
#define CGEMM_SMALL_KERNEL_NN cgemm_small_kernel_nn
#define CGEMM_SMALL_KERNEL_NT cgemm_small_kernel_nt
#define CGEMM_SMALL_KERNEL_NR cgemm_small_kernel_nr
#define CGEMM_SMALL_KERNEL_NC cgemm_small_kernel_nc
#define CGEMM_SMALL_KERNEL_TN cgemm_small_kernel_tn
#define CGEMM_SMALL_KERNEL_TT cgemm_small_kernel_tt
#define CGEMM_SMALL_KERNEL_TR cgemm_small_kernel_tr
#define CGEMM_SMALL_KERNEL_TC cgemm_small_kernel_tc
#define CGEMM_SMALL_KERNEL_RN cgemm_small_kernel_rn
#define CGEMM_SMALL_KERNEL_RT cgemm_small_kernel_rt
#define CGEMM_SMALL_KERNEL_RR cgemm_small_kernel_rr
#define CGEMM_SMALL_KERNEL_RC cgemm_small_kernel_rc
#define CGEMM_SMALL_KERNEL_CN cgemm_small_kernel_cn
#define CGEMM_SMALL_KERNEL_CT cgemm_small_kernel_ct
#define CGEMM_SMALL_KERNEL_CR cgemm_small_kernel_cr
#define CGEMM_SMALL_KERNEL_CC cgemm_small_kernel_cc
#define CGEMM_SMALL_KERNEL_B0_NN cgemm_small_kernel_b0_nn
#define CGEMM_SMALL_KERNEL_B0_NT cgemm_small_kernel_b0_nt
#define CGEMM_SMALL_KERNEL_B0_NR cgemm_small_kernel_b0_nr
#define CGEMM_SMALL_KERNEL_B0_NC cgemm_small_kernel_b0_nc
#define CGEMM_SMALL_KERNEL_B0_TN cgemm_small_kernel_b0_tn
#define CGEMM_SMALL_KERNEL_B0_TT cgemm_small_kernel_b0_tt
#define CGEMM_SMALL_KERNEL_B0_TR cgemm_small_kernel_b0_tr
#define CGEMM_SMALL_KERNEL_B0_TC cgemm_small_kernel_b0_tc
#define CGEMM_SMALL_KERNEL_B0_RN cgemm_small_kernel_b0_rn
#define CGEMM_SMALL_KERNEL_B0_RT cgemm_small_kernel_b0_rt
#define CGEMM_SMALL_KERNEL_B0_RR cgemm_small_kernel_b0_rr
#define CGEMM_SMALL_KERNEL_B0_RC cgemm_small_kernel_b0_rc
#define CGEMM_SMALL_KERNEL_B0_CN cgemm_small_kernel_b0_cn
#define CGEMM_SMALL_KERNEL_B0_CT cgemm_small_kernel_b0_ct
#define CGEMM_SMALL_KERNEL_B0_CR cgemm_small_kernel_b0_cr
#define CGEMM_SMALL_KERNEL_B0_CC cgemm_small_kernel_b0_cc
#define CGEMM_SMALL_MATRIX_PERMIT cgemm_small_matrix_permit
#else
@@ -466,8 +428,51 @@
#define CGEADD_K gotoblas -> cgeadd_k
#define CGEMM_SMALL_MATRIX_PERMIT gotoblas -> cgemm_small_matrix_permit
#endif
#define CGEMM_SMALL_KERNEL_NN FUNC_OFFSET(cgemm_small_kernel_nn)
#define CGEMM_SMALL_KERNEL_NT FUNC_OFFSET(cgemm_small_kernel_nt)
#define CGEMM_SMALL_KERNEL_NR FUNC_OFFSET(cgemm_small_kernel_nr)
#define CGEMM_SMALL_KERNEL_NC FUNC_OFFSET(cgemm_small_kernel_nc)
#define CGEMM_SMALL_KERNEL_TN FUNC_OFFSET(cgemm_small_kernel_tn)
#define CGEMM_SMALL_KERNEL_TT FUNC_OFFSET(cgemm_small_kernel_tt)
#define CGEMM_SMALL_KERNEL_TR FUNC_OFFSET(cgemm_small_kernel_tr)
#define CGEMM_SMALL_KERNEL_TC FUNC_OFFSET(cgemm_small_kernel_tc)
#define CGEMM_SMALL_KERNEL_RN FUNC_OFFSET(cgemm_small_kernel_rn)
#define CGEMM_SMALL_KERNEL_RT FUNC_OFFSET(cgemm_small_kernel_rt)
#define CGEMM_SMALL_KERNEL_RR FUNC_OFFSET(cgemm_small_kernel_rr)
#define CGEMM_SMALL_KERNEL_RC FUNC_OFFSET(cgemm_small_kernel_rc)
#define CGEMM_SMALL_KERNEL_CN FUNC_OFFSET(cgemm_small_kernel_cn)
#define CGEMM_SMALL_KERNEL_CT FUNC_OFFSET(cgemm_small_kernel_ct)
#define CGEMM_SMALL_KERNEL_CR FUNC_OFFSET(cgemm_small_kernel_cr)
#define CGEMM_SMALL_KERNEL_CC FUNC_OFFSET(cgemm_small_kernel_cc)
#define CGEMM_SMALL_KERNEL_B0_NN FUNC_OFFSET(cgemm_small_kernel_b0_nn)
#define CGEMM_SMALL_KERNEL_B0_NT FUNC_OFFSET(cgemm_small_kernel_b0_nt)
#define CGEMM_SMALL_KERNEL_B0_NR FUNC_OFFSET(cgemm_small_kernel_b0_nr)
#define CGEMM_SMALL_KERNEL_B0_NC FUNC_OFFSET(cgemm_small_kernel_b0_nc)
#define CGEMM_SMALL_KERNEL_B0_TN FUNC_OFFSET(cgemm_small_kernel_b0_tn)
#define CGEMM_SMALL_KERNEL_B0_TT FUNC_OFFSET(cgemm_small_kernel_b0_tt)
#define CGEMM_SMALL_KERNEL_B0_TR FUNC_OFFSET(cgemm_small_kernel_b0_tr)
#define CGEMM_SMALL_KERNEL_B0_TC FUNC_OFFSET(cgemm_small_kernel_b0_tc)
#define CGEMM_SMALL_KERNEL_B0_RN FUNC_OFFSET(cgemm_small_kernel_b0_rn)
#define CGEMM_SMALL_KERNEL_B0_RT FUNC_OFFSET(cgemm_small_kernel_b0_rt)
#define CGEMM_SMALL_KERNEL_B0_RR FUNC_OFFSET(cgemm_small_kernel_b0_rr)
#define CGEMM_SMALL_KERNEL_B0_RC FUNC_OFFSET(cgemm_small_kernel_b0_rc)
#define CGEMM_SMALL_KERNEL_B0_CN FUNC_OFFSET(cgemm_small_kernel_b0_cn)
#define CGEMM_SMALL_KERNEL_B0_CT FUNC_OFFSET(cgemm_small_kernel_b0_ct)
#define CGEMM_SMALL_KERNEL_B0_CR FUNC_OFFSET(cgemm_small_kernel_b0_cr)
#define CGEMM_SMALL_KERNEL_B0_CC FUNC_OFFSET(cgemm_small_kernel_b0_cc)
#define CGEMM_NN cgemm_nn
#define CGEMM_CN cgemm_cn
#define CGEMM_TN cgemm_tn

View File

@@ -157,16 +157,7 @@
#define DIMATCOPY_K_RT dimatcopy_k_rt
#define DGEADD_K dgeadd_k
#define DGEMM_SMALL_KERNEL_NN dgemm_small_kernel_nn
#define DGEMM_SMALL_KERNEL_NT dgemm_small_kernel_nt
#define DGEMM_SMALL_KERNEL_TN dgemm_small_kernel_tn
#define DGEMM_SMALL_KERNEL_TT dgemm_small_kernel_tt
#define DGEMM_SMALL_KERNEL_B0_NN dgemm_small_kernel_b0_nn
#define DGEMM_SMALL_KERNEL_B0_NT dgemm_small_kernel_b0_nt
#define DGEMM_SMALL_KERNEL_B0_TN dgemm_small_kernel_b0_tn
#define DGEMM_SMALL_KERNEL_B0_TT dgemm_small_kernel_b0_tt
#define DGEMM_SMALL_MATRIX_PERMIT dgemm_small_matrix_permit
#else
@@ -292,8 +283,21 @@
#define DGEADD_K gotoblas -> dgeadd_k
#define DGEMM_SMALL_MATRIX_PERMIT gotoblas -> dgemm_small_matrix_permit
#endif
#define DGEMM_SMALL_KERNEL_NN FUNC_OFFSET(dgemm_small_kernel_nn)
#define DGEMM_SMALL_KERNEL_NT FUNC_OFFSET(dgemm_small_kernel_nt)
#define DGEMM_SMALL_KERNEL_TN FUNC_OFFSET(dgemm_small_kernel_tn)
#define DGEMM_SMALL_KERNEL_TT FUNC_OFFSET(dgemm_small_kernel_tt)
#define DGEMM_SMALL_KERNEL_B0_NN FUNC_OFFSET(dgemm_small_kernel_b0_nn)
#define DGEMM_SMALL_KERNEL_B0_NT FUNC_OFFSET(dgemm_small_kernel_b0_nt)
#define DGEMM_SMALL_KERNEL_B0_TN FUNC_OFFSET(dgemm_small_kernel_b0_tn)
#define DGEMM_SMALL_KERNEL_B0_TT FUNC_OFFSET(dgemm_small_kernel_b0_tt)
#define DGEMM_NN dgemm_nn
#define DGEMM_CN dgemm_tn
#define DGEMM_TN dgemm_tn

View File

@@ -54,6 +54,11 @@ double BLASFUNC(dsdot) (blasint *, float *, blasint *, float *, blasint *);
double BLASFUNC(ddot) (blasint *, double *, blasint *, double *, blasint *);
xdouble BLASFUNC(qdot) (blasint *, xdouble *, blasint *, xdouble *, blasint *);
float BLASFUNC(sbdot) (blasint *, bfloat16 *, blasint *, bfloat16 *, blasint *);
void BLASFUNC(sbstobf16) (blasint *, float *, blasint *, bfloat16 *, blasint *);
void BLASFUNC(sbdtobf16) (blasint *, double *, blasint *, bfloat16 *, blasint *);
void BLASFUNC(sbf16tos) (blasint *, bfloat16 *, blasint *, float *, blasint *);
void BLASFUNC(dbf16tod) (blasint *, bfloat16 *, blasint *, double *, blasint *);
#ifdef RETURN_BY_STRUCT
typedef struct {
@@ -245,6 +250,8 @@ void BLASFUNC(xgeru)(blasint *, blasint *, xdouble *, xdouble *, blasint *,
void BLASFUNC(xgerc)(blasint *, blasint *, xdouble *, xdouble *, blasint *,
xdouble *, blasint *, xdouble *, blasint *);
void BLASFUNC(sbgemv)(char *, blasint *, blasint *, float *, bfloat16 *, blasint *,
bfloat16 *, blasint *, float *, float *, blasint *);
void BLASFUNC(sgemv)(char *, blasint *, blasint *, float *, float *, blasint *,
float *, blasint *, float *, float *, blasint *);
void BLASFUNC(dgemv)(char *, blasint *, blasint *, double *, double *, blasint *,
@@ -469,7 +476,7 @@ void BLASFUNC(xhbmv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint
/* Level 3 routines */
void BLASFUNC(shgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
void BLASFUNC(sbgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
bfloat16 *, blasint *, bfloat16 *, blasint *, float *, float *, blasint *);
void BLASFUNC(sgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
float *, blasint *, float *, blasint *, float *, float *, blasint *);
@@ -702,6 +709,13 @@ int BLASFUNC(cpotrf)(char *, blasint *, float *, blasint *, blasint *);
int BLASFUNC(zpotrf)(char *, blasint *, double *, blasint *, blasint *);
int BLASFUNC(xpotrf)(char *, blasint *, xdouble *, blasint *, blasint *);
int BLASFUNC(spotri)(char *, blasint *, float *, blasint *, blasint *);
int BLASFUNC(dpotri)(char *, blasint *, double *, blasint *, blasint *);
int BLASFUNC(qpotri)(char *, blasint *, xdouble *, blasint *, blasint *);
int BLASFUNC(cpotri)(char *, blasint *, float *, blasint *, blasint *);
int BLASFUNC(zpotri)(char *, blasint *, double *, blasint *, blasint *);
int BLASFUNC(xpotri)(char *, blasint *, xdouble *, blasint *, blasint *);
int BLASFUNC(spotrs)(char *, blasint *, blasint *, float *, blasint *, float *, blasint *, blasint *);
int BLASFUNC(dpotrs)(char *, blasint *, blasint *, double *, blasint *, double *, blasint *, blasint *);
int BLASFUNC(qpotrs)(char *, blasint *, blasint *, xdouble *, blasint *, xdouble *, blasint *, blasint *);

View File

@@ -46,6 +46,12 @@ float sdot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG);
double dsdot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG);
double ddot_k(BLASLONG, double *, BLASLONG, double *, BLASLONG);
xdouble qdot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
float sbdot_k(BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
void sbstobf16_k(BLASLONG, float *, BLASLONG, bfloat16 *, BLASLONG);
void sbdtobf16_k(BLASLONG, double *, BLASLONG, bfloat16 *, BLASLONG);
void sbf16tos_k (BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
void dbf16tod_k (BLASLONG, bfloat16 *, BLASLONG, double *, BLASLONG);
openblas_complex_float cdotc_k (BLASLONG, float *, BLASLONG, float *, BLASLONG);
openblas_complex_float cdotu_k (BLASLONG, float *, BLASLONG, float *, BLASLONG);

Some files were not shown because too many files have changed in this diff Show More