From owner-svn-ports-head@freebsd.org Sat Aug 17 20:14:18 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BD9FB0101; Sat, 17 Aug 2019 20:14:18 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469rxk1Dwmz3DfB; Sat, 17 Aug 2019 20:14:18 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CE9D1EF6D; Sat, 17 Aug 2019 20:14:18 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7HKEHLi060882; Sat, 17 Aug 2019 20:14:17 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HKEGYw060873; Sat, 17 Aug 2019 20:14:16 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <201908172014.x7HKEGYw060873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sat, 17 Aug 2019 20:14:16 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/devel: . fp16 fp16/files X-SVN-Commit-Revision: 509167 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Aug 2019 20:14:18 -0000 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 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 + + #if defined(PSIMD_H) +-#include ++#include + #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