early-access version 2853
This commit is contained in:
52
externals/vcpkg/ports/torch-th/debug.patch
vendored
Executable file
52
externals/vcpkg/ports/torch-th/debug.patch
vendored
Executable file
@@ -0,0 +1,52 @@
|
||||
diff --git a/lib/TH/CMakeLists.txt b/lib/TH/CMakeLists.txt
|
||||
index 803dfe1..7db876b 100644
|
||||
--- a/lib/TH/CMakeLists.txt
|
||||
+++ b/lib/TH/CMakeLists.txt
|
||||
@@ -221,7 +221,13 @@ ENDIF(C_AVX2_FOUND OR C_AVX_FOUND OR C_SSE4_2_FOUND OR C_SSE4_1_FOUND)
|
||||
IF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND)
|
||||
SET(CMAKE_C_FLAGS "${C_SSE4_1_FLAGS} -DUSE_SSE4_1 ${C_SSE4_2_FLAGS} -DUSE_SSE4_2 ${CMAKE_C_FLAGS}")
|
||||
IF(MSVC)
|
||||
- SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast")
|
||||
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
+ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast")
|
||||
+ MESSAGE(STATUS "Release mode. Found SSE4_1 and SSE4_2.")
|
||||
+ ELSE()
|
||||
+ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/fp:fast")
|
||||
+ MESSAGE(STATUS "Non-release mode. Found SSE4_1 and SSE4_2.")
|
||||
+ ENDIF()
|
||||
ELSE(MSVC)
|
||||
SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "-O3 -ffast-math")
|
||||
ENDIF(MSVC)
|
||||
@@ -231,8 +237,15 @@ ENDIF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND)
|
||||
# IF AVX FOUND
|
||||
IF(C_AVX_FOUND)
|
||||
IF(MSVC)
|
||||
- SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast ${C_AVX_FLAGS}")
|
||||
- SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX ${C_AVX_FLAGS}")
|
||||
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
+ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast ${C_AVX_FLAGS}")
|
||||
+ SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX ${C_AVX_FLAGS}")
|
||||
+ MESSAGE(STATUS "Release mode. Found AVX.")
|
||||
+ ELSE()
|
||||
+ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/fp:fast ${C_AVX_FLAGS}")
|
||||
+ SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/arch:AVX ${C_AVX_FLAGS}")
|
||||
+ MESSAGE(STATUS "Non-release mode. Found AVX.")
|
||||
+ ENDIF()
|
||||
ELSE(MSVC)
|
||||
SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "-O3 -ffast-math ${C_AVX_FLAGS}")
|
||||
SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "-O3 ${C_AVX_FLAGS}")
|
||||
@@ -242,7 +255,13 @@ ENDIF(C_AVX_FOUND)
|
||||
|
||||
IF(C_AVX2_FOUND)
|
||||
IF(MSVC)
|
||||
- SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX2 ${C_AVX2_FLAGS}")
|
||||
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
+ SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX2 ${C_AVX2_FLAGS}")
|
||||
+ MESSAGE(STATUS "Release mode. Found AVX2.")
|
||||
+ ELSE()
|
||||
+ SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/arch:AVX2 ${C_AVX2_FLAGS}")
|
||||
+ MESSAGE(STATUS "Non-release mode. Found AVX2.")
|
||||
+ ENDIF()
|
||||
ELSE(MSVC)
|
||||
SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "-O3 ${C_AVX2_FLAGS}")
|
||||
ENDIF(MSVC)
|
||||
26
externals/vcpkg/ports/torch-th/portfile.cmake
vendored
Executable file
26
externals/vcpkg/ports/torch-th/portfile.cmake
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO torch/torch7
|
||||
REF dde9e56fb61eee040d7f3dba2331c6d6c095aee8
|
||||
SHA512 ef813e6f583f26019da362be1e5d9886ecf3306a2b41e5f7a73d432872eacd2745e0cf26bfcc691452f87611e02e302c54f07b2f3a3288744535e57d154a73db
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
debug.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}/lib/TH
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DWITH_OPENMP=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/torch-th RENAME copyright)
|
||||
7
externals/vcpkg/ports/torch-th/vcpkg.json
vendored
Executable file
7
externals/vcpkg/ports/torch-th/vcpkg.json
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "torch-th",
|
||||
"version-string": "2019-04-19",
|
||||
"port-version": 3,
|
||||
"description": "Torch's TH library",
|
||||
"homepage": "https://github.com/torch/torch7"
|
||||
}
|
||||
Reference in New Issue
Block a user