[arrayfire] Update to 3.8.0 (#21000)

* [arrayfire] Update to 3.8.0

* Modify format

Co-authored-by: Cheney-Wang <v-xincwa@microsoft.com>
This commit is contained in:
Cheney Wang 2021-10-27 00:03:08 -07:00 committed by GitHub
parent cd5398a46f
commit 6e333a0f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 73 additions and 42 deletions

View File

@ -0,0 +1,22 @@
diff --git a/src/backend/common/half.hpp b/src/backend/common/half.hpp
index ce06eed..fb25d03 100644
--- a/src/backend/common/half.hpp
+++ b/src/backend/common/half.hpp
@@ -879,15 +879,9 @@ class alignas(2) half {
return *this;
}
-#if defined(NVCC) || defined(__CUDACC_RTC__)
- AF_CONSTEXPR __DH__ explicit half(__half value) noexcept
#ifdef __CUDA_ARCH__
- : data_(value) {
- }
-#else
- : data_(*reinterpret_cast<native_half_t*>(&value)) {
- }
-#endif
+ AF_CONSTEXPR __DH__ explicit half(__half value) noexcept : data_(value) {}
+
AF_CONSTEXPR __DH__ half& operator=(__half value) noexcept {
// NOTE Assignment to ushort from __half only works with device code.
// using memcpy instead

View File

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f30a5b3..7b62e003 100644
index 682f416..a8cbec8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,8 +104,6 @@ mark_as_advanced(
@ -34,7 +34,7 @@ index 1f30a5b3..7b62e003 100644
DESTINATION LICENSES
COMPONENT licenses)
diff --git a/CMakeModules/AFInstallDirs.cmake b/CMakeModules/AFInstallDirs.cmake
index 2c7b96ea..b5006ee0 100644
index 2c7b96e..b5006ee 100644
--- a/CMakeModules/AFInstallDirs.cmake
+++ b/CMakeModules/AFInstallDirs.cmake
@@ -7,8 +7,12 @@ include(GNUInstallDirs)
@ -53,7 +53,7 @@ index 2c7b96ea..b5006ee0 100644
# Libraries
diff --git a/CMakeModules/AFconfigure_forge_submodule.cmake b/CMakeModules/AFconfigure_forge_submodule.cmake
index d16849f0..36ab01b6 100644
index d16849f..36ab01b 100644
--- a/CMakeModules/AFconfigure_forge_submodule.cmake
+++ b/CMakeModules/AFconfigure_forge_submodule.cmake
@@ -39,13 +39,13 @@ if(AF_BUILD_FORGE)
@ -75,20 +75,21 @@ index d16849f0..36ab01b6 100644
)
endif(AF_BUILD_FORGE)
diff --git a/src/api/unified/CMakeLists.txt b/src/api/unified/CMakeLists.txt
index 967eaa63..ff04392c 100644
index 967eaa6..16bb633 100644
--- a/src/api/unified/CMakeLists.txt
+++ b/src/api/unified/CMakeLists.txt
@@ -96,7 +96,7 @@ target_include_directories(af
@@ -96,7 +96,8 @@ target_include_directories(af
target_link_libraries(af
PRIVATE
cpp_api_interface
- spdlog
+ spdlog::spdlog spdlog::spdlog_header_only
+ spdlog::spdlog
+ spdlog::spdlog_header_only
Threads::Threads
Boost::boost
${CMAKE_DL_LIBS}
diff --git a/src/backend/common/CMakeLists.txt b/src/backend/common/CMakeLists.txt
index c9fe0889..f97bf0e8 100644
index c9fe088..8c128fa 100644
--- a/src/backend/common/CMakeLists.txt
+++ b/src/backend/common/CMakeLists.txt
@@ -77,12 +77,15 @@ else()
@ -100,8 +101,8 @@ index c9fe0889..f97bf0e8 100644
target_link_libraries(afcommon_interface
INTERFACE
- spdlog
+ spdlog::spdlog
+ spdlog::spdlog_header_only
+ spdlog::spdlog
+ spdlog::spdlog_header_only
Boost::boost
- af_glad_interface
${CMAKE_DL_LIBS}
@ -122,7 +123,7 @@ index c9fe0889..f97bf0e8 100644
if(APPLE AND NOT USE_MKL)
diff --git a/src/backend/cpu/CMakeLists.txt b/src/backend/cpu/CMakeLists.txt
index 170bb0f3..c6e20177 100644
index 170bb0f..c6e2017 100644
--- a/src/backend/cpu/CMakeLists.txt
+++ b/src/backend/cpu/CMakeLists.txt
@@ -266,9 +266,10 @@ endif(AF_WITH_CPUID)
@ -139,7 +140,7 @@ index 170bb0f3..c6e20177 100644
arrayfire_set_default_cxx_flags(afcpu)
diff --git a/src/backend/cuda/CMakeLists.txt b/src/backend/cuda/CMakeLists.txt
index 7e3e4089..a3a53087 100644
index 7e3e408..2edaacd 100644
--- a/src/backend/cuda/CMakeLists.txt
+++ b/src/backend/cuda/CMakeLists.txt
@@ -110,7 +110,11 @@ cuda_include_directories(
@ -155,15 +156,8 @@ index 7e3e4089..a3a53087 100644
endif()
file(GLOB jit_src "kernel/jit.cuh")
@@ -240,9 +244,14 @@ if(AF_WITH_NONFREE)
set(cxx_definitions -DAF_WITH_NONFREE_SIFT)
endif()
@@ -242,7 +246,7 @@ endif()
+# New API of cuSparse was introduced in 10.1.168 for Linux and the older
+# 10.1.105 fix version doesn't it. Unfortunately, the new API was introduced in
+# in a fix release of CUDA - unconventionally. As CMake's FindCUDA module
+# doesn't provide patch/fix version number, we use 10.2 as the minimum
+# CUDA version to enable this new cuSparse API.
if(CUDA_VERSION_MAJOR VERSION_GREATER 10 OR
(UNIX AND
- CUDA_VERSION_MAJOR VERSION_EQUAL 10 AND CUDA_VERSION_MINOR VERSION_GREATER 0))
@ -171,7 +165,7 @@ index 7e3e4089..a3a53087 100644
list(APPEND cxx_definitions -DAF_USE_NEW_CUSPARSE_API)
endif()
@@ -301,7 +310,7 @@ set_target_properties(af_cuda_static_cuda_library
@@ -301,7 +305,7 @@ set_target_properties(af_cuda_static_cuda_library
if(CUDA_VERSION_MAJOR VERSION_GREATER 10 OR
(UNIX AND
@ -181,7 +175,7 @@ index 7e3e4089..a3a53087 100644
endif()
diff --git a/src/backend/opencl/kernel/scan_by_key/CMakeLists.txt b/src/backend/opencl/kernel/scan_by_key/CMakeLists.txt
index 9a796c9e..d9864b00 100644
index 9a796c9..d9864b0 100644
--- a/src/backend/opencl/kernel/scan_by_key/CMakeLists.txt
+++ b/src/backend/opencl/kernel/scan_by_key/CMakeLists.txt
@@ -27,6 +27,7 @@ foreach(SBK_BINARY_OP ${SBK_BINARY_OPS})
@ -204,7 +198,7 @@ index 9a796c9e..d9864b00 100644
set_target_properties(opencl_scan_by_key_${SBK_BINARY_OP}
diff --git a/src/backend/opencl/kernel/sort_by_key/CMakeLists.txt b/src/backend/opencl/kernel/sort_by_key/CMakeLists.txt
index d618ff2f..9f517398 100644
index d618ff2..9f51739 100644
--- a/src/backend/opencl/kernel/sort_by_key/CMakeLists.txt
+++ b/src/backend/opencl/kernel/sort_by_key/CMakeLists.txt
@@ -32,14 +32,13 @@ foreach(SBK_TYPE ${SBK_TYPES})

View File

@ -1,10 +1,12 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO arrayfire/arrayfire
REF 59ac7b980d1ae124aae914fb29cbf086c948954d # v3.7.3
SHA512 e8c209a5249046cb8d68877463b4f4921cfc363ec2f9b070ba67c9e00cbe7b44d5db209922dabc47e53977ff918e7f0d289f85c7571a826c2050d0ee8deae3e0
REF d99887ae431fcd58168b653a1e69f027f04d5188 # v3.8.0
SHA512 d8ddf6ba254744e62acf5ecf680f0ae56b05f8957b5463572923977ba2ffea7fa37cc1b6179421a1188a6f9e66565ca0f8cd00807513ccbe66ba1e9bbd41a3da
HEAD_REF master
PATCHES build.patch
PATCHES
build.patch
Fix-constexpr-error-with-vs2019-with-half.patch
)
# arrayfire cpu thread lib needed as a submodule for the CPU backend
@ -23,11 +25,11 @@ vcpkg_from_github(
# are still runtime dependencies, so the user can use the graphics
# library by installing forge and freeimage.
vcpkg_from_github(
OUT_SOURCE_PATH FORGE_PATH
REPO arrayfire/forge
REF 1a0f0cb6371a8c8053ab5eb7cbe3039c95132389 # v1.0.5
SHA512 8f8607421880a0f0013380eb5efb3a4f05331cd415d68c9cd84dd57eb727da1df6223fc6d65b106675d6aa09c3388359fab64443c31fadadf7641161be6b3b89
HEAD_REF master
OUT_SOURCE_PATH FORGE_PATH
REPO arrayfire/forge
REF 1a0f0cb6371a8c8053ab5eb7cbe3039c95132389 # v1.0.5
SHA512 8f8607421880a0f0013380eb5efb3a4f05331cd415d68c9cd84dd57eb727da1df6223fc6d65b106675d6aa09c3388359fab64443c31fadadf7641161be6b3b89
HEAD_REF master
)
################################### Build ###################################
@ -66,20 +68,21 @@ vcpkg_check_features(
)
# Build and install
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${AF_DEFAULT_VCPKG_CMAKE_FLAGS}
${AF_BACKEND_FEATURE_OPTIONS}
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/examples")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/LICENSES")
# Copyright and license
file(INSTALL ${SOURCE_PATH}/COPYRIGHT.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/COPYRIGHT.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,14 +1,21 @@
{
"name": "arrayfire",
"version-string": "3.7.3",
"port-version": 3,
"version-semver": "3.8.0",
"description": "ArrayFire is a general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices.",
"supports": "x64",
"dependencies": [
"boost-compute",
"boost-stacktrace",
"glad",
"spdlog"
"spdlog",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"cpu",
@ -22,7 +29,7 @@
]
},
"cuda": {
"description": "ArrayFire CUDA backend",
"description": "ArrayFire CUDA backend. This feature only supports dynamic because dependency cudnn is dynamic only.",
"dependencies": [
"cub",
"cuda",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e6c5e8b4e1c52380ebd2050683a185c44a2dbae4",
"version-semver": "3.8.0",
"port-version": 0
},
{
"git-tree": "ec3188e3259a9b123ebbbb0e2ede933a59d42092",
"version-string": "3.7.3",

View File

@ -161,8 +161,8 @@
"port-version": 0
},
"arrayfire": {
"baseline": "3.7.3",
"port-version": 3
"baseline": "3.8.0",
"port-version": 0
},
"arrow": {
"baseline": "5.0.0",