Index-64 extended API overhaul#1276
Draft
ACSimon33 wants to merge 40 commits into
Draft
Conversation
…ffect (flang warning)
…Intel Classic compiler to fail on Windows
…ings for Intel Classic compilers
… support _Complex)
…e already tested in the complex tests
… are not supported and the trick to load the test xerbla first doesn't work on Windows when using shared libraries.
…dy by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
…target individually
…m the original source file
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ault API redundantly. Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
This PR overhauls how the Index-64 “extended API” is generated and validated across the project by switching from preprocessor-based renaming to a CMake-driven source generator for Fortran, and by exercising the extended API through transformed test builds (including an “extended-only” CI job).
Changes:
- Introduce a unified CMake helper + generator to produce
_64-suffixed Fortran sources at build time (with fixed-form line wrapping). - Add/adjust build options to support building only the extended API (disabling the default API) and extend CI to run that configuration.
- Update many sources/tests to ensure all called routines are explicitly declared so the generator can reliably rewrite symbol names; plus assorted CMake cleanups and minor API fixes (e.g.,
cblas_zaxpby_64name).
Reviewed changes
Copilot reviewed 292 out of 296 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/cmake.yml | Adds CI job to build+test an extended-API-only configuration (and formatting tweaks). |
| BLAS/SRC/CMakeLists.txt | Switches BLAS extended-API generation to the new generator + BUILD_DEFAULT_API gating. |
| BLAS/TESTING/CMakeLists.txt | Creates extended-API variants of BLAS tests and rewrites .in files for _64 outputs. |
| CBLAS/examples/CMakeLists.txt | Gates default-API examples and keeps extended-API example builds. |
| CBLAS/include/CMakeLists.txt | Stops copying test header to build dir; continues installing/exporting CBLAS headers. |
| CBLAS/include/cblas_64.h | Fixes typo: cblas_zaxpby_64 declaration name. |
| CBLAS/include/cblas_globals.h | New header defining import decoration for CBLAS global variables. |
| CBLAS/src/cblas_globals.c | Refactors globals to use a header + optional dllimport decoration. |
| CBLAS/testing/CMakeLists.txt | Refactors test creation; adds extended-API test targets using generated Fortran sources. |
| CBLAS/testing/c_cblas1.c | Routes CBLAS calls via API_SUFFIX(...) for extended API. |
| CBLAS/testing/c_cblat3.f | Updates EXTERNAL list to include required checker routine. |
| CBLAS/testing/c_dblas1.c | Routes CBLAS calls via API_SUFFIX(...); removes unused wrappers. |
| CBLAS/testing/c_dblat1.f | Updates EXTERNAL list for added tests (AXPBY). |
| CBLAS/testing/c_dblat2.f | Fixes/updates EXTERNAL references (e.g., CDGER) and formatting. |
| CBLAS/testing/c_sblas1.c | Routes CBLAS calls via API_SUFFIX(...); removes unused wrappers. |
| CBLAS/testing/c_sblas3.c | Routes CBLAS calls via API_SUFFIX(...) for extended API. |
| CBLAS/testing/c_sblat1.f | Updates EXTERNAL list for added tests (AXPBY). |
| CBLAS/testing/c_sblat2.f | Line-wrap/EXTERNAL formatting cleanup. |
| CBLAS/testing/c_xerbla.c | Renames test xerbla hook to API_SUFFIX(cblas_xerbla) and updates call sites. |
| CBLAS/testing/c_zblas1.c | Routes CBLAS calls via API_SUFFIX(...) for extended API. |
| CBLAS/testing/c_zblat1.f | Updates EXTERNAL list for added tests (AXPBY). |
| CBLAS/testing/c_zblat3.f | Updates EXTERNAL list to include required checker routine. |
| CMAKE/CheckLAPACKCompilerFlags.cmake | Adjusts compiler flags handling (Intel fp strict options, diagnostics, etc.). |
| CMAKE/ExtendedAPIHelpers.cmake | New CMake helper to generate _64-suffixed Fortran sources at build time. |
| CMakeLists.txt | Raises minimum CMake, adds BUILD_DEFAULT_API option, enables PIC by default, adds extended-API warning. |
| INSTALL/CMakeLists.txt | Raises minimum CMake version. |
| INSTALL/dsecnd_INT_ETIME.f | Removes redundant declaration to rely on INTRINSIC ETIME. |
| INSTALL/second_INT_ETIME.f | Removes redundant declaration to rely on INTRINSIC ETIME. |
| LAPACKE/CMakeLists.txt | Refactors LAPACKE object composition for default vs extended API; adds common source grouping. |
| LAPACKE/example/CMakeLists.txt | Gates default API examples; links examples only to LAPACKE target. |
| LAPACKE/include/lapack.h | Makes LAPACK_lsame follow integer-specific suffixing (LAPACK_GLOBAL_SUFFIX). |
| LAPACKE/mangling/CMakeLists.txt | Raises minimum CMake version. |
| LAPACKE/src/CMakeLists.txt | Introduces COMMON_SOURCES variable (e.g., lapacke_nancheck.c). |
| LAPACKE/utils/CMakeLists.txt | Introduces COMMON_UTILS variable for shared utility sources. |
| SRC/CMakeLists.txt | Uses BUILD_DEFAULT_API gating and new generator for extended API LAPACK sources; global PIC reliance. |
| SRC/VARIANTS/cholesky/RL/cpotrf.f | Adjusts EXTERNAL list (removes unused GEMM). |
| SRC/VARIANTS/cholesky/RL/dpotrf.f | Adjusts EXTERNAL list (removes unused GEMM). |
| SRC/VARIANTS/cholesky/RL/spotrf.f | Adjusts EXTERNAL list (removes unused GEMM). |
| SRC/VARIANTS/cholesky/RL/zpotrf.f | Adjusts EXTERNAL list (removes unused GEMM). |
| SRC/VARIANTS/cholesky/TOP/cpotrf.f | Adjusts EXTERNAL list (removes unused GEMM). |
| SRC/VARIANTS/cholesky/TOP/dpotrf.f | Adjusts EXTERNAL list (removes unused GEMM). |
| SRC/VARIANTS/cholesky/TOP/spotrf.f | Adjusts EXTERNAL list (removes unused GEMM). |
| SRC/VARIANTS/cholesky/TOP/zpotrf.f | Adjusts EXTERNAL list (removes unused GEMM). |
| SRC/cgeev.f | Ensures SISNAN is declared external for generator correctness. |
| SRC/cgeqr.f | Removes now-unneeded LSAME declaration; keeps SROUNDUP_LWORK external. |
| SRC/cgelq.f | Removes now-unneeded LSAME declaration; keeps SROUNDUP_LWORK external. |
| SRC/cgedmd.f90 | Adjusts EXTERNAL list to avoid suffixing CLANGE incorrectly (shared vs integer-specific). |
| SRC/chesv_aa.f | Removes unused ILAENV declaration and keeps required externals. |
| SRC/chbev_2stage.f | Updates EXTERNAL list for actually-used routines. |
| SRC/chseqr.f | Simplifies EXTERNAL list (removes unused SROUNDUP_LWORK entry). |
| SRC/clahef_aa.f | Cleans EXTERNAL lists to match actual calls. |
| SRC/clahef_rk.f | Fixes EXTERNAL list to use CGEMMTR (matches actual calls). |
| SRC/claqr5.f | Removes unused CTRMM from EXTERNAL list. |
| SRC/clarft.f | Adds CLARFT_LVL2 to EXTERNAL list. |
| SRC/claswlq.f | Removes unused LSAME/ILAENV externals for generator correctness. |
| SRC/clasyf_aa.f | Removes unused ILAENV from externals; keeps required routines. |
| SRC/clatrs3.f | Adds missing CGEMM to externals. |
| SRC/clatsqr.f | Fixes EXTERNAL function list (and contains a modified doc reference line). |
| SRC/crscl.f | Removes unused CLADIV external declaration. |
| SRC/csysv_aa.f | Removes unused ILAENV external declaration. |
| SRC/cunbdb6.f | Adds missing EXTERNAL SLAMCH declaration. |
| SRC/dgeev.f | Ensures DISNAN is declared external for generator correctness. |
| SRC/dgeqr.f | Removes now-unneeded LSAME declaration. |
| SRC/dgelq.f | Removes now-unneeded LSAME declaration. |
| SRC/dgedmdq.f90 | Removes unused EXTERNAL DGEMM declaration. |
| SRC/dlaqr5.f | Removes unused DTRMM from EXTERNAL list. |
| SRC/dlarft.f | Adds DLARFT_LVL2 to EXTERNAL list. |
| SRC/dlapy2.f | Adds missing EXTERNAL DLAMCH declaration. |
| SRC/dlapy3.f | Adds missing EXTERNAL DLAMCH declaration. |
| SRC/dlasyf_aa.f | Removes unused ILAENV from externals; keeps required routines. |
| SRC/dlaswlq.f | Removes unused LSAME external declaration. |
| SRC/dlatrs3.f | Adds missing DGEMM to externals. |
| SRC/dlatsqr.f | Removes unused LSAME external declaration. |
| SRC/dopmtr.f | Adds DLARF1L to EXTERNAL list. |
| SRC/dorbdb4.f | Switches EXTERNAL list to DLARF1F to match actual call. |
| SRC/dorbdb6.f | Adds missing EXTERNAL DLAMCH declaration. |
| SRC/dorgr2.f | Switches EXTERNAL list to DLARF1L to match actual call. |
| SRC/dsysv_aa.f | Removes unused ILAENV external declaration. |
| SRC/ilaenv.f | Removes unused IPARAM2STAGE external declaration. |
| SRC/sggev3.f | Adds missing XERBLA to EXTERNAL list. |
| SRC/sgeev.f | Ensures SISNAN is declared external for generator correctness. |
| SRC/sgeqr.f | Removes unused LSAME external declaration. |
| SRC/sgelq.f | Removes unused LSAME external declaration. |
| SRC/sgedmdq.f90 | Removes unused EXTERNAL SGEMM declaration. |
| SRC/slaqr2.f | EXTERNAL list formatting/cleanup while preserving semantics. |
| SRC/slaqr5.f | Removes unused STRMM from EXTERNAL list. |
| SRC/slarft.f | Adds SLARFT_LVL2 to EXTERNAL list. |
| SRC/slapy2.f | Adds missing EXTERNAL SLAMCH declaration. |
| SRC/slapy3.f | Adds missing EXTERNAL SLAMCH declaration. |
| SRC/slasyf_aa.f | Removes unused ILAENV from externals; keeps required routines. |
| SRC/slaswlq.f | Removes unused LSAME external declaration; trims external subroutines list. |
| SRC/slatrs3.f | Adds missing SGEMM to EXTERNAL list. |
| SRC/slatsqr.f | Removes unused LSAME external declaration. |
| SRC/sorbdb6.f | Adds missing EXTERNAL SLAMCH declaration. |
| SRC/zgeev.f | Ensures DISNAN is declared external for generator correctness. |
| SRC/zgeqr.f | Removes unused LSAME external declaration. |
| SRC/zgelq.f | Removes unused LSAME external declaration. |
| SRC/zgelss.f | Adds missing ZUNMQR to EXTERNAL list. |
| SRC/zgedmd.f90 | Adjusts EXTERNAL list to avoid suffixing ZLANGE incorrectly (shared vs integer-specific). |
| SRC/zhbev_2stage.f | Updates EXTERNAL list to match actually-used routines. |
| SRC/zhesv_aa.f | Removes unused ILAENV external declaration. |
| SRC/zhesv_aa_2stage.f | Removes unused ILAENV external declaration. |
| SRC/zhetrf_aa.f | EXTERNAL list formatting/cleanup while preserving semantics. |
| SRC/zlahef_aa.f | Cleans EXTERNAL lists to match actual calls. |
| SRC/zlaqr5.f | Removes unused ZTRMM from EXTERNAL list. |
| SRC/zlarft.f | Adds ZLARFT_LVL2 to EXTERNAL list. |
| SRC/zlaswlq.f | Removes unused LSAME external declaration. |
| SRC/zlasyf_aa.f | Removes unused ILAENV from externals; keeps required routines. |
| SRC/zlatrs3.f | Adds missing ZGEMM to externals. |
| SRC/zlatsqr.f | Removes unused LSAME external declaration. |
| SRC/zrscl.f | Removes unused ZLADIV external declaration; updates scaling externals list. |
| SRC/zsytrf_aa_2stage.f | Updates EXTERNAL list to match actually-used routines. |
| SRC/zsysv_aa.f | Removes unused ILAENV external declaration. |
| SRC/zunbdb6.f | Adds missing EXTERNAL DLAMCH declaration. |
| TESTING/EIG/cbdt05.f | Updates externals list to match actual usage. |
| TESTING/EIG/cckgsv.f | Updates EXTERNAL list (adds CGGSVD3) to match actual calls. |
| TESTING/EIG/cchkdmd.f90 | Updates externals list for generator correctness. |
| TESTING/EIG/cchkee.F | Updates external program list (test driver organization). |
| TESTING/EIG/cchkhb2stg.f | Adds missing copy routine to EXTERNAL list. |
| TESTING/EIG/cchkee.F | Updates program EXTERNAL list ordering/coverage. |
| TESTING/EIG/cdrges3.f | Adds missing XLAENV to externals. |
| TESTING/EIG/cdrgev3.f | Adds missing XLAENV to externals. |
| TESTING/EIG/cgqrts.f | Adds missing CGGQRF to externals. |
| TESTING/EIG/cglmts.f | Adds missing externals for generator correctness. |
| TESTING/EIG/chet22.f | Adds missing CUNT01 to externals. |
| TESTING/EIG/clsets.f | Adds missing copy routine to EXTERNAL list. |
| TESTING/EIG/dbdt04.f | Removes unused externals. |
| TESTING/EIG/dbdt05.f | Removes unused externals. |
| TESTING/EIG/dchkdmd.f90 | Updates externals list for generator correctness. |
| TESTING/EIG/dchkee.F | Updates external program list (test driver organization). |
| TESTING/EIG/dchksb2stg.f | Adds missing copy routine to EXTERNAL list. |
| TESTING/EIG/ddrvbd.f | Adds missing DBDT05 to externals. |
| TESTING/EIG/ddrges3.f | Adds missing XLAENV to externals. |
| TESTING/EIG/ddrgev3.f | Adds missing XLAENV to externals. |
| TESTING/EIG/ddrvst2stg.f | Trims externals list to those actually used. |
| TESTING/EIG/dget40.f | Fixes EXTERNAL list to include actually-called routine. |
| TESTING/EIG/dchkbd.f | Removes unused external function declaration (DSXT1). |
| TESTING/EIG/dsyl01.f | Adds missing DISNAN to externals. |
| TESTING/EIG/sbdt04.f | Removes unused externals. |
| TESTING/EIG/sbdt05.f | Removes unused externals. |
| TESTING/EIG/schkdmd.f90 | Updates externals list for generator correctness. |
| TESTING/EIG/schkee.F | Updates external program list (test driver organization). |
| TESTING/EIG/schksb2stg.f | Adds missing copy routine to EXTERNAL list. |
| TESTING/EIG/sdrvbd.f | Adds missing SBDT05 to externals. |
| TESTING/EIG/sdrges3.f | Adds missing XLAENV to externals. |
| TESTING/EIG/sdrgev3.f | Adds missing XLAENV to externals. |
| TESTING/EIG/sdrvst2stg.f | Trims externals list to those actually used. |
| TESTING/EIG/sget34.f | Adds missing SHST01 to externals. |
| TESTING/EIG/sglmts.f | Adds missing externals for generator correctness. |
| TESTING/EIG/sgqrts.f | Adds missing SGGQRF to externals. |
| TESTING/EIG/slsets.f | Adds missing SCOPY to EXTERNAL list. |
| TESTING/EIG/ssyt22.f | Adds missing SORT01 to externals. |
| TESTING/EIG/zbdt05.f | Removes unused externals and keeps needed functions. |
| TESTING/EIG/zchkdmd.f90 | Fixes missing ZLANGE external declaration. |
| TESTING/EIG/zchkee.F | Updates external program list (test driver organization). |
| TESTING/EIG/zchkhb2stg.f | Adds missing copy routine to EXTERNAL list. |
| TESTING/EIG/zchkhs.f | Trims externals list to those actually used. |
| TESTING/EIG/zdrges3.f | Adds missing XLAENV to externals. |
| TESTING/EIG/zdrgev3.f | Adds missing XLAENV to externals. |
| TESTING/EIG/zdrvst2stg.f | Trims externals list to those actually used. |
| TESTING/EIG/zerrec.f | Adds ZTRSYL3 to externals. |
| TESTING/EIG/zerred.f | Fixes name ZGEJSV in externals list. |
| TESTING/EIG/zerrhs.f | Updates externals list (adds ZGEHD2). |
| TESTING/EIG/zerrst.f | Extends externals list for additional error-exit coverage. |
| TESTING/LIN/cchkaa.F | Adds missing test drivers to EXTERNAL list. |
| TESTING/LIN/cchkhe.f | Adds missing routine (CHETRS2) to EXTERNAL list. |
| TESTING/LIN/cchkhe_aa_2stage.f | Adds missing CLAIPD to EXTERNAL list. |
| TESTING/LIN/cchklqtp.f | Switches which LQT test is referenced in EXTERNAL list. |
| TESTING/LIN/cchkqrtp.f | Adds missing CQRT05 to EXTERNAL list. |
| TESTING/LIN/cchktsqr.f | Updates EXTERNAL list for generator correctness. |
| TESTING/LIN/cchkrfp.f | Adds missing error-test routine to EXTERNAL list. |
| TESTING/LIN/cchksy.f | Adds missing CSYTRS2 to EXTERNAL list. |
| TESTING/LIN/cchksy_aa_2stage.f | Trims EXTERNAL list to only-used routines. |
| TESTING/LIN/cdrvhe_aa.f | Trims external declarations to those actually used. |
| TESTING/LIN/cdrvhe_aa_2stage.f | Trims external declarations to those actually used. |
| TESTING/LIN/cdrvhe_rk.f | Fixes EXTERNAL list (CSYTRI_3). |
| TESTING/LIN/cdrvls.f | Updates externals list (adds CSCAL). |
| TESTING/LIN/cdrvrf3.f | Fixes EXTERNAL list (CGELQF). |
| TESTING/LIN/cdrvsy_aa.f | Trims external declarations to those actually used. |
| TESTING/LIN/cdrvsy_aa_2stage.f | Trims external declarations to those actually used. |
| TESTING/LIN/cdrvsy_rook.f | Trims external declarations to those actually used. |
| TESTING/LIN/cerrhe.f | Fixes EXTERNAL list (removes/renames symbol entry). |
| TESTING/LIN/cerrsy.f | Adds missing AA/2stage routines to EXTERNAL list. |
| TESTING/LIN/cerrtsqr.f | Adds TSQR/LASWLQ routines to EXTERNAL list. |
| TESTING/LIN/cerrvx.f | Adds missing AA routines to EXTERNAL list. |
| TESTING/LIN/chet01_aa.f | Updates EXTERNAL list to explicitly declare called subroutines. |
| TESTING/LIN/clqt04.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/clqt05.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/cqrt04.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/cqrt05.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/ctsqr01.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/cunhr_col02.f | Removes unused scaling externals; line-wrap cleanup. |
| TESTING/LIN/csyt01_aa.f | Updates EXTERNAL list to explicitly declare called subroutines. |
| TESTING/LIN/dchkaa.F | Adds missing test drivers to EXTERNAL list. |
| TESTING/LIN/dchkqrtp.f | Adds missing DQRT05 to EXTERNAL list. |
| TESTING/LIN/dchktsqr.f | Updates EXTERNAL list for generator correctness. |
| TESTING/LIN/dchkrfp.f | Adds missing error-test routine to EXTERNAL list. |
| TESTING/LIN/ddrvab.f | Adds missing solve routine to EXTERNAL list. |
| TESTING/LIN/ddrvac.f | Adds missing ALAHD to EXTERNAL list. |
| TESTING/LIN/ddrvgbx.f | Removes unused DGBEQUB from EXTERNAL list. |
| TESTING/LIN/ddrvrf3.f | Fixes EXTERNAL list (DGELQF). |
| TESTING/LIN/ddrvsy_aa.f | Trims external declarations to those actually used. |
| TESTING/LIN/ddrvsy_aa_2stage.f | Trims external declarations to those actually used. |
| TESTING/LIN/ddrvsy_rook.f | Trims external declarations to those actually used. |
| TESTING/LIN/derrtsqr.f | Adds TSQR/LASWLQ routines to EXTERNAL list. |
| TESTING/LIN/dlqt04.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/dlqt05.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/dorhr_col02.f | Removes unused scaling externals; line-wrap cleanup. |
| TESTING/LIN/dqrt04.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/dqrt05.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/dsyt01_aa.f | Updates EXTERNAL list to explicitly declare called subroutines. |
| TESTING/LIN/dtsqr01.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/schkaa.F | Adds missing test drivers to EXTERNAL list. |
| TESTING/LIN/schklq.f | Adds missing SGELS to EXTERNAL list. |
| TESTING/LIN/schkrfp.f | Adds missing error-test routine to EXTERNAL list. |
| TESTING/LIN/schktsqr.f | Updates EXTERNAL list for generator correctness. |
| TESTING/LIN/sdrvsy_aa.f | Trims external declarations to those actually used. |
| TESTING/LIN/sdrvsy_aa_2stage.f | Trims external declarations to those actually used. |
| TESTING/LIN/sdrvsy_rook.f | Trims external declarations to those actually used. |
| TESTING/LIN/serrtsqr.f | Adds TSQR/LASWLQ routines to EXTERNAL list. |
| TESTING/LIN/slqt04.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/slqt05.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/sorhr_col02.f | Removes unused scaling externals; line-wrap cleanup. |
| TESTING/LIN/sqrt04.f | Removes unused LSAME external reference. |
| TESTING/LIN/sqrt05.f | Removes unused LSAME external reference. |
| TESTING/LIN/ssyt01_aa.f | Removes unused SLAVSY from EXTERNAL list. |
| TESTING/LIN/stsqr01.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/zchkaa.F | Adds missing test drivers to EXTERNAL list. |
| TESTING/LIN/zchkhe.f | Adds missing routine (ZHETRS2) to EXTERNAL list. |
| TESTING/LIN/zchkhe_aa_2stage.f | Adds missing ZLAIPD to EXTERNAL list. |
| TESTING/LIN/zchklqtp.f | Switches which LQT test is referenced in EXTERNAL list. |
| TESTING/LIN/zchkqrtp.f | Adds missing ZQRT05 to EXTERNAL list. |
| TESTING/LIN/zchktsqr.f | Updates EXTERNAL list for generator correctness. |
| TESTING/LIN/zchkrfp.f | Adds missing error-test routine to EXTERNAL list. |
| TESTING/LIN/zchksy_aa_2stage.f | Trims EXTERNAL list to only-used routines. |
| TESTING/LIN/zdrvac.f | Adds missing ALAHD to EXTERNAL list. |
| TESTING/LIN/zdrvab.f | Adds missing solve routine to EXTERNAL list. |
| TESTING/LIN/zdrvhe_aa.f | Trims external declarations to those actually used. |
| TESTING/LIN/zdrvhe_aa_2stage.f | Trims external declarations to those actually used. |
| TESTING/LIN/zdrvls.f | Updates externals list (adds ZSCAL). |
| TESTING/LIN/zdrvrf3.f | Fixes EXTERNAL list (ZGELQF). |
| TESTING/LIN/zdrvsy_aa.f | Trims external declarations to those actually used. |
| TESTING/LIN/zdrvsy_aa_2stage.f | Trims external declarations to those actually used. |
| TESTING/LIN/zdrvsy_rook.f | Trims external declarations to those actually used. |
| TESTING/LIN/zerrsy.f | Adds missing AA/2stage routines to EXTERNAL list. |
| TESTING/LIN/zerrtsqr.f | Adds TSQR/LASWLQ routines to EXTERNAL list. |
| TESTING/LIN/zerrvx.f | Adds missing AA routines to EXTERNAL list. |
| TESTING/LIN/zhet01_aa.f | Updates EXTERNAL list to explicitly declare called subroutines. |
| TESTING/LIN/zlqt04.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/zlqt05.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/zpot06.f | Removes unused LSAME external reference. |
| TESTING/LIN/zqrt04.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/zqrt05.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/zsyt01_aa.f | Updates EXTERNAL list to explicitly declare called subroutines. |
| TESTING/LIN/ztsqr01.f | Adds explicit EXTERNAL subroutine declarations. |
| TESTING/LIN/zunhr_col02.f | Removes unused scaling externals; line-wrap cleanup. |
| TESTING/MATGEN/CMakeLists.txt | Switches MATGEN extended API generation to new helper; adds BUILD_DEFAULT_API gating. |
| TESTING/MATGEN/matgen_64.h | Removes preprocessor-based MATGEN _64 symbol remapping header (now generated). |
| lapack_build.cmake | Raises minimum CMake version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
160
to
163
| *> Sequential TSQR in Section 2.2 of [1]. | ||
| *> | ||
| *> [1] “Communication-Optimal Parallel and Sequential QR and LU Factorizations,” | ||
| *> [1] “Communication-Optimal Parallel and Sequential QR and LU Factorizations,� | ||
| *> J. Demmel, L. Grigori, M. Hoemmen, J. Langou, |
Comment on lines
+24
to
+34
| function(add_blas_test name source) | ||
| get_filename_component(baseNAME ${source} NAME_WE) | ||
| set(test_input "${CMAKE_CURRENT_SOURCE_DIR}/${baseNAME}.in") | ||
|
|
||
| if(BUILD_DEFAULT_API) | ||
| _add_blas_test(${name} ${source} "${test_input}") | ||
| endif() | ||
|
|
||
| if(BUILD_INDEX64_EXT_API) | ||
| include(ExtendedAPIHelpers) | ||
| generate_64bit_suffixed_sources(${name} source source_64 NO_STRING_REPLACEMENTS) |
Contributor
Author
|
Since there are a lot of changes in the PR, I've decided to split it into multiple smaller PRs that are more digestible. |
…se XBLAS doesn't ship extended APIs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The way the Index-64 extended API was generated accross BLAS/CBLAS/LAPACK/LAPACKE/TMGLIB wasn't consistent and we never tested if these APIs actually work as we expect them to. I added a consistent way to generate the Index-64 extended APIs for Fortran source files. I used the strategy that was already used for the BLAS sources. We analyze the subsoutine/function name, as well as the external suboutine/function names, that are declared in the source file. Instead of relying on the preprocessor to generate the Index-64 extended APIs, we generate them now ourselves via a CMake script, that replaces the subroutine/function name and the names of the external subroutines/functions with their Index-64 extended API counterparts. The script automatically handles fixed form line length limits.
I used the new generator to generate extended API tests by transforming the entire test framework to use the extended APIs as well. That way we run tests on the extended APIs as well.
Since the generator relies on the fact that the used subroutine/function names are correcty declared in the source files, we need to check that. I added a CMake option to disable the default (non-extended) API. That means we can build a LAPACK library that only contains the Index-64 extended APIs. If we now forget to declare a subroutine/function name in the source file, the build will fail because the generator won't replace the name and the compiler won't find the symbol becasue the default API doesn't exist.
Doing this revealed that we had a lot of missing declarations in the source files, as well as unused declarations. I added the missing declarations and removed the unused ones. Using the exteneded-API-only build, we can be sure from now on that all the used subroutine/function names are declared correctly in the source files.
Some other changes:
This MR also contains commits of #1260 and #1261. So those should be merged first, and then this branch should be rebased.