From owner-svn-ports-head@freebsd.org Sun Nov 3 17:14:49 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 1ED2D17B950; Sun, 3 Nov 2019 17:14:49 +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 475jGc75hcz4Ncx; Sun, 3 Nov 2019 17:14:48 +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 D656AF067; Sun, 3 Nov 2019 17:14:48 +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 xA3HEmwi019095; Sun, 3 Nov 2019 17:14:48 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xA3HEmJM019094; Sun, 3 Nov 2019 17:14:48 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <201911031714.xA3HEmJM019094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sun, 3 Nov 2019 17:14:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r516444 - head/science/py-tensorflow X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: head/science/py-tensorflow X-SVN-Commit-Revision: 516444 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: Sun, 03 Nov 2019 17:14:49 -0000 Author: yuri Date: Sun Nov 3 17:14:48 2019 New Revision: 516444 URL: https://svnweb.freebsd.org/changeset/ports/516444 Log: science/py-tensorflow: Fix the option CPU_OPTS=ON, it wasn't passing options to bazel. The BAZEL_COPT variable was always left blank, while docs recommend passing optimization options to bazel. Also replace .include with option helpers. Testing performed: Ran with CPU_OPTS=ON on a simple computation and observed that warnings about missing SSE4.2 optimizations are gone. Approved by: portmgr (unbreak the option; change to the recommended format) Modified: head/science/py-tensorflow/Makefile Modified: head/science/py-tensorflow/Makefile ============================================================================== --- head/science/py-tensorflow/Makefile Sun Nov 3 16:59:39 2019 (r516443) +++ head/science/py-tensorflow/Makefile Sun Nov 3 17:14:48 2019 (r516444) @@ -3,11 +3,11 @@ PORTNAME= tensorflow DISTVERSIONPREFIX= v DISTVERSION= 1.14.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= science python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DIST_SUBDIR= ${PORTNAME} -EXTRACT_ONLY= tensorflow-tensorflow-v1.14.0_GH0.tar.gz +EXTRACT_ONLY= tensorflow-tensorflow-v${DISTVERSION}_GH0.tar.gz MAINTAINER= amzo1337@gmail.com COMMENT= Computation using data flow graphs for scalable machine learning @@ -58,22 +58,18 @@ SHEBANG_GLOB= *.py USE_GITHUB= yes USE_PYTHON= distutils -OPTIONS_DEFINE= CPU_OPTS -CPU_OPTS_DESC= Enable CPU optimisations - BAZEL_BOOT= --output_user_root=${WRKDIR}/bazel_out PLIST_SUB= TF_PORT_VERSION=${PORTVERSION} -.include "Makefile.MASTER_SITES" -.include +OPTIONS_DEFINE= CPU_OPTS -.if !${PORT_OPTIONS:MCPU_OPTS} -CPU_TARGET=x86-64 -.else -CPU_TARGET=native -.endif +CPU_OPTS_DESC= Enable optimisations using features available on your CPU +CPU_OPTS_VARS= CPU_TARGET=native BAZEL_COPT="-c opt --copt=-march=native --copt=-mfpmath=sse" +CPU_OPTS_VARS_OFF= CPU_TARGET=x86-64 +.include "Makefile.MASTER_SITES" + post-patch: # Set up a local repository with our pre-downloaded packages # This prevents bazel downloading the files without modifying @@ -160,4 +156,4 @@ post-install: # autoplist: thousands of files, all und @cd ${STAGEDIR}${PREFIX} && \ ${FIND} ${PYTHON_SITELIBDIR:C|^${LOCALBASE}/||} -type f -or -type l | grep -v "egg-info/" >> ${TMPPLIST} -.include +.include