You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

param.h 71 kB

12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
12 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
12 years ago
12 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
12 years ago
12 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
12 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060
  1. /*****************************************************************************
  2. Copyright (c) 2011-2014, The OpenBLAS Project
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are
  6. met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in
  11. the documentation and/or other materials provided with the
  12. distribution.
  13. 3. Neither the name of the OpenBLAS project nor the names of
  14. its contributors may be used to endorse or promote products
  15. derived from this software without specific prior written
  16. permission.
  17. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  18. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  21. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  23. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  24. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  25. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  26. USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. **********************************************************************************/
  28. /*********************************************************************/
  29. /* Copyright 2009, 2010 The University of Texas at Austin. */
  30. /* All rights reserved. */
  31. /* */
  32. /* Redistribution and use in source and binary forms, with or */
  33. /* without modification, are permitted provided that the following */
  34. /* conditions are met: */
  35. /* */
  36. /* 1. Redistributions of source code must retain the above */
  37. /* copyright notice, this list of conditions and the following */
  38. /* disclaimer. */
  39. /* */
  40. /* 2. Redistributions in binary form must reproduce the above */
  41. /* copyright notice, this list of conditions and the following */
  42. /* disclaimer in the documentation and/or other materials */
  43. /* provided with the distribution. */
  44. /* */
  45. /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
  46. /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
  47. /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  48. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  49. /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
  50. /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
  51. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  52. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
  53. /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  54. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  55. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  56. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
  57. /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
  58. /* POSSIBILITY OF SUCH DAMAGE. */
  59. /* */
  60. /* The views and conclusions contained in the software and */
  61. /* documentation are those of the authors and should not be */
  62. /* interpreted as representing official policies, either expressed */
  63. /* or implied, of The University of Texas at Austin. */
  64. /*********************************************************************/
  65. #ifndef PARAM_H
  66. #define PARAM_H
  67. #ifdef OPTERON
  68. #define SNUMOPT 4
  69. #define DNUMOPT 2
  70. #define GEMM_DEFAULT_OFFSET_A 64
  71. #define GEMM_DEFAULT_OFFSET_B 256
  72. #define GEMM_DEFAULT_ALIGN 0x01ffffUL
  73. #define SGEMM_DEFAULT_UNROLL_N 4
  74. #define DGEMM_DEFAULT_UNROLL_N 4
  75. #define QGEMM_DEFAULT_UNROLL_N 2
  76. #define CGEMM_DEFAULT_UNROLL_N 2
  77. #define ZGEMM_DEFAULT_UNROLL_N 2
  78. #define XGEMM_DEFAULT_UNROLL_N 1
  79. #ifdef ARCH_X86
  80. #define SGEMM_DEFAULT_UNROLL_M 4
  81. #define DGEMM_DEFAULT_UNROLL_M 2
  82. #define QGEMM_DEFAULT_UNROLL_M 2
  83. #define CGEMM_DEFAULT_UNROLL_M 2
  84. #define ZGEMM_DEFAULT_UNROLL_M 1
  85. #define XGEMM_DEFAULT_UNROLL_M 1
  86. #else
  87. #define SGEMM_DEFAULT_UNROLL_M 8
  88. #define DGEMM_DEFAULT_UNROLL_M 4
  89. #define QGEMM_DEFAULT_UNROLL_M 2
  90. #define CGEMM_DEFAULT_UNROLL_M 4
  91. #define ZGEMM_DEFAULT_UNROLL_M 2
  92. #define XGEMM_DEFAULT_UNROLL_M 1
  93. #endif
  94. #define SGEMM_DEFAULT_P sgemm_p
  95. #define DGEMM_DEFAULT_P dgemm_p
  96. #define QGEMM_DEFAULT_P qgemm_p
  97. #define CGEMM_DEFAULT_P cgemm_p
  98. #define ZGEMM_DEFAULT_P zgemm_p
  99. #define XGEMM_DEFAULT_P xgemm_p
  100. #define SGEMM_DEFAULT_R sgemm_r
  101. #define DGEMM_DEFAULT_R dgemm_r
  102. #define QGEMM_DEFAULT_R qgemm_r
  103. #define CGEMM_DEFAULT_R cgemm_r
  104. #define ZGEMM_DEFAULT_R zgemm_r
  105. #define XGEMM_DEFAULT_R xgemm_r
  106. #ifdef ALLOC_HUGETLB
  107. #define SGEMM_DEFAULT_Q 248
  108. #define DGEMM_DEFAULT_Q 248
  109. #define QGEMM_DEFAULT_Q 248
  110. #define CGEMM_DEFAULT_Q 248
  111. #define ZGEMM_DEFAULT_Q 248
  112. #define XGEMM_DEFAULT_Q 248
  113. #else
  114. #define SGEMM_DEFAULT_Q 240
  115. #define DGEMM_DEFAULT_Q 240
  116. #define QGEMM_DEFAULT_Q 240
  117. #define CGEMM_DEFAULT_Q 240
  118. #define ZGEMM_DEFAULT_Q 240
  119. #define XGEMM_DEFAULT_Q 240
  120. #endif
  121. #define SYMV_P 16
  122. #define HAVE_EXCLUSIVE_CACHE
  123. #endif
  124. #if defined(BARCELONA) || defined(SHANGHAI) || defined(BOBCAT)
  125. #define SNUMOPT 8
  126. #define DNUMOPT 4
  127. #define GEMM_DEFAULT_OFFSET_A 64
  128. #define GEMM_DEFAULT_OFFSET_B 832
  129. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  130. #define SGEMM_DEFAULT_UNROLL_N 4
  131. #define DGEMM_DEFAULT_UNROLL_N 4
  132. #define QGEMM_DEFAULT_UNROLL_N 2
  133. #define CGEMM_DEFAULT_UNROLL_N 2
  134. #define ZGEMM_DEFAULT_UNROLL_N 2
  135. #define XGEMM_DEFAULT_UNROLL_N 1
  136. #ifdef ARCH_X86
  137. #define SGEMM_DEFAULT_UNROLL_M 4
  138. #define DGEMM_DEFAULT_UNROLL_M 2
  139. #define QGEMM_DEFAULT_UNROLL_M 2
  140. #define CGEMM_DEFAULT_UNROLL_M 2
  141. #define ZGEMM_DEFAULT_UNROLL_M 1
  142. #define XGEMM_DEFAULT_UNROLL_M 1
  143. #else
  144. #define SGEMM_DEFAULT_UNROLL_M 8
  145. #define DGEMM_DEFAULT_UNROLL_M 4
  146. #define QGEMM_DEFAULT_UNROLL_M 2
  147. #define CGEMM_DEFAULT_UNROLL_M 4
  148. #define ZGEMM_DEFAULT_UNROLL_M 2
  149. #define XGEMM_DEFAULT_UNROLL_M 1
  150. #endif
  151. #if 0
  152. #define SGEMM_DEFAULT_P 496
  153. #define DGEMM_DEFAULT_P 248
  154. #define QGEMM_DEFAULT_P 124
  155. #define CGEMM_DEFAULT_P 248
  156. #define ZGEMM_DEFAULT_P 124
  157. #define XGEMM_DEFAULT_P 62
  158. #define SGEMM_DEFAULT_Q 248
  159. #define DGEMM_DEFAULT_Q 248
  160. #define QGEMM_DEFAULT_Q 248
  161. #define CGEMM_DEFAULT_Q 248
  162. #define ZGEMM_DEFAULT_Q 248
  163. #define XGEMM_DEFAULT_Q 248
  164. #else
  165. #define SGEMM_DEFAULT_P 448
  166. #define DGEMM_DEFAULT_P 224
  167. #define QGEMM_DEFAULT_P 112
  168. #define CGEMM_DEFAULT_P 224
  169. #define ZGEMM_DEFAULT_P 112
  170. #define XGEMM_DEFAULT_P 56
  171. #define SGEMM_DEFAULT_Q 224
  172. #define DGEMM_DEFAULT_Q 224
  173. #define QGEMM_DEFAULT_Q 224
  174. #define CGEMM_DEFAULT_Q 224
  175. #define ZGEMM_DEFAULT_Q 224
  176. #define XGEMM_DEFAULT_Q 224
  177. #endif
  178. #define SGEMM_DEFAULT_R sgemm_r
  179. #define QGEMM_DEFAULT_R qgemm_r
  180. #define DGEMM_DEFAULT_R dgemm_r
  181. #define CGEMM_DEFAULT_R cgemm_r
  182. #define ZGEMM_DEFAULT_R zgemm_r
  183. #define XGEMM_DEFAULT_R xgemm_r
  184. #define SYMV_P 16
  185. #define HAVE_EXCLUSIVE_CACHE
  186. #define GEMM_THREAD gemm_thread_mn
  187. #endif
  188. #ifdef BULLDOZER
  189. #define SNUMOPT 8
  190. #define DNUMOPT 4
  191. #define GEMM_DEFAULT_OFFSET_A 64
  192. #define GEMM_DEFAULT_OFFSET_B 832
  193. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  194. #define QGEMM_DEFAULT_UNROLL_N 2
  195. #define CGEMM_DEFAULT_UNROLL_N 2
  196. #define ZGEMM_DEFAULT_UNROLL_N 2
  197. #define XGEMM_DEFAULT_UNROLL_N 1
  198. #ifdef ARCH_X86
  199. #define SGEMM_DEFAULT_UNROLL_N 4
  200. #define DGEMM_DEFAULT_UNROLL_N 4
  201. #define SGEMM_DEFAULT_UNROLL_M 4
  202. #define DGEMM_DEFAULT_UNROLL_M 2
  203. #define QGEMM_DEFAULT_UNROLL_M 2
  204. #define CGEMM_DEFAULT_UNROLL_M 2
  205. #define ZGEMM_DEFAULT_UNROLL_M 1
  206. #define XGEMM_DEFAULT_UNROLL_M 1
  207. #else
  208. #define SGEMM_DEFAULT_UNROLL_N 2
  209. #define DGEMM_DEFAULT_UNROLL_N 2
  210. #define SGEMM_DEFAULT_UNROLL_M 16
  211. #define DGEMM_DEFAULT_UNROLL_M 8
  212. #define QGEMM_DEFAULT_UNROLL_M 2
  213. #define CGEMM_DEFAULT_UNROLL_M 4
  214. #define ZGEMM_DEFAULT_UNROLL_M 2
  215. #define XGEMM_DEFAULT_UNROLL_M 1
  216. #define CGEMM3M_DEFAULT_UNROLL_N 4
  217. #define CGEMM3M_DEFAULT_UNROLL_M 8
  218. #define ZGEMM3M_DEFAULT_UNROLL_N 4
  219. #define ZGEMM3M_DEFAULT_UNROLL_M 4
  220. #define DGEMM_DEFAULT_UNROLL_MN 16
  221. #define GEMV_UNROLL 8
  222. #endif
  223. #if defined(ARCH_X86_64)
  224. #define SGEMM_DEFAULT_P 768
  225. #define DGEMM_DEFAULT_P 384
  226. #else
  227. #define SGEMM_DEFAULT_P 448
  228. #define DGEMM_DEFAULT_P 224
  229. #endif
  230. #define QGEMM_DEFAULT_P 112
  231. #define CGEMM_DEFAULT_P 224
  232. #define ZGEMM_DEFAULT_P 112
  233. #define XGEMM_DEFAULT_P 56
  234. #if defined(ARCH_X86_64)
  235. #define SGEMM_DEFAULT_Q 168
  236. #define DGEMM_DEFAULT_Q 168
  237. #else
  238. #define SGEMM_DEFAULT_Q 224
  239. #define DGEMM_DEFAULT_Q 224
  240. #endif
  241. #define QGEMM_DEFAULT_Q 224
  242. #define CGEMM_DEFAULT_Q 224
  243. #define ZGEMM_DEFAULT_Q 224
  244. #define XGEMM_DEFAULT_Q 224
  245. #define CGEMM3M_DEFAULT_P 448
  246. #define ZGEMM3M_DEFAULT_P 224
  247. #define XGEMM3M_DEFAULT_P 112
  248. #define CGEMM3M_DEFAULT_Q 224
  249. #define ZGEMM3M_DEFAULT_Q 224
  250. #define XGEMM3M_DEFAULT_Q 224
  251. #define CGEMM3M_DEFAULT_R 12288
  252. #define ZGEMM3M_DEFAULT_R 12288
  253. #define XGEMM3M_DEFAULT_R 12288
  254. #define SGEMM_DEFAULT_R sgemm_r
  255. #define QGEMM_DEFAULT_R qgemm_r
  256. #define DGEMM_DEFAULT_R dgemm_r
  257. #define CGEMM_DEFAULT_R cgemm_r
  258. #define ZGEMM_DEFAULT_R zgemm_r
  259. #define XGEMM_DEFAULT_R xgemm_r
  260. #define SYMV_P 16
  261. #define HAVE_EXCLUSIVE_CACHE
  262. #define GEMM_THREAD gemm_thread_mn
  263. #endif
  264. #ifdef PILEDRIVER
  265. #define SNUMOPT 8
  266. #define DNUMOPT 4
  267. #define GEMM_DEFAULT_OFFSET_A 64
  268. #define GEMM_DEFAULT_OFFSET_B 832
  269. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  270. #define QGEMM_DEFAULT_UNROLL_N 2
  271. #define CGEMM_DEFAULT_UNROLL_N 2
  272. #define ZGEMM_DEFAULT_UNROLL_N 2
  273. #define XGEMM_DEFAULT_UNROLL_N 1
  274. #ifdef ARCH_X86
  275. #define SGEMM_DEFAULT_UNROLL_N 4
  276. #define DGEMM_DEFAULT_UNROLL_N 4
  277. #define SGEMM_DEFAULT_UNROLL_M 4
  278. #define DGEMM_DEFAULT_UNROLL_M 2
  279. #define QGEMM_DEFAULT_UNROLL_M 2
  280. #define CGEMM_DEFAULT_UNROLL_M 2
  281. #define ZGEMM_DEFAULT_UNROLL_M 1
  282. #define XGEMM_DEFAULT_UNROLL_M 1
  283. #else
  284. #define SGEMM_DEFAULT_UNROLL_N 2
  285. #define DGEMM_DEFAULT_UNROLL_N 2
  286. #define SGEMM_DEFAULT_UNROLL_M 16
  287. #define DGEMM_DEFAULT_UNROLL_M 8
  288. #define QGEMM_DEFAULT_UNROLL_M 2
  289. #define CGEMM_DEFAULT_UNROLL_M 4
  290. #define ZGEMM_DEFAULT_UNROLL_M 2
  291. #define XGEMM_DEFAULT_UNROLL_M 1
  292. #define CGEMM3M_DEFAULT_UNROLL_N 4
  293. #define CGEMM3M_DEFAULT_UNROLL_M 8
  294. #define ZGEMM3M_DEFAULT_UNROLL_N 4
  295. #define ZGEMM3M_DEFAULT_UNROLL_M 4
  296. #define GEMV_UNROLL 8
  297. #endif
  298. #if defined(ARCH_X86_64)
  299. #define SGEMM_DEFAULT_P 768
  300. #define DGEMM_DEFAULT_P 768
  301. #define ZGEMM_DEFAULT_P 384
  302. #define CGEMM_DEFAULT_P 768
  303. #else
  304. #define SGEMM_DEFAULT_P 448
  305. #define DGEMM_DEFAULT_P 480
  306. #define ZGEMM_DEFAULT_P 112
  307. #define CGEMM_DEFAULT_P 224
  308. #endif
  309. #define QGEMM_DEFAULT_P 112
  310. #define XGEMM_DEFAULT_P 56
  311. #if defined(ARCH_X86_64)
  312. #define SGEMM_DEFAULT_Q 192
  313. #define DGEMM_DEFAULT_Q 168
  314. #define ZGEMM_DEFAULT_Q 168
  315. #define CGEMM_DEFAULT_Q 168
  316. #else
  317. #define SGEMM_DEFAULT_Q 224
  318. #define DGEMM_DEFAULT_Q 224
  319. #define ZGEMM_DEFAULT_Q 224
  320. #define CGEMM_DEFAULT_Q 224
  321. #endif
  322. #define QGEMM_DEFAULT_Q 224
  323. #define XGEMM_DEFAULT_Q 224
  324. #define CGEMM3M_DEFAULT_P 448
  325. #define ZGEMM3M_DEFAULT_P 224
  326. #define XGEMM3M_DEFAULT_P 112
  327. #define CGEMM3M_DEFAULT_Q 224
  328. #define ZGEMM3M_DEFAULT_Q 224
  329. #define XGEMM3M_DEFAULT_Q 224
  330. #define CGEMM3M_DEFAULT_R 12288
  331. #define ZGEMM3M_DEFAULT_R 12288
  332. #define XGEMM3M_DEFAULT_R 12288
  333. #define SGEMM_DEFAULT_R 12288
  334. #define QGEMM_DEFAULT_R qgemm_r
  335. #define DGEMM_DEFAULT_R 12288
  336. #define CGEMM_DEFAULT_R cgemm_r
  337. #define ZGEMM_DEFAULT_R zgemm_r
  338. #define XGEMM_DEFAULT_R xgemm_r
  339. #define SYMV_P 16
  340. #define HAVE_EXCLUSIVE_CACHE
  341. #define GEMM_THREAD gemm_thread_mn
  342. #endif
  343. #ifdef STEAMROLLER
  344. #define SNUMOPT 8
  345. #define DNUMOPT 4
  346. #define GEMM_DEFAULT_OFFSET_A 64
  347. #define GEMM_DEFAULT_OFFSET_B 832
  348. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  349. #define QGEMM_DEFAULT_UNROLL_N 2
  350. #define CGEMM_DEFAULT_UNROLL_N 2
  351. #define ZGEMM_DEFAULT_UNROLL_N 2
  352. #define XGEMM_DEFAULT_UNROLL_N 1
  353. #ifdef ARCH_X86
  354. #define SGEMM_DEFAULT_UNROLL_N 4
  355. #define DGEMM_DEFAULT_UNROLL_N 4
  356. #define SGEMM_DEFAULT_UNROLL_M 4
  357. #define DGEMM_DEFAULT_UNROLL_M 2
  358. #define QGEMM_DEFAULT_UNROLL_M 2
  359. #define CGEMM_DEFAULT_UNROLL_M 2
  360. #define ZGEMM_DEFAULT_UNROLL_M 1
  361. #define XGEMM_DEFAULT_UNROLL_M 1
  362. #else
  363. #define SGEMM_DEFAULT_UNROLL_N 2
  364. #define DGEMM_DEFAULT_UNROLL_N 2
  365. #define SGEMM_DEFAULT_UNROLL_M 16
  366. #define DGEMM_DEFAULT_UNROLL_M 8
  367. #define QGEMM_DEFAULT_UNROLL_M 2
  368. #define CGEMM_DEFAULT_UNROLL_M 4
  369. #define ZGEMM_DEFAULT_UNROLL_M 2
  370. #define XGEMM_DEFAULT_UNROLL_M 1
  371. #define CGEMM3M_DEFAULT_UNROLL_N 4
  372. #define CGEMM3M_DEFAULT_UNROLL_M 8
  373. #define ZGEMM3M_DEFAULT_UNROLL_N 4
  374. #define ZGEMM3M_DEFAULT_UNROLL_M 4
  375. #define GEMV_UNROLL 8
  376. #endif
  377. #if defined(ARCH_X86_64)
  378. #define SGEMM_DEFAULT_P 768
  379. #define DGEMM_DEFAULT_P 576
  380. #define ZGEMM_DEFAULT_P 288
  381. #define CGEMM_DEFAULT_P 576
  382. #else
  383. #define SGEMM_DEFAULT_P 448
  384. #define DGEMM_DEFAULT_P 480
  385. #define ZGEMM_DEFAULT_P 112
  386. #define CGEMM_DEFAULT_P 224
  387. #endif
  388. #define QGEMM_DEFAULT_P 112
  389. #define XGEMM_DEFAULT_P 56
  390. #if defined(ARCH_X86_64)
  391. #define SGEMM_DEFAULT_Q 192
  392. #define DGEMM_DEFAULT_Q 160
  393. #define ZGEMM_DEFAULT_Q 160
  394. #define CGEMM_DEFAULT_Q 160
  395. #else
  396. #define SGEMM_DEFAULT_Q 224
  397. #define DGEMM_DEFAULT_Q 224
  398. #define ZGEMM_DEFAULT_Q 224
  399. #define CGEMM_DEFAULT_Q 224
  400. #endif
  401. #define QGEMM_DEFAULT_Q 224
  402. #define XGEMM_DEFAULT_Q 224
  403. #define CGEMM3M_DEFAULT_P 448
  404. #define ZGEMM3M_DEFAULT_P 224
  405. #define XGEMM3M_DEFAULT_P 112
  406. #define CGEMM3M_DEFAULT_Q 224
  407. #define ZGEMM3M_DEFAULT_Q 224
  408. #define XGEMM3M_DEFAULT_Q 224
  409. #define CGEMM3M_DEFAULT_R 12288
  410. #define ZGEMM3M_DEFAULT_R 12288
  411. #define XGEMM3M_DEFAULT_R 12288
  412. #define SGEMM_DEFAULT_R 12288
  413. #define QGEMM_DEFAULT_R qgemm_r
  414. #define DGEMM_DEFAULT_R 12288
  415. #define CGEMM_DEFAULT_R cgemm_r
  416. #define ZGEMM_DEFAULT_R zgemm_r
  417. #define XGEMM_DEFAULT_R xgemm_r
  418. #define SYMV_P 16
  419. #define HAVE_EXCLUSIVE_CACHE
  420. #define GEMM_THREAD gemm_thread_mn
  421. #endif
  422. #ifdef EXCAVATOR
  423. #define SNUMOPT 8
  424. #define DNUMOPT 4
  425. #define GEMM_DEFAULT_OFFSET_A 64
  426. #define GEMM_DEFAULT_OFFSET_B 832
  427. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  428. #define QGEMM_DEFAULT_UNROLL_N 2
  429. #define CGEMM_DEFAULT_UNROLL_N 2
  430. #define ZGEMM_DEFAULT_UNROLL_N 2
  431. #define XGEMM_DEFAULT_UNROLL_N 1
  432. #ifdef ARCH_X86
  433. #define SGEMM_DEFAULT_UNROLL_N 4
  434. #define DGEMM_DEFAULT_UNROLL_N 4
  435. #define SGEMM_DEFAULT_UNROLL_M 4
  436. #define DGEMM_DEFAULT_UNROLL_M 2
  437. #define QGEMM_DEFAULT_UNROLL_M 2
  438. #define CGEMM_DEFAULT_UNROLL_M 2
  439. #define ZGEMM_DEFAULT_UNROLL_M 1
  440. #define XGEMM_DEFAULT_UNROLL_M 1
  441. #else
  442. #define SGEMM_DEFAULT_UNROLL_N 2
  443. #define DGEMM_DEFAULT_UNROLL_N 2
  444. #define SGEMM_DEFAULT_UNROLL_M 16
  445. #define DGEMM_DEFAULT_UNROLL_M 8
  446. #define QGEMM_DEFAULT_UNROLL_M 2
  447. #define CGEMM_DEFAULT_UNROLL_M 4
  448. #define ZGEMM_DEFAULT_UNROLL_M 2
  449. #define XGEMM_DEFAULT_UNROLL_M 1
  450. #define CGEMM3M_DEFAULT_UNROLL_N 4
  451. #define CGEMM3M_DEFAULT_UNROLL_M 8
  452. #define ZGEMM3M_DEFAULT_UNROLL_N 4
  453. #define ZGEMM3M_DEFAULT_UNROLL_M 4
  454. #define GEMV_UNROLL 8
  455. #endif
  456. #if defined(ARCH_X86_64)
  457. #define SGEMM_DEFAULT_P 768
  458. #define DGEMM_DEFAULT_P 576
  459. #define ZGEMM_DEFAULT_P 288
  460. #define CGEMM_DEFAULT_P 576
  461. #else
  462. #define SGEMM_DEFAULT_P 448
  463. #define DGEMM_DEFAULT_P 480
  464. #define ZGEMM_DEFAULT_P 112
  465. #define CGEMM_DEFAULT_P 224
  466. #endif
  467. #define QGEMM_DEFAULT_P 112
  468. #define XGEMM_DEFAULT_P 56
  469. #if defined(ARCH_X86_64)
  470. #define SGEMM_DEFAULT_Q 192
  471. #define DGEMM_DEFAULT_Q 160
  472. #define ZGEMM_DEFAULT_Q 160
  473. #define CGEMM_DEFAULT_Q 160
  474. #else
  475. #define SGEMM_DEFAULT_Q 224
  476. #define DGEMM_DEFAULT_Q 224
  477. #define ZGEMM_DEFAULT_Q 224
  478. #define CGEMM_DEFAULT_Q 224
  479. #endif
  480. #define QGEMM_DEFAULT_Q 224
  481. #define XGEMM_DEFAULT_Q 224
  482. #define CGEMM3M_DEFAULT_P 448
  483. #define ZGEMM3M_DEFAULT_P 224
  484. #define XGEMM3M_DEFAULT_P 112
  485. #define CGEMM3M_DEFAULT_Q 224
  486. #define ZGEMM3M_DEFAULT_Q 224
  487. #define XGEMM3M_DEFAULT_Q 224
  488. #define CGEMM3M_DEFAULT_R 12288
  489. #define ZGEMM3M_DEFAULT_R 12288
  490. #define XGEMM3M_DEFAULT_R 12288
  491. #define SGEMM_DEFAULT_R 12288
  492. #define QGEMM_DEFAULT_R qgemm_r
  493. #define DGEMM_DEFAULT_R 12288
  494. #define CGEMM_DEFAULT_R cgemm_r
  495. #define ZGEMM_DEFAULT_R zgemm_r
  496. #define XGEMM_DEFAULT_R xgemm_r
  497. #define SYMV_P 16
  498. #define HAVE_EXCLUSIVE_CACHE
  499. #define GEMM_THREAD gemm_thread_mn
  500. #endif
  501. #ifdef ZEN
  502. #define SNUMOPT 16
  503. #define DNUMOPT 8
  504. #define GEMM_DEFAULT_OFFSET_A 0
  505. #define GEMM_DEFAULT_OFFSET_B 0
  506. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  507. #define SYMV_P 8
  508. #define SWITCH_RATIO 16
  509. #ifdef ARCH_X86
  510. #define SGEMM_DEFAULT_UNROLL_M 4
  511. #define DGEMM_DEFAULT_UNROLL_M 2
  512. #define QGEMM_DEFAULT_UNROLL_M 2
  513. #define CGEMM_DEFAULT_UNROLL_M 2
  514. #define ZGEMM_DEFAULT_UNROLL_M 1
  515. #define XGEMM_DEFAULT_UNROLL_M 1
  516. #define SGEMM_DEFAULT_UNROLL_N 4
  517. #define DGEMM_DEFAULT_UNROLL_N 4
  518. #define QGEMM_DEFAULT_UNROLL_N 2
  519. #define CGEMM_DEFAULT_UNROLL_N 2
  520. #define ZGEMM_DEFAULT_UNROLL_N 2
  521. #define XGEMM_DEFAULT_UNROLL_N 1
  522. #else
  523. #define SGEMM_DEFAULT_UNROLL_M 16
  524. #define DGEMM_DEFAULT_UNROLL_M 4
  525. #define QGEMM_DEFAULT_UNROLL_M 2
  526. #define CGEMM_DEFAULT_UNROLL_M 8
  527. #define ZGEMM_DEFAULT_UNROLL_M 4
  528. #define XGEMM_DEFAULT_UNROLL_M 1
  529. #define SGEMM_DEFAULT_UNROLL_N 4
  530. #define DGEMM_DEFAULT_UNROLL_N 8
  531. #define QGEMM_DEFAULT_UNROLL_N 2
  532. #define CGEMM_DEFAULT_UNROLL_N 2
  533. #define ZGEMM_DEFAULT_UNROLL_N 2
  534. #define XGEMM_DEFAULT_UNROLL_N 1
  535. #define SGEMM_DEFAULT_UNROLL_MN 32
  536. #define DGEMM_DEFAULT_UNROLL_MN 32
  537. #endif
  538. #ifdef ARCH_X86
  539. #define SGEMM_DEFAULT_P 512
  540. #define SGEMM_DEFAULT_R sgemm_r
  541. #define DGEMM_DEFAULT_P 512
  542. #define DGEMM_DEFAULT_R dgemm_r
  543. #define QGEMM_DEFAULT_P 504
  544. #define QGEMM_DEFAULT_R qgemm_r
  545. #define CGEMM_DEFAULT_P 128
  546. #define CGEMM_DEFAULT_R 1024
  547. #define ZGEMM_DEFAULT_P 512
  548. #define ZGEMM_DEFAULT_R zgemm_r
  549. #define XGEMM_DEFAULT_P 252
  550. #define XGEMM_DEFAULT_R xgemm_r
  551. #define SGEMM_DEFAULT_Q 256
  552. #define DGEMM_DEFAULT_Q 256
  553. #define QGEMM_DEFAULT_Q 128
  554. #define CGEMM_DEFAULT_Q 256
  555. #define ZGEMM_DEFAULT_Q 192
  556. #define XGEMM_DEFAULT_Q 128
  557. #else
  558. #define SGEMM_DEFAULT_P 768
  559. #define DGEMM_DEFAULT_P 512
  560. #define CGEMM_DEFAULT_P 384
  561. #define ZGEMM_DEFAULT_P 256
  562. #ifdef WINDOWS_ABI
  563. #define SGEMM_DEFAULT_Q 320
  564. #define DGEMM_DEFAULT_Q 128
  565. #else
  566. #define SGEMM_DEFAULT_Q 384
  567. #define DGEMM_DEFAULT_Q 256
  568. #endif
  569. #define CGEMM_DEFAULT_Q 192
  570. #define ZGEMM_DEFAULT_Q 128
  571. #define SGEMM_DEFAULT_R sgemm_r
  572. #define DGEMM_DEFAULT_R 13824
  573. #define CGEMM_DEFAULT_R cgemm_r
  574. #define ZGEMM_DEFAULT_R zgemm_r
  575. #define QGEMM_DEFAULT_Q 128
  576. #define QGEMM_DEFAULT_P 504
  577. #define QGEMM_DEFAULT_R qgemm_r
  578. #define XGEMM_DEFAULT_P 252
  579. #define XGEMM_DEFAULT_R xgemm_r
  580. #define XGEMM_DEFAULT_Q 128
  581. #define CGEMM3M_DEFAULT_UNROLL_N 8
  582. #define CGEMM3M_DEFAULT_UNROLL_M 4
  583. #define ZGEMM3M_DEFAULT_UNROLL_N 8
  584. #define ZGEMM3M_DEFAULT_UNROLL_M 2
  585. #define CGEMM3M_DEFAULT_P 448
  586. #define ZGEMM3M_DEFAULT_P 224
  587. #define XGEMM3M_DEFAULT_P 112
  588. #define CGEMM3M_DEFAULT_Q 224
  589. #define ZGEMM3M_DEFAULT_Q 224
  590. #define XGEMM3M_DEFAULT_Q 224
  591. #define CGEMM3M_DEFAULT_R 12288
  592. #define ZGEMM3M_DEFAULT_R 12288
  593. #define XGEMM3M_DEFAULT_R 12288
  594. #endif
  595. #endif
  596. #ifdef ATHLON
  597. #define SNUMOPT 4
  598. #define DNUMOPT 2
  599. #define GEMM_DEFAULT_OFFSET_A 0
  600. #define GEMM_DEFAULT_OFFSET_B 384
  601. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  602. #define SGEMM_DEFAULT_UNROLL_N 4
  603. #define DGEMM_DEFAULT_UNROLL_N 4
  604. #define QGEMM_DEFAULT_UNROLL_N 2
  605. #define CGEMM_DEFAULT_UNROLL_N 2
  606. #define ZGEMM_DEFAULT_UNROLL_N 2
  607. #define XGEMM_DEFAULT_UNROLL_N 1
  608. #define SGEMM_DEFAULT_UNROLL_M 2
  609. #define DGEMM_DEFAULT_UNROLL_M 1
  610. #define QGEMM_DEFAULT_UNROLL_M 2
  611. #define CGEMM_DEFAULT_UNROLL_M 1
  612. #define ZGEMM_DEFAULT_UNROLL_M 1
  613. #define XGEMM_DEFAULT_UNROLL_M 1
  614. #define SGEMM_DEFAULT_R sgemm_r
  615. #define DGEMM_DEFAULT_R dgemm_r
  616. #define QGEMM_DEFAULT_R qgemm_r
  617. #define CGEMM_DEFAULT_R cgemm_r
  618. #define ZGEMM_DEFAULT_R zgemm_r
  619. #define XGEMM_DEFAULT_R xgemm_r
  620. #define SGEMM_DEFAULT_P 208
  621. #define DGEMM_DEFAULT_P 104
  622. #define QGEMM_DEFAULT_P 56
  623. #define CGEMM_DEFAULT_P 104
  624. #define ZGEMM_DEFAULT_P 56
  625. #define XGEMM_DEFAULT_P 28
  626. #define SGEMM_DEFAULT_Q 208
  627. #define DGEMM_DEFAULT_Q 208
  628. #define QGEMM_DEFAULT_Q 208
  629. #define CGEMM_DEFAULT_Q 208
  630. #define ZGEMM_DEFAULT_Q 208
  631. #define XGEMM_DEFAULT_Q 208
  632. #define SYMV_P 16
  633. #define HAVE_EXCLUSIVE_CACHE
  634. #endif
  635. #ifdef VIAC3
  636. #define SNUMOPT 2
  637. #define DNUMOPT 1
  638. #define GEMM_DEFAULT_OFFSET_A 0
  639. #define GEMM_DEFAULT_OFFSET_B 256
  640. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  641. #define SGEMM_DEFAULT_UNROLL_N 4
  642. #define DGEMM_DEFAULT_UNROLL_N 4
  643. #define QGEMM_DEFAULT_UNROLL_N 2
  644. #define CGEMM_DEFAULT_UNROLL_N 2
  645. #define ZGEMM_DEFAULT_UNROLL_N 2
  646. #define XGEMM_DEFAULT_UNROLL_N 1
  647. #define SGEMM_DEFAULT_UNROLL_M 2
  648. #define DGEMM_DEFAULT_UNROLL_M 1
  649. #define QGEMM_DEFAULT_UNROLL_M 2
  650. #define CGEMM_DEFAULT_UNROLL_M 1
  651. #define ZGEMM_DEFAULT_UNROLL_M 1
  652. #define XGEMM_DEFAULT_UNROLL_M 1
  653. #define SGEMM_DEFAULT_R sgemm_r
  654. #define DGEMM_DEFAULT_R dgemm_r
  655. #define QGEMM_DEFAULT_R qgemm_r
  656. #define CGEMM_DEFAULT_R cgemm_r
  657. #define ZGEMM_DEFAULT_R zgemm_r
  658. #define XGEMM_DEFAULT_R xgemm_r
  659. #define SGEMM_DEFAULT_P 128
  660. #define DGEMM_DEFAULT_P 128
  661. #define QGEMM_DEFAULT_P 128
  662. #define CGEMM_DEFAULT_P 128
  663. #define ZGEMM_DEFAULT_P 128
  664. #define XGEMM_DEFAULT_P 128
  665. #define SGEMM_DEFAULT_Q 512
  666. #define DGEMM_DEFAULT_Q 256
  667. #define QGEMM_DEFAULT_Q 256
  668. #define CGEMM_DEFAULT_Q 256
  669. #define ZGEMM_DEFAULT_Q 128
  670. #define XGEMM_DEFAULT_Q 128
  671. #define SYMV_P 16
  672. #endif
  673. #ifdef NANO
  674. #define SNUMOPT 4
  675. #define DNUMOPT 2
  676. #define GEMM_DEFAULT_OFFSET_A 64
  677. #define GEMM_DEFAULT_OFFSET_B 256
  678. #define GEMM_DEFAULT_ALIGN 0x01ffffUL
  679. #ifdef ARCH_X86
  680. #define SGEMM_DEFAULT_UNROLL_N 4
  681. #define DGEMM_DEFAULT_UNROLL_N 4
  682. #define QGEMM_DEFAULT_UNROLL_N 2
  683. #define CGEMM_DEFAULT_UNROLL_N 2
  684. #define ZGEMM_DEFAULT_UNROLL_N 2
  685. #define XGEMM_DEFAULT_UNROLL_N 1
  686. #define SGEMM_DEFAULT_UNROLL_M 4
  687. #define DGEMM_DEFAULT_UNROLL_M 2
  688. #define QGEMM_DEFAULT_UNROLL_M 2
  689. #define CGEMM_DEFAULT_UNROLL_M 2
  690. #define ZGEMM_DEFAULT_UNROLL_M 1
  691. #define XGEMM_DEFAULT_UNROLL_M 1
  692. #else
  693. #define SGEMM_DEFAULT_UNROLL_N 8
  694. #define DGEMM_DEFAULT_UNROLL_N 4
  695. #define QGEMM_DEFAULT_UNROLL_N 2
  696. #define CGEMM_DEFAULT_UNROLL_N 4
  697. #define ZGEMM_DEFAULT_UNROLL_N 2
  698. #define XGEMM_DEFAULT_UNROLL_N 1
  699. #define SGEMM_DEFAULT_UNROLL_M 4
  700. #define DGEMM_DEFAULT_UNROLL_M 4
  701. #define QGEMM_DEFAULT_UNROLL_M 2
  702. #define CGEMM_DEFAULT_UNROLL_M 2
  703. #define ZGEMM_DEFAULT_UNROLL_M 2
  704. #define XGEMM_DEFAULT_UNROLL_M 1
  705. #endif
  706. #define SGEMM_DEFAULT_P 288
  707. #define DGEMM_DEFAULT_P 288
  708. #define QGEMM_DEFAULT_P 288
  709. #define CGEMM_DEFAULT_P 288
  710. #define ZGEMM_DEFAULT_P 288
  711. #define XGEMM_DEFAULT_P 288
  712. #define SGEMM_DEFAULT_R sgemm_r
  713. #define DGEMM_DEFAULT_R dgemm_r
  714. #define QGEMM_DEFAULT_R qgemm_r
  715. #define CGEMM_DEFAULT_R cgemm_r
  716. #define ZGEMM_DEFAULT_R zgemm_r
  717. #define XGEMM_DEFAULT_R xgemm_r
  718. #define SGEMM_DEFAULT_Q 256
  719. #define DGEMM_DEFAULT_Q 128
  720. #define QGEMM_DEFAULT_Q 64
  721. #define CGEMM_DEFAULT_Q 128
  722. #define ZGEMM_DEFAULT_Q 64
  723. #define XGEMM_DEFAULT_Q 32
  724. #define SYMV_P 16
  725. #define HAVE_EXCLUSIVE_CACHE
  726. #endif
  727. #if defined(PENTIUM) || defined(PENTIUM2) || defined(PENTIUM3)
  728. #ifdef HAVE_SSE
  729. #define SNUMOPT 2
  730. #else
  731. #define SNUMOPT 1
  732. #endif
  733. #define DNUMOPT 1
  734. #define GEMM_DEFAULT_OFFSET_A 0
  735. #define GEMM_DEFAULT_OFFSET_B 0
  736. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  737. #ifdef HAVE_SSE
  738. #define SGEMM_DEFAULT_UNROLL_M 8
  739. #define CGEMM_DEFAULT_UNROLL_M 4
  740. #else
  741. #define SGEMM_DEFAULT_UNROLL_M 4
  742. #define CGEMM_DEFAULT_UNROLL_M 2
  743. #endif
  744. #define DGEMM_DEFAULT_UNROLL_M 2
  745. #define SGEMM_DEFAULT_UNROLL_N 2
  746. #define DGEMM_DEFAULT_UNROLL_N 2
  747. #define QGEMM_DEFAULT_UNROLL_M 2
  748. #define QGEMM_DEFAULT_UNROLL_N 2
  749. #define CGEMM_DEFAULT_UNROLL_N 1
  750. #define ZGEMM_DEFAULT_UNROLL_M 1
  751. #define ZGEMM_DEFAULT_UNROLL_N 1
  752. #define XGEMM_DEFAULT_UNROLL_M 1
  753. #define XGEMM_DEFAULT_UNROLL_N 1
  754. #define SGEMM_DEFAULT_P sgemm_p
  755. #define SGEMM_DEFAULT_Q 256
  756. #define SGEMM_DEFAULT_R sgemm_r
  757. #define DGEMM_DEFAULT_P dgemm_p
  758. #define DGEMM_DEFAULT_Q 256
  759. #define DGEMM_DEFAULT_R dgemm_r
  760. #define QGEMM_DEFAULT_P qgemm_p
  761. #define QGEMM_DEFAULT_Q 256
  762. #define QGEMM_DEFAULT_R qgemm_r
  763. #define CGEMM_DEFAULT_P cgemm_p
  764. #define CGEMM_DEFAULT_Q 256
  765. #define CGEMM_DEFAULT_R cgemm_r
  766. #define ZGEMM_DEFAULT_P zgemm_p
  767. #define ZGEMM_DEFAULT_Q 256
  768. #define ZGEMM_DEFAULT_R zgemm_r
  769. #define XGEMM_DEFAULT_P xgemm_p
  770. #define XGEMM_DEFAULT_Q 256
  771. #define XGEMM_DEFAULT_R xgemm_r
  772. #define SYMV_P 4
  773. #endif
  774. #ifdef PENTIUMM
  775. #define SNUMOPT 2
  776. #define DNUMOPT 1
  777. #define GEMM_DEFAULT_OFFSET_A 0
  778. #define GEMM_DEFAULT_OFFSET_B 0
  779. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  780. #ifdef CORE_YONAH
  781. #define SGEMM_DEFAULT_UNROLL_M 4
  782. #define SGEMM_DEFAULT_UNROLL_N 4
  783. #define DGEMM_DEFAULT_UNROLL_M 2
  784. #define DGEMM_DEFAULT_UNROLL_N 4
  785. #define QGEMM_DEFAULT_UNROLL_M 2
  786. #define QGEMM_DEFAULT_UNROLL_N 2
  787. #define CGEMM_DEFAULT_UNROLL_M 2
  788. #define CGEMM_DEFAULT_UNROLL_N 2
  789. #define ZGEMM_DEFAULT_UNROLL_M 1
  790. #define ZGEMM_DEFAULT_UNROLL_N 2
  791. #define XGEMM_DEFAULT_UNROLL_M 1
  792. #define XGEMM_DEFAULT_UNROLL_N 1
  793. #else
  794. #define SGEMM_DEFAULT_UNROLL_M 8
  795. #define SGEMM_DEFAULT_UNROLL_N 2
  796. #define DGEMM_DEFAULT_UNROLL_M 2
  797. #define DGEMM_DEFAULT_UNROLL_N 2
  798. #define QGEMM_DEFAULT_UNROLL_M 2
  799. #define QGEMM_DEFAULT_UNROLL_N 2
  800. #define CGEMM_DEFAULT_UNROLL_M 4
  801. #define CGEMM_DEFAULT_UNROLL_N 1
  802. #define ZGEMM_DEFAULT_UNROLL_M 1
  803. #define ZGEMM_DEFAULT_UNROLL_N 1
  804. #define XGEMM_DEFAULT_UNROLL_M 1
  805. #define XGEMM_DEFAULT_UNROLL_N 1
  806. #endif
  807. #define SGEMM_DEFAULT_P sgemm_p
  808. #define SGEMM_DEFAULT_Q 256
  809. #define SGEMM_DEFAULT_R sgemm_r
  810. #define DGEMM_DEFAULT_P dgemm_p
  811. #define DGEMM_DEFAULT_Q 256
  812. #define DGEMM_DEFAULT_R dgemm_r
  813. #define QGEMM_DEFAULT_P qgemm_p
  814. #define QGEMM_DEFAULT_Q 256
  815. #define QGEMM_DEFAULT_R qgemm_r
  816. #define CGEMM_DEFAULT_P cgemm_p
  817. #define CGEMM_DEFAULT_Q 256
  818. #define CGEMM_DEFAULT_R cgemm_r
  819. #define ZGEMM_DEFAULT_P zgemm_p
  820. #define ZGEMM_DEFAULT_Q 256
  821. #define ZGEMM_DEFAULT_R zgemm_r
  822. #define XGEMM_DEFAULT_P xgemm_p
  823. #define XGEMM_DEFAULT_Q 256
  824. #define XGEMM_DEFAULT_R xgemm_r
  825. #define SYMV_P 4
  826. #endif
  827. #ifdef CORE_NORTHWOOD
  828. #define SNUMOPT 4
  829. #define DNUMOPT 2
  830. #define GEMM_DEFAULT_OFFSET_A 0
  831. #define GEMM_DEFAULT_OFFSET_B 32
  832. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  833. #define SYMV_P 8
  834. #define SGEMM_DEFAULT_UNROLL_M 8
  835. #define DGEMM_DEFAULT_UNROLL_M 4
  836. #define QGEMM_DEFAULT_UNROLL_M 2
  837. #define CGEMM_DEFAULT_UNROLL_M 4
  838. #define ZGEMM_DEFAULT_UNROLL_M 2
  839. #define XGEMM_DEFAULT_UNROLL_M 1
  840. #define SGEMM_DEFAULT_UNROLL_N 2
  841. #define DGEMM_DEFAULT_UNROLL_N 2
  842. #define QGEMM_DEFAULT_UNROLL_N 2
  843. #define CGEMM_DEFAULT_UNROLL_N 1
  844. #define ZGEMM_DEFAULT_UNROLL_N 1
  845. #define XGEMM_DEFAULT_UNROLL_N 1
  846. #define SGEMM_DEFAULT_P sgemm_p
  847. #define SGEMM_DEFAULT_R sgemm_r
  848. #define DGEMM_DEFAULT_P dgemm_p
  849. #define DGEMM_DEFAULT_R dgemm_r
  850. #define QGEMM_DEFAULT_P qgemm_p
  851. #define QGEMM_DEFAULT_R qgemm_r
  852. #define CGEMM_DEFAULT_P cgemm_p
  853. #define CGEMM_DEFAULT_R cgemm_r
  854. #define ZGEMM_DEFAULT_P zgemm_p
  855. #define ZGEMM_DEFAULT_R zgemm_r
  856. #define XGEMM_DEFAULT_P xgemm_p
  857. #define XGEMM_DEFAULT_R xgemm_r
  858. #define SGEMM_DEFAULT_Q 128
  859. #define DGEMM_DEFAULT_Q 128
  860. #define QGEMM_DEFAULT_Q 128
  861. #define CGEMM_DEFAULT_Q 128
  862. #define ZGEMM_DEFAULT_Q 128
  863. #define XGEMM_DEFAULT_Q 128
  864. #endif
  865. #ifdef CORE_PRESCOTT
  866. #define SNUMOPT 4
  867. #define DNUMOPT 2
  868. #ifndef __64BIT__
  869. #define GEMM_DEFAULT_OFFSET_A 128
  870. #define GEMM_DEFAULT_OFFSET_B 192
  871. #else
  872. #define GEMM_DEFAULT_OFFSET_A 0
  873. #define GEMM_DEFAULT_OFFSET_B 256
  874. #endif
  875. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  876. #define SYMV_P 8
  877. #ifdef ARCH_X86
  878. #define SGEMM_DEFAULT_UNROLL_M 4
  879. #define DGEMM_DEFAULT_UNROLL_M 2
  880. #define QGEMM_DEFAULT_UNROLL_M 2
  881. #define CGEMM_DEFAULT_UNROLL_M 2
  882. #define ZGEMM_DEFAULT_UNROLL_M 1
  883. #define XGEMM_DEFAULT_UNROLL_M 1
  884. #else
  885. #define SGEMM_DEFAULT_UNROLL_M 8
  886. #define DGEMM_DEFAULT_UNROLL_M 4
  887. #define QGEMM_DEFAULT_UNROLL_M 2
  888. #define CGEMM_DEFAULT_UNROLL_M 4
  889. #define ZGEMM_DEFAULT_UNROLL_M 2
  890. #define XGEMM_DEFAULT_UNROLL_M 1
  891. #endif
  892. #define SGEMM_DEFAULT_UNROLL_N 4
  893. #define DGEMM_DEFAULT_UNROLL_N 4
  894. #define QGEMM_DEFAULT_UNROLL_N 2
  895. #define CGEMM_DEFAULT_UNROLL_N 2
  896. #define ZGEMM_DEFAULT_UNROLL_N 2
  897. #define XGEMM_DEFAULT_UNROLL_N 1
  898. #define SGEMM_DEFAULT_P sgemm_p
  899. #define SGEMM_DEFAULT_R sgemm_r
  900. #define DGEMM_DEFAULT_P dgemm_p
  901. #define DGEMM_DEFAULT_R dgemm_r
  902. #define QGEMM_DEFAULT_P qgemm_p
  903. #define QGEMM_DEFAULT_R qgemm_r
  904. #define CGEMM_DEFAULT_P cgemm_p
  905. #define CGEMM_DEFAULT_R cgemm_r
  906. #define ZGEMM_DEFAULT_P zgemm_p
  907. #define ZGEMM_DEFAULT_R zgemm_r
  908. #define XGEMM_DEFAULT_P xgemm_p
  909. #define XGEMM_DEFAULT_R xgemm_r
  910. #define SGEMM_DEFAULT_Q 128
  911. #define DGEMM_DEFAULT_Q 128
  912. #define QGEMM_DEFAULT_Q 128
  913. #define CGEMM_DEFAULT_Q 128
  914. #define ZGEMM_DEFAULT_Q 128
  915. #define XGEMM_DEFAULT_Q 128
  916. #endif
  917. #ifdef CORE2
  918. #define SNUMOPT 8
  919. #define DNUMOPT 4
  920. #define GEMM_DEFAULT_OFFSET_A 448
  921. #define GEMM_DEFAULT_OFFSET_B 128
  922. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  923. #define SYMV_P 8
  924. #define SWITCH_RATIO 4
  925. #ifdef ARCH_X86
  926. #define SGEMM_DEFAULT_UNROLL_M 8
  927. #define DGEMM_DEFAULT_UNROLL_M 4
  928. #define QGEMM_DEFAULT_UNROLL_M 2
  929. #define CGEMM_DEFAULT_UNROLL_M 4
  930. #define ZGEMM_DEFAULT_UNROLL_M 2
  931. #define XGEMM_DEFAULT_UNROLL_M 1
  932. #define SGEMM_DEFAULT_UNROLL_N 2
  933. #define DGEMM_DEFAULT_UNROLL_N 2
  934. #define QGEMM_DEFAULT_UNROLL_N 2
  935. #define CGEMM_DEFAULT_UNROLL_N 1
  936. #define ZGEMM_DEFAULT_UNROLL_N 1
  937. #define XGEMM_DEFAULT_UNROLL_N 1
  938. #define MASK(a, b) ((((a) + (b) - 1) / (b)) * (b))
  939. #else
  940. #define SGEMM_DEFAULT_UNROLL_M 8
  941. #define DGEMM_DEFAULT_UNROLL_M 4
  942. #define QGEMM_DEFAULT_UNROLL_M 2
  943. #define CGEMM_DEFAULT_UNROLL_M 4
  944. #define ZGEMM_DEFAULT_UNROLL_M 2
  945. #define XGEMM_DEFAULT_UNROLL_M 1
  946. #define SGEMM_DEFAULT_UNROLL_N 4
  947. #define DGEMM_DEFAULT_UNROLL_N 4
  948. #define QGEMM_DEFAULT_UNROLL_N 2
  949. #define CGEMM_DEFAULT_UNROLL_N 2
  950. #define ZGEMM_DEFAULT_UNROLL_N 2
  951. #define XGEMM_DEFAULT_UNROLL_N 1
  952. #endif
  953. #define SGEMM_DEFAULT_P sgemm_p
  954. #define SGEMM_DEFAULT_R sgemm_r
  955. #define DGEMM_DEFAULT_P dgemm_p
  956. #define DGEMM_DEFAULT_R dgemm_r
  957. #define QGEMM_DEFAULT_P qgemm_p
  958. #define QGEMM_DEFAULT_R qgemm_r
  959. #define CGEMM_DEFAULT_P cgemm_p
  960. #define CGEMM_DEFAULT_R cgemm_r
  961. #define ZGEMM_DEFAULT_P zgemm_p
  962. #define ZGEMM_DEFAULT_R zgemm_r
  963. #define XGEMM_DEFAULT_P xgemm_p
  964. #define XGEMM_DEFAULT_R xgemm_r
  965. #define SGEMM_DEFAULT_Q 256
  966. #define DGEMM_DEFAULT_Q 256
  967. #define QGEMM_DEFAULT_Q 256
  968. #define CGEMM_DEFAULT_Q 256
  969. #define ZGEMM_DEFAULT_Q 256
  970. #define XGEMM_DEFAULT_Q 256
  971. #endif
  972. #ifdef PENRYN
  973. #define SNUMOPT 8
  974. #define DNUMOPT 4
  975. #define GEMM_DEFAULT_OFFSET_A 128
  976. #define GEMM_DEFAULT_OFFSET_B 0
  977. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  978. #define SYMV_P 8
  979. #define SWITCH_RATIO 4
  980. #ifdef ARCH_X86
  981. #define SGEMM_DEFAULT_UNROLL_M 4
  982. #define DGEMM_DEFAULT_UNROLL_M 2
  983. #define QGEMM_DEFAULT_UNROLL_M 2
  984. #define CGEMM_DEFAULT_UNROLL_M 2
  985. #define ZGEMM_DEFAULT_UNROLL_M 1
  986. #define XGEMM_DEFAULT_UNROLL_M 1
  987. #define SGEMM_DEFAULT_UNROLL_N 4
  988. #define DGEMM_DEFAULT_UNROLL_N 4
  989. #define QGEMM_DEFAULT_UNROLL_N 2
  990. #define CGEMM_DEFAULT_UNROLL_N 2
  991. #define ZGEMM_DEFAULT_UNROLL_N 2
  992. #define XGEMM_DEFAULT_UNROLL_N 1
  993. #else
  994. #define SGEMM_DEFAULT_UNROLL_M 8
  995. #define DGEMM_DEFAULT_UNROLL_M 4
  996. #define QGEMM_DEFAULT_UNROLL_M 2
  997. #define CGEMM_DEFAULT_UNROLL_M 4
  998. #define ZGEMM_DEFAULT_UNROLL_M 2
  999. #define XGEMM_DEFAULT_UNROLL_M 1
  1000. #define SGEMM_DEFAULT_UNROLL_N 4
  1001. #define DGEMM_DEFAULT_UNROLL_N 4
  1002. #define QGEMM_DEFAULT_UNROLL_N 2
  1003. #define CGEMM_DEFAULT_UNROLL_N 2
  1004. #define ZGEMM_DEFAULT_UNROLL_N 2
  1005. #define XGEMM_DEFAULT_UNROLL_N 1
  1006. #endif
  1007. #define SGEMM_DEFAULT_P sgemm_p
  1008. #define SGEMM_DEFAULT_R sgemm_r
  1009. #define DGEMM_DEFAULT_P dgemm_p
  1010. #define DGEMM_DEFAULT_R dgemm_r
  1011. #define QGEMM_DEFAULT_P qgemm_p
  1012. #define QGEMM_DEFAULT_R qgemm_r
  1013. #define CGEMM_DEFAULT_P cgemm_p
  1014. #define CGEMM_DEFAULT_R cgemm_r
  1015. #define ZGEMM_DEFAULT_P zgemm_p
  1016. #define ZGEMM_DEFAULT_R zgemm_r
  1017. #define XGEMM_DEFAULT_P xgemm_p
  1018. #define XGEMM_DEFAULT_R xgemm_r
  1019. #define SGEMM_DEFAULT_Q 512
  1020. #define DGEMM_DEFAULT_Q 256
  1021. #define QGEMM_DEFAULT_Q 128
  1022. #define CGEMM_DEFAULT_Q 512
  1023. #define ZGEMM_DEFAULT_Q 256
  1024. #define XGEMM_DEFAULT_Q 128
  1025. #define GETRF_FACTOR 0.75
  1026. #endif
  1027. #ifdef DUNNINGTON
  1028. #define SNUMOPT 8
  1029. #define DNUMOPT 4
  1030. #define GEMM_DEFAULT_OFFSET_A 128
  1031. #define GEMM_DEFAULT_OFFSET_B 0
  1032. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1033. #define SYMV_P 8
  1034. #define SWITCH_RATIO 4
  1035. #ifdef ARCH_X86
  1036. #define SGEMM_DEFAULT_UNROLL_M 4
  1037. #define DGEMM_DEFAULT_UNROLL_M 2
  1038. #define QGEMM_DEFAULT_UNROLL_M 2
  1039. #define CGEMM_DEFAULT_UNROLL_M 2
  1040. #define ZGEMM_DEFAULT_UNROLL_M 1
  1041. #define XGEMM_DEFAULT_UNROLL_M 1
  1042. #define SGEMM_DEFAULT_UNROLL_N 4
  1043. #define DGEMM_DEFAULT_UNROLL_N 4
  1044. #define QGEMM_DEFAULT_UNROLL_N 2
  1045. #define CGEMM_DEFAULT_UNROLL_N 2
  1046. #define ZGEMM_DEFAULT_UNROLL_N 2
  1047. #define XGEMM_DEFAULT_UNROLL_N 1
  1048. #else
  1049. #define SGEMM_DEFAULT_UNROLL_M 8
  1050. #define DGEMM_DEFAULT_UNROLL_M 4
  1051. #define QGEMM_DEFAULT_UNROLL_M 2
  1052. #define CGEMM_DEFAULT_UNROLL_M 4
  1053. #define ZGEMM_DEFAULT_UNROLL_M 2
  1054. #define XGEMM_DEFAULT_UNROLL_M 1
  1055. #define SGEMM_DEFAULT_UNROLL_N 4
  1056. #define DGEMM_DEFAULT_UNROLL_N 4
  1057. #define QGEMM_DEFAULT_UNROLL_N 2
  1058. #define CGEMM_DEFAULT_UNROLL_N 2
  1059. #define ZGEMM_DEFAULT_UNROLL_N 2
  1060. #define XGEMM_DEFAULT_UNROLL_N 1
  1061. #endif
  1062. #define SGEMM_DEFAULT_P sgemm_p
  1063. #define SGEMM_DEFAULT_R sgemm_r
  1064. #define DGEMM_DEFAULT_P dgemm_p
  1065. #define DGEMM_DEFAULT_R dgemm_r
  1066. #define QGEMM_DEFAULT_P qgemm_p
  1067. #define QGEMM_DEFAULT_R qgemm_r
  1068. #define CGEMM_DEFAULT_P cgemm_p
  1069. #define CGEMM_DEFAULT_R cgemm_r
  1070. #define ZGEMM_DEFAULT_P zgemm_p
  1071. #define ZGEMM_DEFAULT_R zgemm_r
  1072. #define XGEMM_DEFAULT_P xgemm_p
  1073. #define XGEMM_DEFAULT_R xgemm_r
  1074. #define SGEMM_DEFAULT_Q 768
  1075. #define DGEMM_DEFAULT_Q 384
  1076. #define QGEMM_DEFAULT_Q 192
  1077. #define CGEMM_DEFAULT_Q 768
  1078. #define ZGEMM_DEFAULT_Q 384
  1079. #define XGEMM_DEFAULT_Q 192
  1080. #define GETRF_FACTOR 0.75
  1081. #define GEMM_THREAD gemm_thread_mn
  1082. #endif
  1083. #ifdef NEHALEM
  1084. #define SNUMOPT 8
  1085. #define DNUMOPT 4
  1086. #define GEMM_DEFAULT_OFFSET_A 32
  1087. #define GEMM_DEFAULT_OFFSET_B 0
  1088. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1089. #define SYMV_P 8
  1090. #define SWITCH_RATIO 4
  1091. #ifdef ARCH_X86
  1092. #define SGEMM_DEFAULT_UNROLL_M 4
  1093. #define DGEMM_DEFAULT_UNROLL_M 2
  1094. #define QGEMM_DEFAULT_UNROLL_M 2
  1095. #define CGEMM_DEFAULT_UNROLL_M 2
  1096. #define ZGEMM_DEFAULT_UNROLL_M 1
  1097. #define XGEMM_DEFAULT_UNROLL_M 1
  1098. #define SGEMM_DEFAULT_UNROLL_N 4
  1099. #define DGEMM_DEFAULT_UNROLL_N 4
  1100. #define QGEMM_DEFAULT_UNROLL_N 2
  1101. #define CGEMM_DEFAULT_UNROLL_N 2
  1102. #define ZGEMM_DEFAULT_UNROLL_N 2
  1103. #define XGEMM_DEFAULT_UNROLL_N 1
  1104. #else
  1105. #define SGEMM_DEFAULT_UNROLL_M 4
  1106. #define DGEMM_DEFAULT_UNROLL_M 2
  1107. #define QGEMM_DEFAULT_UNROLL_M 2
  1108. #define CGEMM_DEFAULT_UNROLL_M 2
  1109. #define ZGEMM_DEFAULT_UNROLL_M 1
  1110. #define XGEMM_DEFAULT_UNROLL_M 1
  1111. #define SGEMM_DEFAULT_UNROLL_N 8
  1112. #define DGEMM_DEFAULT_UNROLL_N 8
  1113. #define QGEMM_DEFAULT_UNROLL_N 2
  1114. #define CGEMM_DEFAULT_UNROLL_N 4
  1115. #define ZGEMM_DEFAULT_UNROLL_N 4
  1116. #define XGEMM_DEFAULT_UNROLL_N 1
  1117. #endif
  1118. #define SGEMM_DEFAULT_P 504
  1119. #define SGEMM_DEFAULT_R sgemm_r
  1120. #define DGEMM_DEFAULT_P 504
  1121. #define DGEMM_DEFAULT_R dgemm_r
  1122. #define QGEMM_DEFAULT_P 504
  1123. #define QGEMM_DEFAULT_R qgemm_r
  1124. #define CGEMM_DEFAULT_P 252
  1125. #define CGEMM_DEFAULT_R cgemm_r
  1126. #define ZGEMM_DEFAULT_P 252
  1127. #define ZGEMM_DEFAULT_R zgemm_r
  1128. #define XGEMM_DEFAULT_P 252
  1129. #define XGEMM_DEFAULT_R xgemm_r
  1130. #define SGEMM_DEFAULT_Q 512
  1131. #define DGEMM_DEFAULT_Q 256
  1132. #define QGEMM_DEFAULT_Q 128
  1133. #define CGEMM_DEFAULT_Q 512
  1134. #define ZGEMM_DEFAULT_Q 256
  1135. #define XGEMM_DEFAULT_Q 128
  1136. #define GETRF_FACTOR 0.72
  1137. #endif
  1138. #ifdef SANDYBRIDGE
  1139. #define SNUMOPT 8
  1140. #define DNUMOPT 4
  1141. #define GEMM_DEFAULT_OFFSET_A 0
  1142. #define GEMM_DEFAULT_OFFSET_B 0
  1143. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1144. #define SYMV_P 8
  1145. #define SWITCH_RATIO 4
  1146. #ifdef ARCH_X86
  1147. #define SGEMM_DEFAULT_UNROLL_M 4
  1148. #define DGEMM_DEFAULT_UNROLL_M 2
  1149. #define QGEMM_DEFAULT_UNROLL_M 2
  1150. #define CGEMM_DEFAULT_UNROLL_M 2
  1151. #define ZGEMM_DEFAULT_UNROLL_M 1
  1152. #define XGEMM_DEFAULT_UNROLL_M 1
  1153. #define SGEMM_DEFAULT_UNROLL_N 4
  1154. #define DGEMM_DEFAULT_UNROLL_N 4
  1155. #define QGEMM_DEFAULT_UNROLL_N 2
  1156. #define CGEMM_DEFAULT_UNROLL_N 2
  1157. #define ZGEMM_DEFAULT_UNROLL_N 2
  1158. #define XGEMM_DEFAULT_UNROLL_N 1
  1159. #else
  1160. #define SGEMM_DEFAULT_UNROLL_M 16
  1161. #define DGEMM_DEFAULT_UNROLL_M 8
  1162. #define QGEMM_DEFAULT_UNROLL_M 2
  1163. #define CGEMM_DEFAULT_UNROLL_M 8
  1164. #define ZGEMM_DEFAULT_UNROLL_M 1
  1165. #define XGEMM_DEFAULT_UNROLL_M 1
  1166. #define SGEMM_DEFAULT_UNROLL_N 4
  1167. #define DGEMM_DEFAULT_UNROLL_N 4
  1168. #define QGEMM_DEFAULT_UNROLL_N 2
  1169. #define CGEMM_DEFAULT_UNROLL_N 2
  1170. #define ZGEMM_DEFAULT_UNROLL_N 4
  1171. #define XGEMM_DEFAULT_UNROLL_N 1
  1172. #endif
  1173. #define SGEMM_DEFAULT_P 768
  1174. #define SGEMM_DEFAULT_R sgemm_r
  1175. //#define SGEMM_DEFAULT_R 1024
  1176. #define DGEMM_DEFAULT_P 512
  1177. #define DGEMM_DEFAULT_R dgemm_r
  1178. //#define DGEMM_DEFAULT_R 1024
  1179. #define QGEMM_DEFAULT_P 504
  1180. #define QGEMM_DEFAULT_R qgemm_r
  1181. #define CGEMM_DEFAULT_P 768
  1182. #define CGEMM_DEFAULT_R cgemm_r
  1183. //#define CGEMM_DEFAULT_R 1024
  1184. #define ZGEMM_DEFAULT_P 512
  1185. #define ZGEMM_DEFAULT_R zgemm_r
  1186. //#define ZGEMM_DEFAULT_R 1024
  1187. #define XGEMM_DEFAULT_P 252
  1188. #define XGEMM_DEFAULT_R xgemm_r
  1189. #define SGEMM_DEFAULT_Q 384
  1190. #define DGEMM_DEFAULT_Q 256
  1191. #define QGEMM_DEFAULT_Q 128
  1192. #define CGEMM_DEFAULT_Q 512
  1193. #define ZGEMM_DEFAULT_Q 192
  1194. #define XGEMM_DEFAULT_Q 128
  1195. #define CGEMM3M_DEFAULT_UNROLL_N 8
  1196. #define CGEMM3M_DEFAULT_UNROLL_M 4
  1197. #define ZGEMM3M_DEFAULT_UNROLL_N 8
  1198. #define ZGEMM3M_DEFAULT_UNROLL_M 2
  1199. #define CGEMM3M_DEFAULT_P 448
  1200. #define ZGEMM3M_DEFAULT_P 224
  1201. #define XGEMM3M_DEFAULT_P 112
  1202. #define CGEMM3M_DEFAULT_Q 224
  1203. #define ZGEMM3M_DEFAULT_Q 224
  1204. #define XGEMM3M_DEFAULT_Q 224
  1205. #define CGEMM3M_DEFAULT_R 12288
  1206. #define ZGEMM3M_DEFAULT_R 12288
  1207. #define XGEMM3M_DEFAULT_R 12288
  1208. #define GETRF_FACTOR 0.72
  1209. #endif
  1210. #ifdef HASWELL
  1211. #define SNUMOPT 16
  1212. #define DNUMOPT 8
  1213. #define GEMM_DEFAULT_OFFSET_A 0
  1214. #define GEMM_DEFAULT_OFFSET_B 0
  1215. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1216. #define SYMV_P 8
  1217. #define SWITCH_RATIO 32
  1218. #define GEMM_PREFERED_SIZE 16
  1219. #ifdef ARCH_X86
  1220. #define SGEMM_DEFAULT_UNROLL_M 4
  1221. #define DGEMM_DEFAULT_UNROLL_M 2
  1222. #define QGEMM_DEFAULT_UNROLL_M 2
  1223. #define CGEMM_DEFAULT_UNROLL_M 2
  1224. #define ZGEMM_DEFAULT_UNROLL_M 1
  1225. #define XGEMM_DEFAULT_UNROLL_M 1
  1226. #define SGEMM_DEFAULT_UNROLL_N 4
  1227. #define DGEMM_DEFAULT_UNROLL_N 4
  1228. #define QGEMM_DEFAULT_UNROLL_N 2
  1229. #define CGEMM_DEFAULT_UNROLL_N 2
  1230. #define ZGEMM_DEFAULT_UNROLL_N 2
  1231. #define XGEMM_DEFAULT_UNROLL_N 1
  1232. #else
  1233. #define SGEMM_DEFAULT_UNROLL_M 16
  1234. #define DGEMM_DEFAULT_UNROLL_M 4
  1235. #define QGEMM_DEFAULT_UNROLL_M 2
  1236. #define CGEMM_DEFAULT_UNROLL_M 8
  1237. #define ZGEMM_DEFAULT_UNROLL_M 4
  1238. #define XGEMM_DEFAULT_UNROLL_M 1
  1239. #define SGEMM_DEFAULT_UNROLL_N 4
  1240. #define DGEMM_DEFAULT_UNROLL_N 8
  1241. #define QGEMM_DEFAULT_UNROLL_N 2
  1242. #define CGEMM_DEFAULT_UNROLL_N 2
  1243. #define ZGEMM_DEFAULT_UNROLL_N 2
  1244. #define XGEMM_DEFAULT_UNROLL_N 1
  1245. #define SGEMM_DEFAULT_UNROLL_MN 32
  1246. #define DGEMM_DEFAULT_UNROLL_MN 32
  1247. #endif
  1248. #ifdef ARCH_X86
  1249. #define SGEMM_DEFAULT_P 512
  1250. #define SGEMM_DEFAULT_R sgemm_r
  1251. #define DGEMM_DEFAULT_P 512
  1252. #define DGEMM_DEFAULT_R dgemm_r
  1253. #define QGEMM_DEFAULT_P 504
  1254. #define QGEMM_DEFAULT_R qgemm_r
  1255. #define CGEMM_DEFAULT_P 128
  1256. #define CGEMM_DEFAULT_R 1024
  1257. #define ZGEMM_DEFAULT_P 512
  1258. #define ZGEMM_DEFAULT_R zgemm_r
  1259. #define XGEMM_DEFAULT_P 252
  1260. #define XGEMM_DEFAULT_R xgemm_r
  1261. #define SGEMM_DEFAULT_Q 256
  1262. #define DGEMM_DEFAULT_Q 256
  1263. #define QGEMM_DEFAULT_Q 128
  1264. #define CGEMM_DEFAULT_Q 256
  1265. #define ZGEMM_DEFAULT_Q 192
  1266. #define XGEMM_DEFAULT_Q 128
  1267. #else
  1268. #define SGEMM_DEFAULT_P 768
  1269. #define DGEMM_DEFAULT_P 512
  1270. #define CGEMM_DEFAULT_P 384
  1271. #define ZGEMM_DEFAULT_P 256
  1272. #ifdef WINDOWS_ABI
  1273. #define SGEMM_DEFAULT_Q 320
  1274. #define DGEMM_DEFAULT_Q 128
  1275. #else
  1276. #define SGEMM_DEFAULT_Q 384
  1277. #define DGEMM_DEFAULT_Q 256
  1278. #endif
  1279. #define CGEMM_DEFAULT_Q 192
  1280. #define ZGEMM_DEFAULT_Q 128
  1281. #define SGEMM_DEFAULT_R sgemm_r
  1282. #define DGEMM_DEFAULT_R 13824
  1283. #define CGEMM_DEFAULT_R cgemm_r
  1284. #define ZGEMM_DEFAULT_R zgemm_r
  1285. #define QGEMM_DEFAULT_Q 128
  1286. #define QGEMM_DEFAULT_P 504
  1287. #define QGEMM_DEFAULT_R qgemm_r
  1288. #define XGEMM_DEFAULT_P 252
  1289. #define XGEMM_DEFAULT_R xgemm_r
  1290. #define XGEMM_DEFAULT_Q 128
  1291. #define CGEMM3M_DEFAULT_UNROLL_N 8
  1292. #define CGEMM3M_DEFAULT_UNROLL_M 4
  1293. #define ZGEMM3M_DEFAULT_UNROLL_N 8
  1294. #define ZGEMM3M_DEFAULT_UNROLL_M 2
  1295. #define CGEMM3M_DEFAULT_P 448
  1296. #define ZGEMM3M_DEFAULT_P 224
  1297. #define XGEMM3M_DEFAULT_P 112
  1298. #define CGEMM3M_DEFAULT_Q 224
  1299. #define ZGEMM3M_DEFAULT_Q 224
  1300. #define XGEMM3M_DEFAULT_Q 224
  1301. #define CGEMM3M_DEFAULT_R 12288
  1302. #define ZGEMM3M_DEFAULT_R 12288
  1303. #define XGEMM3M_DEFAULT_R 12288
  1304. #endif
  1305. #endif
  1306. #ifdef SKYLAKEX
  1307. #define SNUMOPT 16
  1308. #define DNUMOPT 8
  1309. #define GEMM_DEFAULT_OFFSET_A 0
  1310. #define GEMM_DEFAULT_OFFSET_B 0
  1311. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1312. #define SYMV_P 8
  1313. #define SWITCH_RATIO 32
  1314. #define GEMM_PREFERED_SIZE 32
  1315. #define USE_SGEMM_KERNEL_DIRECT 1
  1316. #ifdef ARCH_X86
  1317. #define SGEMM_DEFAULT_UNROLL_M 4
  1318. #define DGEMM_DEFAULT_UNROLL_M 2
  1319. #define QGEMM_DEFAULT_UNROLL_M 2
  1320. #define CGEMM_DEFAULT_UNROLL_M 2
  1321. #define ZGEMM_DEFAULT_UNROLL_M 1
  1322. #define XGEMM_DEFAULT_UNROLL_M 1
  1323. #define SGEMM_DEFAULT_UNROLL_N 4
  1324. #define DGEMM_DEFAULT_UNROLL_N 4
  1325. #define QGEMM_DEFAULT_UNROLL_N 2
  1326. #define CGEMM_DEFAULT_UNROLL_N 2
  1327. #define ZGEMM_DEFAULT_UNROLL_N 2
  1328. #define XGEMM_DEFAULT_UNROLL_N 1
  1329. #else
  1330. #define SGEMM_DEFAULT_UNROLL_M 16
  1331. #define DGEMM_DEFAULT_UNROLL_M 4
  1332. #define QGEMM_DEFAULT_UNROLL_M 2
  1333. #define CGEMM_DEFAULT_UNROLL_M 8
  1334. #define ZGEMM_DEFAULT_UNROLL_M 4
  1335. #define XGEMM_DEFAULT_UNROLL_M 1
  1336. #define SGEMM_DEFAULT_UNROLL_N 4
  1337. #define DGEMM_DEFAULT_UNROLL_N 8
  1338. #define QGEMM_DEFAULT_UNROLL_N 2
  1339. #define CGEMM_DEFAULT_UNROLL_N 2
  1340. #define ZGEMM_DEFAULT_UNROLL_N 2
  1341. #define XGEMM_DEFAULT_UNROLL_N 1
  1342. #define SGEMM_DEFAULT_UNROLL_MN 32
  1343. #define DGEMM_DEFAULT_UNROLL_MN 32
  1344. #endif
  1345. #ifdef ARCH_X86
  1346. #define SGEMM_DEFAULT_P 512
  1347. #define SGEMM_DEFAULT_R sgemm_r
  1348. #define DGEMM_DEFAULT_P 512
  1349. #define DGEMM_DEFAULT_R dgemm_r
  1350. #define QGEMM_DEFAULT_P 504
  1351. #define QGEMM_DEFAULT_R qgemm_r
  1352. #define CGEMM_DEFAULT_P 128
  1353. #define CGEMM_DEFAULT_R 1024
  1354. #define ZGEMM_DEFAULT_P 512
  1355. #define ZGEMM_DEFAULT_R zgemm_r
  1356. #define XGEMM_DEFAULT_P 252
  1357. #define XGEMM_DEFAULT_R xgemm_r
  1358. #define SGEMM_DEFAULT_Q 256
  1359. #define DGEMM_DEFAULT_Q 256
  1360. #define QGEMM_DEFAULT_Q 128
  1361. #define CGEMM_DEFAULT_Q 256
  1362. #define ZGEMM_DEFAULT_Q 192
  1363. #define XGEMM_DEFAULT_Q 128
  1364. #else
  1365. #define SGEMM_DEFAULT_P 768
  1366. #define DGEMM_DEFAULT_P 512
  1367. #define CGEMM_DEFAULT_P 384
  1368. #define ZGEMM_DEFAULT_P 256
  1369. #ifdef WINDOWS_ABI
  1370. #define SGEMM_DEFAULT_Q 320
  1371. #define DGEMM_DEFAULT_Q 128
  1372. #else
  1373. #define SGEMM_DEFAULT_Q 384
  1374. #define DGEMM_DEFAULT_Q 256
  1375. #endif
  1376. #define CGEMM_DEFAULT_Q 192
  1377. #define ZGEMM_DEFAULT_Q 128
  1378. #define SGEMM_DEFAULT_R sgemm_r
  1379. #define DGEMM_DEFAULT_R 13824
  1380. #define CGEMM_DEFAULT_R cgemm_r
  1381. #define ZGEMM_DEFAULT_R zgemm_r
  1382. #define QGEMM_DEFAULT_Q 128
  1383. #define QGEMM_DEFAULT_P 504
  1384. #define QGEMM_DEFAULT_R qgemm_r
  1385. #define XGEMM_DEFAULT_P 252
  1386. #define XGEMM_DEFAULT_R xgemm_r
  1387. #define XGEMM_DEFAULT_Q 128
  1388. #define CGEMM3M_DEFAULT_UNROLL_N 8
  1389. #define CGEMM3M_DEFAULT_UNROLL_M 4
  1390. #define ZGEMM3M_DEFAULT_UNROLL_N 8
  1391. #define ZGEMM3M_DEFAULT_UNROLL_M 2
  1392. #define CGEMM3M_DEFAULT_P 448
  1393. #define ZGEMM3M_DEFAULT_P 224
  1394. #define XGEMM3M_DEFAULT_P 112
  1395. #define CGEMM3M_DEFAULT_Q 224
  1396. #define ZGEMM3M_DEFAULT_Q 224
  1397. #define XGEMM3M_DEFAULT_Q 224
  1398. #define CGEMM3M_DEFAULT_R 12288
  1399. #define ZGEMM3M_DEFAULT_R 12288
  1400. #define XGEMM3M_DEFAULT_R 12288
  1401. #endif
  1402. #endif
  1403. #ifdef ATOM
  1404. #define SNUMOPT 2
  1405. #define DNUMOPT 1
  1406. #define GEMM_DEFAULT_OFFSET_A 64
  1407. #define GEMM_DEFAULT_OFFSET_B 0
  1408. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1409. #define SYMV_P 8
  1410. #ifdef ARCH_X86
  1411. #define SGEMM_DEFAULT_UNROLL_M 4
  1412. #define DGEMM_DEFAULT_UNROLL_M 2
  1413. #define QGEMM_DEFAULT_UNROLL_M 2
  1414. #define CGEMM_DEFAULT_UNROLL_M 2
  1415. #define ZGEMM_DEFAULT_UNROLL_M 1
  1416. #define XGEMM_DEFAULT_UNROLL_M 1
  1417. #else
  1418. #define SGEMM_DEFAULT_UNROLL_M 8
  1419. #define DGEMM_DEFAULT_UNROLL_M 4
  1420. #define QGEMM_DEFAULT_UNROLL_M 2
  1421. #define CGEMM_DEFAULT_UNROLL_M 4
  1422. #define ZGEMM_DEFAULT_UNROLL_M 2
  1423. #define XGEMM_DEFAULT_UNROLL_M 1
  1424. #endif
  1425. #define SGEMM_DEFAULT_UNROLL_N 4
  1426. #define DGEMM_DEFAULT_UNROLL_N 2
  1427. #define QGEMM_DEFAULT_UNROLL_N 2
  1428. #define CGEMM_DEFAULT_UNROLL_N 2
  1429. #define ZGEMM_DEFAULT_UNROLL_N 1
  1430. #define XGEMM_DEFAULT_UNROLL_N 1
  1431. #define SGEMM_DEFAULT_P sgemm_p
  1432. #define SGEMM_DEFAULT_R sgemm_r
  1433. #define DGEMM_DEFAULT_P dgemm_p
  1434. #define DGEMM_DEFAULT_R dgemm_r
  1435. #define QGEMM_DEFAULT_P qgemm_p
  1436. #define QGEMM_DEFAULT_R qgemm_r
  1437. #define CGEMM_DEFAULT_P cgemm_p
  1438. #define CGEMM_DEFAULT_R cgemm_r
  1439. #define ZGEMM_DEFAULT_P zgemm_p
  1440. #define ZGEMM_DEFAULT_R zgemm_r
  1441. #define XGEMM_DEFAULT_P xgemm_p
  1442. #define XGEMM_DEFAULT_R xgemm_r
  1443. #define SGEMM_DEFAULT_Q 256
  1444. #define DGEMM_DEFAULT_Q 256
  1445. #define QGEMM_DEFAULT_Q 256
  1446. #define CGEMM_DEFAULT_Q 256
  1447. #define ZGEMM_DEFAULT_Q 256
  1448. #define XGEMM_DEFAULT_Q 256
  1449. #endif
  1450. #ifdef ITANIUM2
  1451. #define SNUMOPT 4
  1452. #define DNUMOPT 4
  1453. #define GEMM_DEFAULT_OFFSET_A 0
  1454. #define GEMM_DEFAULT_OFFSET_B 128
  1455. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1456. #define SGEMM_DEFAULT_UNROLL_M 8
  1457. #define SGEMM_DEFAULT_UNROLL_N 8
  1458. #define DGEMM_DEFAULT_UNROLL_M 8
  1459. #define DGEMM_DEFAULT_UNROLL_N 8
  1460. #define QGEMM_DEFAULT_UNROLL_M 8
  1461. #define QGEMM_DEFAULT_UNROLL_N 8
  1462. #define CGEMM_DEFAULT_UNROLL_M 4
  1463. #define CGEMM_DEFAULT_UNROLL_N 4
  1464. #define ZGEMM_DEFAULT_UNROLL_M 4
  1465. #define ZGEMM_DEFAULT_UNROLL_N 4
  1466. #define XGEMM_DEFAULT_UNROLL_M 4
  1467. #define XGEMM_DEFAULT_UNROLL_N 4
  1468. #define SGEMM_DEFAULT_P sgemm_p
  1469. #define DGEMM_DEFAULT_P dgemm_p
  1470. #define QGEMM_DEFAULT_P qgemm_p
  1471. #define CGEMM_DEFAULT_P cgemm_p
  1472. #define ZGEMM_DEFAULT_P zgemm_p
  1473. #define XGEMM_DEFAULT_P xgemm_p
  1474. #define SGEMM_DEFAULT_Q 1024
  1475. #define DGEMM_DEFAULT_Q 1024
  1476. #define QGEMM_DEFAULT_Q 1024
  1477. #define CGEMM_DEFAULT_Q 1024
  1478. #define ZGEMM_DEFAULT_Q 1024
  1479. #define XGEMM_DEFAULT_Q 1024
  1480. #define SGEMM_DEFAULT_R sgemm_r
  1481. #define DGEMM_DEFAULT_R dgemm_r
  1482. #define QGEMM_DEFAULT_R qgemm_r
  1483. #define CGEMM_DEFAULT_R cgemm_r
  1484. #define ZGEMM_DEFAULT_R zgemm_r
  1485. #define XGEMM_DEFAULT_R xgemm_r
  1486. #define SYMV_P 16
  1487. #define GETRF_FACTOR 0.65
  1488. #endif
  1489. #if defined(EV4) || defined(EV5) || defined(EV6)
  1490. #ifdef EV4
  1491. #define SNUMOPT 1
  1492. #define DNUMOPT 1
  1493. #else
  1494. #define SNUMOPT 2
  1495. #define DNUMOPT 2
  1496. #endif
  1497. #define GEMM_DEFAULT_OFFSET_A 512
  1498. #define GEMM_DEFAULT_OFFSET_B 512
  1499. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1500. #define SGEMM_DEFAULT_UNROLL_M 4
  1501. #define SGEMM_DEFAULT_UNROLL_N 4
  1502. #define DGEMM_DEFAULT_UNROLL_M 4
  1503. #define DGEMM_DEFAULT_UNROLL_N 4
  1504. #define CGEMM_DEFAULT_UNROLL_M 2
  1505. #define CGEMM_DEFAULT_UNROLL_N 2
  1506. #define ZGEMM_DEFAULT_UNROLL_M 2
  1507. #define ZGEMM_DEFAULT_UNROLL_N 2
  1508. #define SYMV_P 8
  1509. #ifdef EV4
  1510. #define SGEMM_DEFAULT_P 32
  1511. #define SGEMM_DEFAULT_Q 112
  1512. #define SGEMM_DEFAULT_R 256
  1513. #define DGEMM_DEFAULT_P 32
  1514. #define DGEMM_DEFAULT_Q 56
  1515. #define DGEMM_DEFAULT_R 256
  1516. #define CGEMM_DEFAULT_P 32
  1517. #define CGEMM_DEFAULT_Q 64
  1518. #define CGEMM_DEFAULT_R 240
  1519. #define ZGEMM_DEFAULT_P 32
  1520. #define ZGEMM_DEFAULT_Q 32
  1521. #define ZGEMM_DEFAULT_R 240
  1522. #endif
  1523. #ifdef EV5
  1524. #define SGEMM_DEFAULT_P 64
  1525. #define SGEMM_DEFAULT_Q 256
  1526. #define DGEMM_DEFAULT_P 64
  1527. #define DGEMM_DEFAULT_Q 128
  1528. #define CGEMM_DEFAULT_P 64
  1529. #define CGEMM_DEFAULT_Q 128
  1530. #define ZGEMM_DEFAULT_P 64
  1531. #define ZGEMM_DEFAULT_Q 64
  1532. #endif
  1533. #ifdef EV6
  1534. #define SGEMM_DEFAULT_P 256
  1535. #define SGEMM_DEFAULT_Q 512
  1536. #define DGEMM_DEFAULT_P 256
  1537. #define DGEMM_DEFAULT_Q 256
  1538. #define CGEMM_DEFAULT_P 256
  1539. #define CGEMM_DEFAULT_Q 256
  1540. #define ZGEMM_DEFAULT_P 128
  1541. #define ZGEMM_DEFAULT_Q 256
  1542. #endif
  1543. #endif
  1544. #ifdef CELL
  1545. #define SNUMOPT 2
  1546. #define DNUMOPT 2
  1547. #define GEMM_DEFAULT_OFFSET_A 0
  1548. #define GEMM_DEFAULT_OFFSET_B 8192
  1549. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1550. #define SGEMM_DEFAULT_UNROLL_M 16
  1551. #define SGEMM_DEFAULT_UNROLL_N 4
  1552. #define DGEMM_DEFAULT_UNROLL_M 4
  1553. #define DGEMM_DEFAULT_UNROLL_N 4
  1554. #define CGEMM_DEFAULT_UNROLL_M 8
  1555. #define CGEMM_DEFAULT_UNROLL_N 2
  1556. #define ZGEMM_DEFAULT_UNROLL_M 2
  1557. #define ZGEMM_DEFAULT_UNROLL_N 2
  1558. #define SGEMM_DEFAULT_P 128
  1559. #define DGEMM_DEFAULT_P 128
  1560. #define CGEMM_DEFAULT_P 128
  1561. #define ZGEMM_DEFAULT_P 128
  1562. #define SGEMM_DEFAULT_Q 512
  1563. #define DGEMM_DEFAULT_Q 256
  1564. #define CGEMM_DEFAULT_Q 256
  1565. #define ZGEMM_DEFAULT_Q 128
  1566. #define SYMV_P 4
  1567. #endif
  1568. #ifdef PPCG4
  1569. #define GEMM_DEFAULT_OFFSET_A 0
  1570. #define GEMM_DEFAULT_OFFSET_B 1024
  1571. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1572. #define SGEMM_DEFAULT_UNROLL_M 16
  1573. #define SGEMM_DEFAULT_UNROLL_N 4
  1574. #define DGEMM_DEFAULT_UNROLL_M 4
  1575. #define DGEMM_DEFAULT_UNROLL_N 4
  1576. #define CGEMM_DEFAULT_UNROLL_M 8
  1577. #define CGEMM_DEFAULT_UNROLL_N 2
  1578. #define ZGEMM_DEFAULT_UNROLL_M 2
  1579. #define ZGEMM_DEFAULT_UNROLL_N 2
  1580. #define SGEMM_DEFAULT_P 256
  1581. #define DGEMM_DEFAULT_P 128
  1582. #define CGEMM_DEFAULT_P 128
  1583. #define ZGEMM_DEFAULT_P 64
  1584. #define SGEMM_DEFAULT_Q 256
  1585. #define DGEMM_DEFAULT_Q 256
  1586. #define CGEMM_DEFAULT_Q 256
  1587. #define ZGEMM_DEFAULT_Q 256
  1588. #define SYMV_P 4
  1589. #endif
  1590. #ifdef PPC970
  1591. #define SNUMOPT 4
  1592. #define DNUMOPT 4
  1593. #define GEMM_DEFAULT_OFFSET_A 2688
  1594. #define GEMM_DEFAULT_OFFSET_B 3072
  1595. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1596. #define SGEMM_DEFAULT_UNROLL_M 16
  1597. #define SGEMM_DEFAULT_UNROLL_N 4
  1598. #define DGEMM_DEFAULT_UNROLL_M 4
  1599. #define DGEMM_DEFAULT_UNROLL_N 4
  1600. #define CGEMM_DEFAULT_UNROLL_M 8
  1601. #define CGEMM_DEFAULT_UNROLL_N 2
  1602. #define ZGEMM_DEFAULT_UNROLL_M 2
  1603. #define ZGEMM_DEFAULT_UNROLL_N 2
  1604. #ifdef OS_LINUX
  1605. #if L2_SIZE == 1024976
  1606. #define SGEMM_DEFAULT_P 320
  1607. #define DGEMM_DEFAULT_P 256
  1608. #define CGEMM_DEFAULT_P 256
  1609. #define ZGEMM_DEFAULT_P 256
  1610. #else
  1611. #define SGEMM_DEFAULT_P 176
  1612. #define DGEMM_DEFAULT_P 176
  1613. #define CGEMM_DEFAULT_P 176
  1614. #define ZGEMM_DEFAULT_P 176
  1615. #endif
  1616. #endif
  1617. #define SGEMM_DEFAULT_Q 512
  1618. #define DGEMM_DEFAULT_Q 256
  1619. #define CGEMM_DEFAULT_Q 256
  1620. #define ZGEMM_DEFAULT_Q 128
  1621. #define SYMV_P 4
  1622. #endif
  1623. #ifdef PPC440
  1624. #define SNUMOPT 2
  1625. #define DNUMOPT 2
  1626. #define GEMM_DEFAULT_OFFSET_A (32 * 0)
  1627. #define GEMM_DEFAULT_OFFSET_B (32 * 0)
  1628. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1629. #define SGEMM_DEFAULT_UNROLL_M 4
  1630. #define SGEMM_DEFAULT_UNROLL_N 4
  1631. #define DGEMM_DEFAULT_UNROLL_M 4
  1632. #define DGEMM_DEFAULT_UNROLL_N 4
  1633. #define CGEMM_DEFAULT_UNROLL_M 2
  1634. #define CGEMM_DEFAULT_UNROLL_N 2
  1635. #define ZGEMM_DEFAULT_UNROLL_M 2
  1636. #define ZGEMM_DEFAULT_UNROLL_N 2
  1637. #define SGEMM_DEFAULT_P 512
  1638. #define DGEMM_DEFAULT_P 512
  1639. #define CGEMM_DEFAULT_P 512
  1640. #define ZGEMM_DEFAULT_P 512
  1641. #define SGEMM_DEFAULT_Q 1024
  1642. #define DGEMM_DEFAULT_Q 512
  1643. #define CGEMM_DEFAULT_Q 512
  1644. #define ZGEMM_DEFAULT_Q 256
  1645. #define SGEMM_DEFAULT_R SGEMM_DEFAULT_P
  1646. #define DGEMM_DEFAULT_R DGEMM_DEFAULT_P
  1647. #define CGEMM_DEFAULT_R CGEMM_DEFAULT_P
  1648. #define ZGEMM_DEFAULT_R ZGEMM_DEFAULT_P
  1649. #define SYMV_P 4
  1650. #endif
  1651. #ifdef PPC440FP2
  1652. #define SNUMOPT 4
  1653. #define DNUMOPT 4
  1654. #define GEMM_DEFAULT_OFFSET_A (32 * 0)
  1655. #define GEMM_DEFAULT_OFFSET_B (32 * 0)
  1656. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1657. #define SGEMM_DEFAULT_UNROLL_M 8
  1658. #define SGEMM_DEFAULT_UNROLL_N 4
  1659. #define DGEMM_DEFAULT_UNROLL_M 8
  1660. #define DGEMM_DEFAULT_UNROLL_N 4
  1661. #define CGEMM_DEFAULT_UNROLL_M 4
  1662. #define CGEMM_DEFAULT_UNROLL_N 2
  1663. #define ZGEMM_DEFAULT_UNROLL_M 4
  1664. #define ZGEMM_DEFAULT_UNROLL_N 2
  1665. #define SGEMM_DEFAULT_P 128
  1666. #define DGEMM_DEFAULT_P 128
  1667. #define CGEMM_DEFAULT_P 128
  1668. #define ZGEMM_DEFAULT_P 128
  1669. #if 1
  1670. #define SGEMM_DEFAULT_Q 4096
  1671. #define DGEMM_DEFAULT_Q 3072
  1672. #define CGEMM_DEFAULT_Q 2048
  1673. #define ZGEMM_DEFAULT_Q 1024
  1674. #else
  1675. #define SGEMM_DEFAULT_Q 512
  1676. #define DGEMM_DEFAULT_Q 256
  1677. #define CGEMM_DEFAULT_Q 256
  1678. #define ZGEMM_DEFAULT_Q 128
  1679. #endif
  1680. #define SYMV_P 4
  1681. #endif
  1682. #if defined(POWER3) || defined(POWER4) || defined(POWER5)
  1683. #define GEMM_DEFAULT_OFFSET_A 0
  1684. #define GEMM_DEFAULT_OFFSET_B 2048
  1685. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1686. #define SGEMM_DEFAULT_UNROLL_M 4
  1687. #define SGEMM_DEFAULT_UNROLL_N 4
  1688. #define DGEMM_DEFAULT_UNROLL_M 4
  1689. #define DGEMM_DEFAULT_UNROLL_N 4
  1690. #define CGEMM_DEFAULT_UNROLL_M 2
  1691. #define CGEMM_DEFAULT_UNROLL_N 2
  1692. #define ZGEMM_DEFAULT_UNROLL_M 2
  1693. #define ZGEMM_DEFAULT_UNROLL_N 2
  1694. #ifdef POWER3
  1695. #define SNUMOPT 4
  1696. #define DNUMOPT 4
  1697. #define SGEMM_DEFAULT_P 256
  1698. #define SGEMM_DEFAULT_Q 432
  1699. #define SGEMM_DEFAULT_R 1012
  1700. #define DGEMM_DEFAULT_P 256
  1701. #define DGEMM_DEFAULT_Q 216
  1702. #define DGEMM_DEFAULT_R 1012
  1703. #define ZGEMM_DEFAULT_P 256
  1704. #define ZGEMM_DEFAULT_Q 104
  1705. #define ZGEMM_DEFAULT_R 1012
  1706. #endif
  1707. #if defined(POWER4)
  1708. #ifdef ALLOC_HUGETLB
  1709. #define SGEMM_DEFAULT_P 184
  1710. #define DGEMM_DEFAULT_P 184
  1711. #define CGEMM_DEFAULT_P 184
  1712. #define ZGEMM_DEFAULT_P 184
  1713. #else
  1714. #define SGEMM_DEFAULT_P 144
  1715. #define DGEMM_DEFAULT_P 144
  1716. #define CGEMM_DEFAULT_P 144
  1717. #define ZGEMM_DEFAULT_P 144
  1718. #endif
  1719. #endif
  1720. #if defined(POWER5)
  1721. #ifdef ALLOC_HUGETLB
  1722. #define SGEMM_DEFAULT_P 512
  1723. #define DGEMM_DEFAULT_P 256
  1724. #define CGEMM_DEFAULT_P 256
  1725. #define ZGEMM_DEFAULT_P 128
  1726. #else
  1727. #define SGEMM_DEFAULT_P 320
  1728. #define DGEMM_DEFAULT_P 160
  1729. #define CGEMM_DEFAULT_P 160
  1730. #define ZGEMM_DEFAULT_P 80
  1731. #endif
  1732. #define SGEMM_DEFAULT_Q 256
  1733. #define CGEMM_DEFAULT_Q 256
  1734. #define DGEMM_DEFAULT_Q 256
  1735. #define ZGEMM_DEFAULT_Q 256
  1736. #endif
  1737. #define SYMV_P 8
  1738. #endif
  1739. #if defined(POWER6)
  1740. #define SNUMOPT 4
  1741. #define DNUMOPT 4
  1742. #define GEMM_DEFAULT_OFFSET_A 384
  1743. #define GEMM_DEFAULT_OFFSET_B 1024
  1744. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1745. #define SGEMM_DEFAULT_UNROLL_M 4
  1746. #define SGEMM_DEFAULT_UNROLL_N 4
  1747. #define DGEMM_DEFAULT_UNROLL_M 4
  1748. #define DGEMM_DEFAULT_UNROLL_N 4
  1749. #define CGEMM_DEFAULT_UNROLL_M 2
  1750. #define CGEMM_DEFAULT_UNROLL_N 4
  1751. #define ZGEMM_DEFAULT_UNROLL_M 2
  1752. #define ZGEMM_DEFAULT_UNROLL_N 4
  1753. #define SGEMM_DEFAULT_P 992
  1754. #define DGEMM_DEFAULT_P 480
  1755. #define CGEMM_DEFAULT_P 488
  1756. #define ZGEMM_DEFAULT_P 248
  1757. #define SGEMM_DEFAULT_Q 504
  1758. #define DGEMM_DEFAULT_Q 504
  1759. #define CGEMM_DEFAULT_Q 400
  1760. #define ZGEMM_DEFAULT_Q 400
  1761. #define SYMV_P 8
  1762. #endif
  1763. #if defined(POWER8)
  1764. #define SNUMOPT 16
  1765. #define DNUMOPT 8
  1766. #define GEMM_DEFAULT_OFFSET_A 0
  1767. #define GEMM_DEFAULT_OFFSET_B 65536
  1768. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1769. #define SGEMM_DEFAULT_UNROLL_M 16
  1770. #define SGEMM_DEFAULT_UNROLL_N 8
  1771. #define DGEMM_DEFAULT_UNROLL_M 16
  1772. #define DGEMM_DEFAULT_UNROLL_N 4
  1773. #define CGEMM_DEFAULT_UNROLL_M 8
  1774. #define CGEMM_DEFAULT_UNROLL_N 4
  1775. #define ZGEMM_DEFAULT_UNROLL_M 8
  1776. #define ZGEMM_DEFAULT_UNROLL_N 2
  1777. #define SGEMM_DEFAULT_P 1280
  1778. #define DGEMM_DEFAULT_P 640
  1779. #define CGEMM_DEFAULT_P 640
  1780. #define ZGEMM_DEFAULT_P 320
  1781. #define SGEMM_DEFAULT_Q 640
  1782. #define DGEMM_DEFAULT_Q 720
  1783. #define CGEMM_DEFAULT_Q 640
  1784. #define ZGEMM_DEFAULT_Q 640
  1785. #define SYMV_P 8
  1786. #endif
  1787. #if defined(SPARC) && defined(V7)
  1788. #define SNUMOPT 4
  1789. #define DNUMOPT 4
  1790. #define GEMM_DEFAULT_OFFSET_A 0
  1791. #define GEMM_DEFAULT_OFFSET_B 2048
  1792. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1793. #define SGEMM_DEFAULT_UNROLL_M 2
  1794. #define SGEMM_DEFAULT_UNROLL_N 8
  1795. #define DGEMM_DEFAULT_UNROLL_M 2
  1796. #define DGEMM_DEFAULT_UNROLL_N 8
  1797. #define CGEMM_DEFAULT_UNROLL_M 1
  1798. #define CGEMM_DEFAULT_UNROLL_N 4
  1799. #define ZGEMM_DEFAULT_UNROLL_M 1
  1800. #define ZGEMM_DEFAULT_UNROLL_N 4
  1801. #define SGEMM_DEFAULT_P 256
  1802. #define DGEMM_DEFAULT_P 256
  1803. #define CGEMM_DEFAULT_P 256
  1804. #define ZGEMM_DEFAULT_P 256
  1805. #define SGEMM_DEFAULT_Q 512
  1806. #define DGEMM_DEFAULT_Q 256
  1807. #define CGEMM_DEFAULT_Q 256
  1808. #define ZGEMM_DEFAULT_Q 128
  1809. #define SYMV_P 8
  1810. #define GEMM_THREAD gemm_thread_mn
  1811. #endif
  1812. #if (defined(SPARC) && defined(V9)) || defined(__sparc_v9__)
  1813. #define SNUMOPT 2
  1814. #define DNUMOPT 2
  1815. #define GEMM_DEFAULT_OFFSET_A 0
  1816. #define GEMM_DEFAULT_OFFSET_B 2048
  1817. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1818. #define SGEMM_DEFAULT_UNROLL_M 4
  1819. #define SGEMM_DEFAULT_UNROLL_N 4
  1820. #define DGEMM_DEFAULT_UNROLL_M 4
  1821. #define DGEMM_DEFAULT_UNROLL_N 4
  1822. #define CGEMM_DEFAULT_UNROLL_M 2
  1823. #define CGEMM_DEFAULT_UNROLL_N 2
  1824. #define ZGEMM_DEFAULT_UNROLL_M 2
  1825. #define ZGEMM_DEFAULT_UNROLL_N 2
  1826. #define SGEMM_DEFAULT_P 512
  1827. #define DGEMM_DEFAULT_P 512
  1828. #define CGEMM_DEFAULT_P 512
  1829. #define ZGEMM_DEFAULT_P 512
  1830. #define SGEMM_DEFAULT_Q 1024
  1831. #define DGEMM_DEFAULT_Q 512
  1832. #define CGEMM_DEFAULT_Q 512
  1833. #define ZGEMM_DEFAULT_Q 256
  1834. #define SYMV_P 8
  1835. #endif
  1836. #ifdef SICORTEX
  1837. #define SNUMOPT 2
  1838. #define DNUMOPT 2
  1839. #define GEMM_DEFAULT_OFFSET_A 0
  1840. #define GEMM_DEFAULT_OFFSET_B 0
  1841. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1842. #define SGEMM_DEFAULT_UNROLL_M 2
  1843. #define SGEMM_DEFAULT_UNROLL_N 8
  1844. #define DGEMM_DEFAULT_UNROLL_M 2
  1845. #define DGEMM_DEFAULT_UNROLL_N 8
  1846. #define CGEMM_DEFAULT_UNROLL_M 1
  1847. #define CGEMM_DEFAULT_UNROLL_N 4
  1848. #define ZGEMM_DEFAULT_UNROLL_M 1
  1849. #define ZGEMM_DEFAULT_UNROLL_N 4
  1850. #define SGEMM_DEFAULT_P 108
  1851. #define DGEMM_DEFAULT_P 112
  1852. #define CGEMM_DEFAULT_P 108
  1853. #define ZGEMM_DEFAULT_P 112
  1854. #define SGEMM_DEFAULT_Q 288
  1855. #define DGEMM_DEFAULT_Q 144
  1856. #define CGEMM_DEFAULT_Q 144
  1857. #define ZGEMM_DEFAULT_Q 72
  1858. #define SGEMM_DEFAULT_R 2000
  1859. #define DGEMM_DEFAULT_R 2000
  1860. #define CGEMM_DEFAULT_R 2000
  1861. #define ZGEMM_DEFAULT_R 2000
  1862. #define SYMV_P 16
  1863. #endif
  1864. #ifdef LOONGSON3A
  1865. ////Copy from SICORTEX
  1866. #define SNUMOPT 2
  1867. #define DNUMOPT 2
  1868. #define GEMM_DEFAULT_OFFSET_A 0
  1869. #define GEMM_DEFAULT_OFFSET_B 0
  1870. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1871. #define SGEMM_DEFAULT_UNROLL_M 8
  1872. #define SGEMM_DEFAULT_UNROLL_N 4
  1873. #define DGEMM_DEFAULT_UNROLL_M 4
  1874. #define DGEMM_DEFAULT_UNROLL_N 4
  1875. #define CGEMM_DEFAULT_UNROLL_M 4
  1876. #define CGEMM_DEFAULT_UNROLL_N 2
  1877. #define ZGEMM_DEFAULT_UNROLL_M 2
  1878. #define ZGEMM_DEFAULT_UNROLL_N 2
  1879. #define SGEMM_DEFAULT_P 64
  1880. #define DGEMM_DEFAULT_P 44
  1881. #define CGEMM_DEFAULT_P 64
  1882. #define ZGEMM_DEFAULT_P 32
  1883. #define SGEMM_DEFAULT_Q 192
  1884. #define DGEMM_DEFAULT_Q 92
  1885. #define CGEMM_DEFAULT_Q 128
  1886. #define ZGEMM_DEFAULT_Q 80
  1887. #define SGEMM_DEFAULT_R 640
  1888. #define DGEMM_DEFAULT_R dgemm_r
  1889. #define CGEMM_DEFAULT_R 640
  1890. #define ZGEMM_DEFAULT_R 640
  1891. #define GEMM_OFFSET_A1 0x10000
  1892. #define GEMM_OFFSET_B1 0x100000
  1893. #define SYMV_P 16
  1894. #endif
  1895. #ifdef LOONGSON3B
  1896. #define SNUMOPT 2
  1897. #define DNUMOPT 2
  1898. #define GEMM_DEFAULT_OFFSET_A 0
  1899. #define GEMM_DEFAULT_OFFSET_B 0
  1900. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1901. #define SGEMM_DEFAULT_UNROLL_M 2
  1902. #define SGEMM_DEFAULT_UNROLL_N 2
  1903. #define DGEMM_DEFAULT_UNROLL_M 2
  1904. #define DGEMM_DEFAULT_UNROLL_N 2
  1905. #define CGEMM_DEFAULT_UNROLL_M 2
  1906. #define CGEMM_DEFAULT_UNROLL_N 2
  1907. #define ZGEMM_DEFAULT_UNROLL_M 2
  1908. #define ZGEMM_DEFAULT_UNROLL_N 2
  1909. #define SGEMM_DEFAULT_P 64
  1910. #define DGEMM_DEFAULT_P 24
  1911. #define CGEMM_DEFAULT_P 24
  1912. #define ZGEMM_DEFAULT_P 20
  1913. #define SGEMM_DEFAULT_Q 192
  1914. #define DGEMM_DEFAULT_Q 128
  1915. #define CGEMM_DEFAULT_Q 128
  1916. #define ZGEMM_DEFAULT_Q 64
  1917. #define SGEMM_DEFAULT_R 512
  1918. #define DGEMM_DEFAULT_R 512
  1919. #define CGEMM_DEFAULT_R 512
  1920. #define ZGEMM_DEFAULT_R 512
  1921. #define GEMM_OFFSET_A1 0x10000
  1922. #define GEMM_OFFSET_B1 0x100000
  1923. #define SYMV_P 16
  1924. #endif
  1925. #if defined(P5600) || defined(MIPS1004K) || defined(I6400) || defined(P6600) || defined(I6500)
  1926. #define SNUMOPT 2
  1927. #define DNUMOPT 2
  1928. #define GEMM_DEFAULT_OFFSET_A 0
  1929. #define GEMM_DEFAULT_OFFSET_B 0
  1930. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1931. #ifdef HAVE_MSA
  1932. #define SGEMM_DEFAULT_UNROLL_M 8
  1933. #define SGEMM_DEFAULT_UNROLL_N 8
  1934. #define DGEMM_DEFAULT_UNROLL_M 8
  1935. #define DGEMM_DEFAULT_UNROLL_N 4
  1936. #define CGEMM_DEFAULT_UNROLL_M 8
  1937. #define CGEMM_DEFAULT_UNROLL_N 4
  1938. #define ZGEMM_DEFAULT_UNROLL_M 4
  1939. #define ZGEMM_DEFAULT_UNROLL_N 4
  1940. #else
  1941. #define SGEMM_DEFAULT_UNROLL_M 2
  1942. #define SGEMM_DEFAULT_UNROLL_N 2
  1943. #define DGEMM_DEFAULT_UNROLL_M 2
  1944. #define DGEMM_DEFAULT_UNROLL_N 2
  1945. #define CGEMM_DEFAULT_UNROLL_M 2
  1946. #define CGEMM_DEFAULT_UNROLL_N 2
  1947. #define ZGEMM_DEFAULT_UNROLL_M 2
  1948. #define ZGEMM_DEFAULT_UNROLL_N 2
  1949. #endif
  1950. #define SGEMM_DEFAULT_P 128
  1951. #define DGEMM_DEFAULT_P 128
  1952. #define CGEMM_DEFAULT_P 96
  1953. #define ZGEMM_DEFAULT_P 64
  1954. #define SGEMM_DEFAULT_Q 240
  1955. #define DGEMM_DEFAULT_Q 120
  1956. #define CGEMM_DEFAULT_Q 120
  1957. #define ZGEMM_DEFAULT_Q 120
  1958. #define SGEMM_DEFAULT_R 12288
  1959. #define DGEMM_DEFAULT_R 8192
  1960. #define CGEMM_DEFAULT_R 4096
  1961. #define ZGEMM_DEFAULT_R 4096
  1962. #define SYMV_P 16
  1963. #endif
  1964. #ifdef ARMV7
  1965. #define SNUMOPT 2
  1966. #define DNUMOPT 2
  1967. #define GEMM_DEFAULT_OFFSET_A 0
  1968. #define GEMM_DEFAULT_OFFSET_B 0
  1969. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1970. #define SGEMM_DEFAULT_UNROLL_M 4
  1971. #define SGEMM_DEFAULT_UNROLL_N 4
  1972. #define DGEMM_DEFAULT_UNROLL_M 4
  1973. #define DGEMM_DEFAULT_UNROLL_N 4
  1974. #define CGEMM_DEFAULT_UNROLL_M 2
  1975. #define CGEMM_DEFAULT_UNROLL_N 2
  1976. #define ZGEMM_DEFAULT_UNROLL_M 2
  1977. #define ZGEMM_DEFAULT_UNROLL_N 2
  1978. #define SGEMM_DEFAULT_P 128
  1979. #define DGEMM_DEFAULT_P 128
  1980. #define CGEMM_DEFAULT_P 96
  1981. #define ZGEMM_DEFAULT_P 64
  1982. #define SGEMM_DEFAULT_Q 240
  1983. #define DGEMM_DEFAULT_Q 120
  1984. #define CGEMM_DEFAULT_Q 120
  1985. #define ZGEMM_DEFAULT_Q 120
  1986. #define SGEMM_DEFAULT_R 12288
  1987. #define DGEMM_DEFAULT_R 8192
  1988. #define CGEMM_DEFAULT_R 4096
  1989. #define ZGEMM_DEFAULT_R 4096
  1990. #define SYMV_P 16
  1991. #endif
  1992. #if defined(ARMV6)
  1993. #define SNUMOPT 2
  1994. #define DNUMOPT 2
  1995. #define GEMM_DEFAULT_OFFSET_A 0
  1996. #define GEMM_DEFAULT_OFFSET_B 0
  1997. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1998. #define SGEMM_DEFAULT_UNROLL_M 4
  1999. #define SGEMM_DEFAULT_UNROLL_N 2
  2000. #define DGEMM_DEFAULT_UNROLL_M 4
  2001. #define DGEMM_DEFAULT_UNROLL_N 2
  2002. #define CGEMM_DEFAULT_UNROLL_M 2
  2003. #define CGEMM_DEFAULT_UNROLL_N 2
  2004. #define ZGEMM_DEFAULT_UNROLL_M 2
  2005. #define ZGEMM_DEFAULT_UNROLL_N 2
  2006. #define SGEMM_DEFAULT_P 128
  2007. #define DGEMM_DEFAULT_P 128
  2008. #define CGEMM_DEFAULT_P 96
  2009. #define ZGEMM_DEFAULT_P 64
  2010. #define SGEMM_DEFAULT_Q 240
  2011. #define DGEMM_DEFAULT_Q 120
  2012. #define CGEMM_DEFAULT_Q 120
  2013. #define ZGEMM_DEFAULT_Q 120
  2014. #define SGEMM_DEFAULT_R 12288
  2015. #define DGEMM_DEFAULT_R 8192
  2016. #define CGEMM_DEFAULT_R 4096
  2017. #define ZGEMM_DEFAULT_R 4096
  2018. #define SYMV_P 16
  2019. #endif
  2020. // Common ARMv8 parameters
  2021. #if defined(ARMV8)
  2022. #define SNUMOPT 2
  2023. #define DNUMOPT 2
  2024. #define GEMM_DEFAULT_OFFSET_A 0
  2025. #define GEMM_DEFAULT_OFFSET_B 0
  2026. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2027. #define SYMV_P 16
  2028. // Darwin / Cross
  2029. #if defined(OS_DARWIN) && defined(CROSS)
  2030. #define SGEMM_DEFAULT_UNROLL_M 2
  2031. #define SGEMM_DEFAULT_UNROLL_N 2
  2032. #define DGEMM_DEFAULT_UNROLL_M 2
  2033. #define DGEMM_DEFAULT_UNROLL_N 2
  2034. #define CGEMM_DEFAULT_UNROLL_M 2
  2035. #define CGEMM_DEFAULT_UNROLL_N 2
  2036. #define ZGEMM_DEFAULT_UNROLL_M 2
  2037. #define ZGEMM_DEFAULT_UNROLL_N 2
  2038. #define SGEMM_DEFAULT_P 128
  2039. #define DGEMM_DEFAULT_P 128
  2040. #define CGEMM_DEFAULT_P 96
  2041. #define ZGEMM_DEFAULT_P 64
  2042. #define SGEMM_DEFAULT_Q 240
  2043. #define DGEMM_DEFAULT_Q 120
  2044. #define CGEMM_DEFAULT_Q 120
  2045. #define ZGEMM_DEFAULT_Q 120
  2046. #define SGEMM_DEFAULT_R 12288
  2047. #define DGEMM_DEFAULT_R 8192
  2048. #define CGEMM_DEFAULT_R 4096
  2049. #define ZGEMM_DEFAULT_R 4096
  2050. #else // Linux / Native
  2051. #if defined(CORTEXA53) || defined(CORTEXA57) || \
  2052. defined(CORTEXA72) || defined(CORTEXA73) || \
  2053. defined(FALKOR)
  2054. #define SGEMM_DEFAULT_UNROLL_M 16
  2055. #define SGEMM_DEFAULT_UNROLL_N 4
  2056. #define DGEMM_DEFAULT_UNROLL_M 8
  2057. #define DGEMM_DEFAULT_UNROLL_N 4
  2058. #define CGEMM_DEFAULT_UNROLL_M 8
  2059. #define CGEMM_DEFAULT_UNROLL_N 4
  2060. #define ZGEMM_DEFAULT_UNROLL_M 4
  2061. #define ZGEMM_DEFAULT_UNROLL_N 4
  2062. #define SGEMM_DEFAULT_P 512
  2063. #define DGEMM_DEFAULT_P 256
  2064. #define CGEMM_DEFAULT_P 256
  2065. #define ZGEMM_DEFAULT_P 128
  2066. #define SGEMM_DEFAULT_Q 1024
  2067. #define DGEMM_DEFAULT_Q 512
  2068. #define CGEMM_DEFAULT_Q 512
  2069. #define ZGEMM_DEFAULT_Q 512
  2070. #define SGEMM_DEFAULT_R 4096
  2071. #define DGEMM_DEFAULT_R 4096
  2072. #define CGEMM_DEFAULT_R 4096
  2073. #define ZGEMM_DEFAULT_R 2048
  2074. #elif defined(THUNDERX)
  2075. #define SGEMM_DEFAULT_UNROLL_M 4
  2076. #define SGEMM_DEFAULT_UNROLL_N 4
  2077. #define DGEMM_DEFAULT_UNROLL_M 2
  2078. #define DGEMM_DEFAULT_UNROLL_N 2
  2079. #define CGEMM_DEFAULT_UNROLL_M 2
  2080. #define CGEMM_DEFAULT_UNROLL_N 2
  2081. #define ZGEMM_DEFAULT_UNROLL_M 2
  2082. #define ZGEMM_DEFAULT_UNROLL_N 2
  2083. #define SGEMM_DEFAULT_P 128
  2084. #define DGEMM_DEFAULT_P 128
  2085. #define CGEMM_DEFAULT_P 96
  2086. #define ZGEMM_DEFAULT_P 64
  2087. #define SGEMM_DEFAULT_Q 240
  2088. #define DGEMM_DEFAULT_Q 120
  2089. #define CGEMM_DEFAULT_Q 120
  2090. #define ZGEMM_DEFAULT_Q 120
  2091. #define SGEMM_DEFAULT_R 12288
  2092. #define DGEMM_DEFAULT_R 8192
  2093. #define CGEMM_DEFAULT_R 4096
  2094. #define ZGEMM_DEFAULT_R 4096
  2095. #elif defined(THUNDERX2T99)
  2096. #define SGEMM_DEFAULT_UNROLL_M 16
  2097. #define SGEMM_DEFAULT_UNROLL_N 4
  2098. #define DGEMM_DEFAULT_UNROLL_M 8
  2099. #define DGEMM_DEFAULT_UNROLL_N 4
  2100. #define CGEMM_DEFAULT_UNROLL_M 8
  2101. #define CGEMM_DEFAULT_UNROLL_N 4
  2102. #define ZGEMM_DEFAULT_UNROLL_M 4
  2103. #define ZGEMM_DEFAULT_UNROLL_N 4
  2104. #define SGEMM_DEFAULT_P 128
  2105. #define DGEMM_DEFAULT_P 160
  2106. #define CGEMM_DEFAULT_P 128
  2107. #define ZGEMM_DEFAULT_P 128
  2108. #define SGEMM_DEFAULT_Q 352
  2109. #define DGEMM_DEFAULT_Q 128
  2110. #define CGEMM_DEFAULT_Q 224
  2111. #define ZGEMM_DEFAULT_Q 112
  2112. #define SGEMM_DEFAULT_R 4096
  2113. #define DGEMM_DEFAULT_R 4096
  2114. #define CGEMM_DEFAULT_R 4096
  2115. #define ZGEMM_DEFAULT_R 4096
  2116. #else // Other/undetected ARMv8 cores
  2117. #define SGEMM_DEFAULT_UNROLL_M 16
  2118. #define SGEMM_DEFAULT_UNROLL_N 4
  2119. #define DGEMM_DEFAULT_UNROLL_M 8
  2120. #define DGEMM_DEFAULT_UNROLL_N 4
  2121. #define CGEMM_DEFAULT_UNROLL_M 8
  2122. #define CGEMM_DEFAULT_UNROLL_N 4
  2123. #define ZGEMM_DEFAULT_UNROLL_M 4
  2124. #define ZGEMM_DEFAULT_UNROLL_N 4
  2125. #define SGEMM_DEFAULT_P 128
  2126. #define DGEMM_DEFAULT_P 160
  2127. #define CGEMM_DEFAULT_P 128
  2128. #define ZGEMM_DEFAULT_P 128
  2129. #define SGEMM_DEFAULT_Q 352
  2130. #define DGEMM_DEFAULT_Q 128
  2131. #define CGEMM_DEFAULT_Q 224
  2132. #define ZGEMM_DEFAULT_Q 112
  2133. #define SGEMM_DEFAULT_R 4096
  2134. #define DGEMM_DEFAULT_R 4096
  2135. #define CGEMM_DEFAULT_R 4096
  2136. #define ZGEMM_DEFAULT_R 4096
  2137. #endif // Cores
  2138. #endif // Linux / Darwin
  2139. #endif // ARMv8
  2140. #if defined(ARMV5)
  2141. #define SNUMOPT 2
  2142. #define DNUMOPT 2
  2143. #define GEMM_DEFAULT_OFFSET_A 0
  2144. #define GEMM_DEFAULT_OFFSET_B 0
  2145. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2146. #define SGEMM_DEFAULT_UNROLL_M 2
  2147. #define SGEMM_DEFAULT_UNROLL_N 2
  2148. #define DGEMM_DEFAULT_UNROLL_M 2
  2149. #define DGEMM_DEFAULT_UNROLL_N 2
  2150. #define CGEMM_DEFAULT_UNROLL_M 2
  2151. #define CGEMM_DEFAULT_UNROLL_N 2
  2152. #define ZGEMM_DEFAULT_UNROLL_M 2
  2153. #define ZGEMM_DEFAULT_UNROLL_N 2
  2154. #define SGEMM_DEFAULT_P 128
  2155. #define DGEMM_DEFAULT_P 128
  2156. #define CGEMM_DEFAULT_P 96
  2157. #define ZGEMM_DEFAULT_P 64
  2158. #define SGEMM_DEFAULT_Q 240
  2159. #define DGEMM_DEFAULT_Q 120
  2160. #define CGEMM_DEFAULT_Q 120
  2161. #define ZGEMM_DEFAULT_Q 120
  2162. #define SGEMM_DEFAULT_R 12288
  2163. #define DGEMM_DEFAULT_R 8192
  2164. #define CGEMM_DEFAULT_R 4096
  2165. #define ZGEMM_DEFAULT_R 4096
  2166. #define SYMV_P 16
  2167. #endif
  2168. #ifdef CORTEXA9
  2169. #define SNUMOPT 2
  2170. #define DNUMOPT 2
  2171. #define GEMM_DEFAULT_OFFSET_A 0
  2172. #define GEMM_DEFAULT_OFFSET_B 0
  2173. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2174. #define SGEMM_DEFAULT_UNROLL_M 4
  2175. #define SGEMM_DEFAULT_UNROLL_N 4
  2176. #define DGEMM_DEFAULT_UNROLL_M 4
  2177. #define DGEMM_DEFAULT_UNROLL_N 4
  2178. #define CGEMM_DEFAULT_UNROLL_M 2
  2179. #define CGEMM_DEFAULT_UNROLL_N 2
  2180. #define ZGEMM_DEFAULT_UNROLL_M 2
  2181. #define ZGEMM_DEFAULT_UNROLL_N 2
  2182. #define SGEMM_DEFAULT_P 128
  2183. #define DGEMM_DEFAULT_P 128
  2184. #define CGEMM_DEFAULT_P 96
  2185. #define ZGEMM_DEFAULT_P 64
  2186. #define SGEMM_DEFAULT_Q 240
  2187. #define DGEMM_DEFAULT_Q 120
  2188. #define CGEMM_DEFAULT_Q 120
  2189. #define ZGEMM_DEFAULT_Q 120
  2190. #define SGEMM_DEFAULT_R 12288
  2191. #define DGEMM_DEFAULT_R 8192
  2192. #define CGEMM_DEFAULT_R 4096
  2193. #define ZGEMM_DEFAULT_R 4096
  2194. #define SYMV_P 16
  2195. #endif
  2196. #ifdef CORTEXA15
  2197. #define SNUMOPT 2
  2198. #define DNUMOPT 2
  2199. #define GEMM_DEFAULT_OFFSET_A 0
  2200. #define GEMM_DEFAULT_OFFSET_B 0
  2201. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2202. #define SGEMM_DEFAULT_UNROLL_M 4
  2203. #define SGEMM_DEFAULT_UNROLL_N 4
  2204. #define DGEMM_DEFAULT_UNROLL_M 4
  2205. #define DGEMM_DEFAULT_UNROLL_N 4
  2206. #define CGEMM_DEFAULT_UNROLL_M 2
  2207. #define CGEMM_DEFAULT_UNROLL_N 2
  2208. #define ZGEMM_DEFAULT_UNROLL_M 2
  2209. #define ZGEMM_DEFAULT_UNROLL_N 2
  2210. #define SGEMM_DEFAULT_P 128
  2211. #define DGEMM_DEFAULT_P 128
  2212. #define CGEMM_DEFAULT_P 96
  2213. #define ZGEMM_DEFAULT_P 64
  2214. #define SGEMM_DEFAULT_Q 240
  2215. #define DGEMM_DEFAULT_Q 120
  2216. #define CGEMM_DEFAULT_Q 120
  2217. #define ZGEMM_DEFAULT_Q 120
  2218. #define SGEMM_DEFAULT_R 12288
  2219. #define DGEMM_DEFAULT_R 8192
  2220. #define CGEMM_DEFAULT_R 4096
  2221. #define ZGEMM_DEFAULT_R 4096
  2222. #define SYMV_P 16
  2223. #endif
  2224. #if defined(ZARCH_GENERIC)
  2225. #define SNUMOPT 2
  2226. #define DNUMOPT 2
  2227. #define GEMM_DEFAULT_OFFSET_A 0
  2228. #define GEMM_DEFAULT_OFFSET_B 0
  2229. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2230. #define SGEMM_DEFAULT_UNROLL_M 2
  2231. #define SGEMM_DEFAULT_UNROLL_N 2
  2232. #define DGEMM_DEFAULT_UNROLL_M 2
  2233. #define DGEMM_DEFAULT_UNROLL_N 2
  2234. #define CGEMM_DEFAULT_UNROLL_M 2
  2235. #define CGEMM_DEFAULT_UNROLL_N 2
  2236. #define ZGEMM_DEFAULT_UNROLL_M 2
  2237. #define ZGEMM_DEFAULT_UNROLL_N 2
  2238. #define SGEMM_DEFAULT_P 128
  2239. #define DGEMM_DEFAULT_P 128
  2240. #define CGEMM_DEFAULT_P 96
  2241. #define ZGEMM_DEFAULT_P 64
  2242. #define SGEMM_DEFAULT_Q 240
  2243. #define DGEMM_DEFAULT_Q 120
  2244. #define CGEMM_DEFAULT_Q 120
  2245. #define ZGEMM_DEFAULT_Q 120
  2246. #define SGEMM_DEFAULT_R 12288
  2247. #define DGEMM_DEFAULT_R 8192
  2248. #define CGEMM_DEFAULT_R 4096
  2249. #define ZGEMM_DEFAULT_R 4096
  2250. #define SYMV_P 16
  2251. #endif
  2252. #if defined(Z13)
  2253. #define SNUMOPT 2
  2254. #define DNUMOPT 2
  2255. #define GEMM_DEFAULT_OFFSET_A 0
  2256. #define GEMM_DEFAULT_OFFSET_B 0
  2257. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2258. #define SGEMM_DEFAULT_UNROLL_M 8
  2259. #define SGEMM_DEFAULT_UNROLL_N 4
  2260. #define DGEMM_DEFAULT_UNROLL_M 8
  2261. #define DGEMM_DEFAULT_UNROLL_N 4
  2262. #define CGEMM_DEFAULT_UNROLL_M 4
  2263. #define CGEMM_DEFAULT_UNROLL_N 4
  2264. #define ZGEMM_DEFAULT_UNROLL_M 4
  2265. #define ZGEMM_DEFAULT_UNROLL_N 4
  2266. #define SGEMM_DEFAULT_P 456
  2267. #define DGEMM_DEFAULT_P 320
  2268. #define CGEMM_DEFAULT_P 480
  2269. #define ZGEMM_DEFAULT_P 224
  2270. #define SGEMM_DEFAULT_Q 488
  2271. #define DGEMM_DEFAULT_Q 384
  2272. #define CGEMM_DEFAULT_Q 128
  2273. #define ZGEMM_DEFAULT_Q 352
  2274. #define SGEMM_DEFAULT_R 8192
  2275. #define DGEMM_DEFAULT_R 4096
  2276. #define CGEMM_DEFAULT_R 4096
  2277. #define ZGEMM_DEFAULT_R 2048
  2278. #define SYMV_P 16
  2279. #endif
  2280. #if defined(Z14)
  2281. #define SNUMOPT 2
  2282. #define DNUMOPT 2
  2283. #define GEMM_DEFAULT_OFFSET_A 0
  2284. #define GEMM_DEFAULT_OFFSET_B 0
  2285. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2286. #define SGEMM_DEFAULT_UNROLL_M 8
  2287. #define SGEMM_DEFAULT_UNROLL_N 4
  2288. #define DGEMM_DEFAULT_UNROLL_M 8
  2289. #define DGEMM_DEFAULT_UNROLL_N 4
  2290. #define CGEMM_DEFAULT_UNROLL_M 4
  2291. #define CGEMM_DEFAULT_UNROLL_N 4
  2292. #define ZGEMM_DEFAULT_UNROLL_M 4
  2293. #define ZGEMM_DEFAULT_UNROLL_N 4
  2294. #define SGEMM_DEFAULT_P 456
  2295. #define DGEMM_DEFAULT_P 320
  2296. #define CGEMM_DEFAULT_P 480
  2297. #define ZGEMM_DEFAULT_P 224
  2298. #define SGEMM_DEFAULT_Q 488
  2299. #define DGEMM_DEFAULT_Q 384
  2300. #define CGEMM_DEFAULT_Q 128
  2301. #define ZGEMM_DEFAULT_Q 352
  2302. #define SGEMM_DEFAULT_R 8192
  2303. #define DGEMM_DEFAULT_R 4096
  2304. #define CGEMM_DEFAULT_R 4096
  2305. #define ZGEMM_DEFAULT_R 2048
  2306. #define SYMV_P 16
  2307. #endif
  2308. #ifdef GENERIC
  2309. #define SNUMOPT 2
  2310. #define DNUMOPT 2
  2311. #define GEMM_DEFAULT_OFFSET_A 0
  2312. #define GEMM_DEFAULT_OFFSET_B 0
  2313. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  2314. #define SGEMM_DEFAULT_UNROLL_N 2
  2315. #define DGEMM_DEFAULT_UNROLL_N 2
  2316. #define QGEMM_DEFAULT_UNROLL_N 2
  2317. #define CGEMM_DEFAULT_UNROLL_N 2
  2318. #define ZGEMM_DEFAULT_UNROLL_N 2
  2319. #define XGEMM_DEFAULT_UNROLL_N 1
  2320. #ifdef ARCH_X86
  2321. #define SGEMM_DEFAULT_UNROLL_M 2
  2322. #define DGEMM_DEFAULT_UNROLL_M 2
  2323. #define QGEMM_DEFAULT_UNROLL_M 2
  2324. #define CGEMM_DEFAULT_UNROLL_M 2
  2325. #define ZGEMM_DEFAULT_UNROLL_M 2
  2326. #define XGEMM_DEFAULT_UNROLL_M 1
  2327. #else
  2328. #define SGEMM_DEFAULT_UNROLL_M 2
  2329. #define DGEMM_DEFAULT_UNROLL_M 2
  2330. #define QGEMM_DEFAULT_UNROLL_M 2
  2331. #define CGEMM_DEFAULT_UNROLL_M 2
  2332. #define ZGEMM_DEFAULT_UNROLL_M 2
  2333. #define XGEMM_DEFAULT_UNROLL_M 1
  2334. #endif
  2335. #define SGEMM_DEFAULT_P sgemm_p
  2336. #define DGEMM_DEFAULT_P dgemm_p
  2337. #define QGEMM_DEFAULT_P qgemm_p
  2338. #define CGEMM_DEFAULT_P cgemm_p
  2339. #define ZGEMM_DEFAULT_P zgemm_p
  2340. #define XGEMM_DEFAULT_P xgemm_p
  2341. #define SGEMM_DEFAULT_R sgemm_r
  2342. #define DGEMM_DEFAULT_R dgemm_r
  2343. #define QGEMM_DEFAULT_R qgemm_r
  2344. #define CGEMM_DEFAULT_R cgemm_r
  2345. #define ZGEMM_DEFAULT_R zgemm_r
  2346. #define XGEMM_DEFAULT_R xgemm_r
  2347. #define SGEMM_DEFAULT_Q 128
  2348. #define DGEMM_DEFAULT_Q 128
  2349. #define QGEMM_DEFAULT_Q 128
  2350. #define CGEMM_DEFAULT_Q 128
  2351. #define ZGEMM_DEFAULT_Q 128
  2352. #define XGEMM_DEFAULT_Q 128
  2353. #define SYMV_P 16
  2354. #endif
  2355. #ifndef QGEMM_DEFAULT_UNROLL_M
  2356. #define QGEMM_DEFAULT_UNROLL_M 2
  2357. #endif
  2358. #ifndef QGEMM_DEFAULT_UNROLL_N
  2359. #define QGEMM_DEFAULT_UNROLL_N 2
  2360. #endif
  2361. #ifndef XGEMM_DEFAULT_UNROLL_M
  2362. #define XGEMM_DEFAULT_UNROLL_M 2
  2363. #endif
  2364. #ifndef XGEMM_DEFAULT_UNROLL_N
  2365. #define XGEMM_DEFAULT_UNROLL_N 2
  2366. #endif
  2367. #ifndef HAVE_SSE2
  2368. #define SHUFPD_0 shufps $0x44,
  2369. #define SHUFPD_1 shufps $0x4e,
  2370. #define SHUFPD_2 shufps $0xe4,
  2371. #define SHUFPD_3 shufps $0xee,
  2372. #endif
  2373. #ifndef SHUFPD_0
  2374. #define SHUFPD_0 shufpd $0,
  2375. #endif
  2376. #ifndef SHUFPD_1
  2377. #define SHUFPD_1 shufpd $1,
  2378. #endif
  2379. #ifndef SHUFPD_2
  2380. #define SHUFPD_2 shufpd $2,
  2381. #endif
  2382. #ifndef SHUFPD_3
  2383. #define SHUFPD_3 shufpd $3,
  2384. #endif
  2385. #ifndef SHUFPS_39
  2386. #define SHUFPS_39 shufps $0x39,
  2387. #endif
  2388. #endif