Date: Sat, 17 Aug 2019 20:14:16 +0000 (UTC) From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r509167 - in head/devel: . fp16 fp16/files Message-ID: <201908172014.x7HKEGYw060873@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuri Date: Sat Aug 17 20:14:16 2019 New Revision: 509167 URL: https://svnweb.freebsd.org/changeset/ports/509167 Log: New port: devel/fp16: Conversion to/from half-precision floating point formats Added: head/devel/fp16/ head/devel/fp16/Makefile (contents, props changed) head/devel/fp16/distinfo (contents, props changed) head/devel/fp16/files/ head/devel/fp16/files/patch-CMakeLists.txt (contents, props changed) head/devel/fp16/files/patch-include_fp16.h (contents, props changed) head/devel/fp16/pkg-descr (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Sat Aug 17 20:13:20 2019 (r509166) +++ head/devel/Makefile Sat Aug 17 20:14:16 2019 (r509167) @@ -670,6 +670,7 @@ SUBDIR += fortytwo-encore SUBDIR += fossil SUBDIR += fossology-nomos-standalone + SUBDIR += fp16 SUBDIR += fpc-bfd SUBDIR += fpc-dbus SUBDIR += fpc-fcl-async Added: head/devel/fp16/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/fp16/Makefile Sat Aug 17 20:14:16 2019 (r509167) @@ -0,0 +1,40 @@ +# $FreeBSD$ + +PORTNAME= fp16 +PORTVERSION= g20181128 +CATEGORIES= devel + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Conversion to/from half-precision floating point formats + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${RUN_DEPENDS} +RUN_DEPENDS= ${LOCALBASE}/include/psimd.h:devel/psimd + +USES= cmake +USE_GITHUB= yes +GH_ACCOUNT= Maratyszcza +GH_PROJECT= ${PORTNAME:tu} +GH_TAGNAME= febbb1c + +CMAKE_OFF= FP16_BUILD_TESTS FP16_BUILD_BENCHMARKS + +NO_BUILD= yes +NO_ARCH= yes + +PLIST_FILES= include/fp16.h \ + include/fp16/__init__.py \ + include/fp16/avx.py \ + include/fp16/avx2.py \ + include/fp16/bitcasts.h \ + include/fp16/fp16.h + +do-test: + @cd ${BUILD_WRKSRC} && \ + ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DFP16_BUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test + +.include <bsd.port.mk> Added: head/devel/fp16/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/fp16/distinfo Sat Aug 17 20:14:16 2019 (r509167) @@ -0,0 +1,3 @@ +TIMESTAMP = 1566071714 +SHA256 (Maratyszcza-FP16-g20181128-febbb1c_GH0.tar.gz) = 71d00148641a3a03d9bcfc79485f8325de433f2af10b33f1cdf75d6a6d7a6331 +SIZE (Maratyszcza-FP16-g20181128-febbb1c_GH0.tar.gz) = 71061 Added: head/devel/fp16/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/fp16/files/patch-CMakeLists.txt Sat Aug 17 20:14:16 2019 (r509167) @@ -0,0 +1,72 @@ +--- CMakeLists.txt.orig 2018-11-28 18:36:19 UTC ++++ CMakeLists.txt +@@ -33,7 +33,7 @@ SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/ + SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps + CACHE PATH "Confu-style dependencies binary directory") + +-IF(NOT DEFINED PSIMD_SOURCE_DIR) ++IF(FALSE AND NOT DEFINED PSIMD_SOURCE_DIR) + MESSAGE(STATUS "Downloading PSimd to ${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd (define PSIMD_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -68,8 +68,7 @@ IF(${CMAKE_VERSION} VERSION_LESS "3.0") + ADD_LIBRARY(fp16 STATIC + include/fp16.h + include/fp16/fp16.h +- include/fp16/bitcasts.h +- include/fp16/psimd.h) ++ include/fp16/bitcasts.h) + SET_TARGET_PROPERTIES(fp16 PROPERTIES LINKER_LANGUAGE C) + ELSE() + ADD_LIBRARY(fp16 INTERFACE) +@@ -83,14 +82,13 @@ INSTALL(FILES include/fp16.h + INSTALL(FILES + include/fp16/bitcasts.h + include/fp16/fp16.h +- include/fp16/psimd.h + include/fp16/__init__.py + include/fp16/avx.py + include/fp16/avx2.py + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fp16) + + # ---[ Configure psimd +-IF(NOT TARGET psimd) ++IF(FALSE AND NOT TARGET psimd) + ADD_SUBDIRECTORY( + "${PSIMD_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd") +@@ -154,28 +152,28 @@ IF(FP16_BUILD_BENCHMARKS) + ADD_EXECUTABLE(ieee-element-bench bench/ieee-element.cc) + TARGET_COMPILE_DEFINITIONS(ieee-element-bench PRIVATE FP16_COMPARATIVE_BENCHMARKS=1) + TARGET_INCLUDE_DIRECTORIES(ieee-element-bench PRIVATE ${PROJECT_SOURCE_DIR}) +- TARGET_LINK_LIBRARIES(ieee-element-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(ieee-element-bench fp16 benchmark) + + ADD_EXECUTABLE(alt-element-bench bench/alt-element.cc) +- TARGET_LINK_LIBRARIES(alt-element-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(alt-element-bench fp16 benchmark) + + ADD_EXECUTABLE(from-ieee-array-bench bench/from-ieee-array.cc) + FP16_TARGET_ENABLE_CXX11(from-ieee-array-bench) + TARGET_COMPILE_DEFINITIONS(from-ieee-array-bench PRIVATE FP16_COMPARATIVE_BENCHMARKS=1) + TARGET_INCLUDE_DIRECTORIES(from-ieee-array-bench PRIVATE ${PROJECT_SOURCE_DIR}) +- TARGET_LINK_LIBRARIES(from-ieee-array-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(from-ieee-array-bench fp16 benchmark) + + ADD_EXECUTABLE(from-alt-array-bench bench/from-alt-array.cc) + FP16_TARGET_ENABLE_CXX11(from-alt-array-bench) +- TARGET_LINK_LIBRARIES(from-alt-array-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(from-alt-array-bench fp16 benchmark) + + ADD_EXECUTABLE(to-ieee-array-bench bench/to-ieee-array.cc) + FP16_TARGET_ENABLE_CXX11(to-ieee-array-bench) + TARGET_COMPILE_DEFINITIONS(to-ieee-array-bench PRIVATE FP16_COMPARATIVE_BENCHMARKS=1) + TARGET_INCLUDE_DIRECTORIES(to-ieee-array-bench PRIVATE ${PROJECT_SOURCE_DIR}) +- TARGET_LINK_LIBRARIES(to-ieee-array-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(to-ieee-array-bench fp16 benchmark) + + ADD_EXECUTABLE(to-alt-array-bench bench/to-alt-array.cc) + FP16_TARGET_ENABLE_CXX11(to-alt-array-bench) +- TARGET_LINK_LIBRARIES(to-alt-array-bench fp16 psimd benchmark) ++ TARGET_LINK_LIBRARIES(to-alt-array-bench fp16 benchmark) + ENDIF() Added: head/devel/fp16/files/patch-include_fp16.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/fp16/files/patch-include_fp16.h Sat Aug 17 20:14:16 2019 (r509167) @@ -0,0 +1,11 @@ +--- include/fp16.h.orig 2019-08-17 20:08:49 UTC ++++ include/fp16.h +@@ -5,7 +5,7 @@ + #include <fp16/fp16.h> + + #if defined(PSIMD_H) +-#include <fp16/psimd.h> ++#include <psimd.h> + #endif + + #endif /* FP16_H */ Added: head/devel/fp16/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/fp16/pkg-descr Sat Aug 17 20:14:16 2019 (r509167) @@ -0,0 +1,12 @@ +Header-only library for conversion to/from half-precision floating point +formats. + +Features: +* Supports IEEE and ARM alternative half-precision floating-point format + o Property converts infinities and NaNs + o Properly converts denormal numbers, even on systems without denormal support +* Header-only library, no installation or build required +* Compatible with C99 and C++11 +* Fully covered with unit tests and microbenchmarks + +WWW: https://github.com/Maratyszcza/FP16
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908172014.x7HKEGYw060873>