-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LAPACK] Add Arm Performance Libraries backend (#633)
Signed-off-by: Augustin Degomme <[email protected]> Co-authored-by: Nicolas Bouton <[email protected]> Co-authored-by: Romain Dolbeau <[email protected]>
- Loading branch information
1 parent
af66e5e
commit f7a6f14
Showing
15 changed files
with
9,274 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/******************************************************************************* | ||
* Copyright 2025 SiPearl | ||
* Copyright 2021 Intel Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions | ||
* and limitations under the License. | ||
* | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*******************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <complex> | ||
#include <cstdint> | ||
|
||
#include <sycl/sycl.hpp> | ||
|
||
#include "oneapi/math/types.hpp" | ||
#include "oneapi/math/lapack/types.hpp" | ||
#include "oneapi/math/detail/backend_selector.hpp" | ||
#include "oneapi/math/lapack/detail/armpl/onemath_lapack_armpl.hpp" | ||
|
||
namespace oneapi { | ||
namespace math { | ||
namespace lapack { | ||
|
||
#define LAPACK_BACKEND armpl | ||
#include "oneapi/math/lapack/detail/armpl/lapack_ct.hxx" | ||
#undef LAPACK_BACKEND | ||
|
||
} //namespace lapack | ||
} //namespace math | ||
} //namespace oneapi |
2,588 changes: 2,588 additions & 0 deletions
2,588
include/oneapi/math/lapack/detail/armpl/lapack_ct.hxx
Large diffs are not rendered by default.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
include/oneapi/math/lapack/detail/armpl/onemath_lapack_armpl.hpp
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/******************************************************************************* | ||
* Copyright 2025 SiPearl | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions | ||
* and limitations under the License. | ||
* | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*******************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <sycl/sycl.hpp> | ||
|
||
#include <complex> | ||
#include <cstdint> | ||
|
||
#include "oneapi/math/types.hpp" | ||
namespace oneapi { | ||
namespace math { | ||
namespace lapack { | ||
namespace armpl { | ||
|
||
#include "onemath_lapack_armpl.hxx" | ||
|
||
} // namespace armpl | ||
} // namespace lapack | ||
} // namespace math | ||
} // namespace oneapi |
1,523 changes: 1,523 additions & 0 deletions
1,523
include/oneapi/math/lapack/detail/armpl/onemath_lapack_armpl.hxx
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#=============================================================================== | ||
# Copyright 2025 SiPearl | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions | ||
# and limitations under the License. | ||
# | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
#=============================================================================== | ||
|
||
set(LIB_NAME onemath_lapack_armpl) | ||
set(LIB_OBJ ${LIB_NAME}_obj) | ||
|
||
# Add third-party library | ||
find_package(ARMPL REQUIRED) | ||
|
||
add_library(${LIB_NAME}) | ||
add_library(${LIB_OBJ} OBJECT | ||
armpl_wrappers.cpp | ||
armpl_batch.cpp | ||
$<$<BOOL:${BUILD_SHARED_LIBS}>: armpl_wrappers_table_dyn.cpp> | ||
|
||
) | ||
|
||
target_include_directories(${LIB_OBJ} | ||
PUBLIC ${ONEMATH_INCLUDE_DIRS} | ||
PRIVATE ${PROJECT_SOURCE_DIR}/src/include | ||
${PROJECT_SOURCE_DIR}/src | ||
${ARMPL_INCLUDE} | ||
) | ||
|
||
target_link_libraries(${LIB_OBJ} | ||
PUBLIC ONEMATH::SYCL::SYCL ${ARMPL_LINK} | ||
) | ||
|
||
target_compile_features(${LIB_OBJ} PUBLIC cxx_std_14) | ||
set_target_properties(${LIB_OBJ} PROPERTIES | ||
POSITION_INDEPENDENT_CODE ON | ||
) | ||
target_link_libraries(${LIB_NAME} PRIVATE ${LIB_OBJ}) | ||
target_include_directories(${LIB_NAME} PUBLIC ${ONEMATH_INCLUDE_DIRS}) | ||
|
||
# Add major version to the library | ||
set_target_properties(${LIB_NAME} PROPERTIES | ||
SOVERSION ${PROJECT_VERSION_MAJOR} | ||
) | ||
|
||
# Add dependencies rpath to the library | ||
list(APPEND CMAKE_BUILD_RPATH $<TARGET_FILE_DIR:${LIB_NAME}>) | ||
|
||
# Add the library to install package | ||
install(TARGETS ${LIB_OBJ} EXPORT oneMathTargets) | ||
install(TARGETS ${LIB_NAME} EXPORT oneMathTargets | ||
RUNTIME DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
) |
Oops, something went wrong.