From owner-svn-ports-all@freebsd.org Wed Jan 15 23:13:35 2020 Return-Path: Delivered-To: svn-ports-all@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 5F2AC221414; Wed, 15 Jan 2020 23:13:35 +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 47yjmv1nrzz49hn; Wed, 15 Jan 2020 23:13:35 +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 38496E2B3; Wed, 15 Jan 2020 23:13:35 +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 00FNDZti036947; Wed, 15 Jan 2020 23:13:35 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00FNDXWZ036938; Wed, 15 Jan 2020 23:13:33 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <202001152313.00FNDXWZ036938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Wed, 15 Jan 2020 23:13:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r523192 - in head/misc: . glow glow/files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/misc: . glow glow/files X-SVN-Commit-Revision: 523192 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jan 2020 23:13:35 -0000 Author: yuri Date: Wed Jan 15 23:13:33 2020 New Revision: 523192 URL: https://svnweb.freebsd.org/changeset/ports/523192 Log: New port: misc/glow: Machine learning compiler and execution engine Added: head/misc/glow/ head/misc/glow/Makefile (contents, props changed) head/misc/glow/distinfo (contents, props changed) head/misc/glow/files/ head/misc/glow/files/patch-CMakeLists.txt (contents, props changed) head/misc/glow/files/patch-lib_LLVMIRCodeGen_LLVMCompiledFunction.cpp (contents, props changed) head/misc/glow/pkg-descr (contents, props changed) head/misc/glow/pkg-plist (contents, props changed) Modified: head/misc/Makefile Modified: head/misc/Makefile ============================================================================== --- head/misc/Makefile Wed Jan 15 22:34:34 2020 (r523191) +++ head/misc/Makefile Wed Jan 15 23:13:33 2020 (r523192) @@ -152,6 +152,7 @@ SUBDIR += gkrellmlaunch2 SUBDIR += gkrellshoot2 SUBDIR += gkx86info2 + SUBDIR += glow SUBDIR += gnome-devel-docs SUBDIR += gnome-getting-started-docs SUBDIR += gnome-icon-theme Added: head/misc/glow/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/glow/Makefile Wed Jan 15 23:13:33 2020 (r523192) @@ -0,0 +1,43 @@ +# $FreeBSD$ + +PORTNAME= glow +DISTVERSION= g20200115 +CATEGORIES= misc # machine-learning +PKGNAMESUFFIX= -nn-compiler + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Machine learning compiler and execution engine + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libLLVM-${LLVM_VER:R}.so:devel/llvm${LLVM_VER:S/.//} \ + libglog.so:devel/glog \ + libprotobuf.so:devel/protobuf + +USES= cmake compiler:c++14-lang python:build +USE_GITHUB= yes +GH_ACCOUNT= pytorch +GH_TAGNAME= 97f84e830404183375380842de914e07c0961f7f +GH_TUPLE= \ + google:benchmark:090faec:googlebenchmark/tests/googlebenchmark \ + google:googletest:0c799d0:googletest/tests/googletest \ + houseroad:foxi:8015abb:foxi/thirdparty/foxi \ + Maratyszcza:FP16:34d4bf0:fp16/thirdparty/fp16 \ + onnx:onnx:50dc186:onnx/thirdparty/onnx \ + stp:OutputCheck:eab62a5:OutputCheck/tests/OutputCheck + +CMAKE_ARGS= -DFREEBSD_LLVM_VERSION:STRING=${LLVM_VER} -DGIT_SHA1:STRING="\"${GH_TAGNAME}\"" -DGIT_DATE:STRING="\"${DISTVERSION:S/g//}\"" +CMAKE_OFF= GLOW_BUILD_EXAMPLES GLOW_BUILD_TESTS + +BINARY_ALIAS= python=${PYTHON_CMD} + +LLVM_VER= 8.0 + +do-install: # https://github.com/pytorch/glow/issues/3461 + cd ${WRKSRC} && ${COPYTREE_SHARE} include ${STAGEDIR}${PREFIX} + cd ${BUILD_WRKSRC} && ${COPYTREE_SHARE} glow ${STAGEDIR}${PREFIX}/include + cd ${WRKSRC}/thirdparty/foxi/foxi && ${MKDIR} ${STAGEDIR}${PREFIX}/include/foxi && (for f in `${LS} *.h`; do ${INSTALL_DATA} $$f ${STAGEDIR}${PREFIX}/include/foxi; done;) + (for lib in `${FIND} ${BUILD_WRKSRC} -name "*.a"`; do ${INSTALL_DATA} $$lib ${STAGEDIR}${PREFIX}/lib/; done;) + +.include Added: head/misc/glow/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/glow/distinfo Wed Jan 15 23:13:33 2020 (r523192) @@ -0,0 +1,15 @@ +TIMESTAMP = 1579129746 +SHA256 (pytorch-glow-g20200115-97f84e830404183375380842de914e07c0961f7f_GH0.tar.gz) = 4b7913108b8ccf4191a504be31519a472807a37d17e3ee6ef3e9fd6f7529bff2 +SIZE (pytorch-glow-g20200115-97f84e830404183375380842de914e07c0961f7f_GH0.tar.gz) = 47971229 +SHA256 (google-benchmark-090faec_GH0.tar.gz) = 0699cf1ac5ef31ebc15ded60329ca8b90cf0b4ae75c18eaf7300fe8a4c914a0f +SIZE (google-benchmark-090faec_GH0.tar.gz) = 150159 +SHA256 (google-googletest-0c799d0_GH0.tar.gz) = f102915c9507f4f6ef87131892b090e4df9d41fae157ac6b0d76c84c8e84d3b2 +SIZE (google-googletest-0c799d0_GH0.tar.gz) = 992346 +SHA256 (houseroad-foxi-8015abb_GH0.tar.gz) = 07dc191ef38426617e6180e795fb3e3c5bf122445804003afa213dd762269213 +SIZE (houseroad-foxi-8015abb_GH0.tar.gz) = 28531 +SHA256 (Maratyszcza-FP16-34d4bf0_GH0.tar.gz) = e8d1f7190aaa9a2bedb92620c5b2e93529be3be37dd1f0c23e741cbef18365b2 +SIZE (Maratyszcza-FP16-34d4bf0_GH0.tar.gz) = 70697 +SHA256 (onnx-onnx-50dc186_GH0.tar.gz) = 1ec0e2a61be055e4cccb2546e78f7a48d8f1999a707a9907a58cfebd3c966318 +SIZE (onnx-onnx-50dc186_GH0.tar.gz) = 2445813 +SHA256 (stp-OutputCheck-eab62a5_GH0.tar.gz) = 003939b6e0b9cd306497873320f62bb52f35ef50346ae6622fa102ea95fb5b7e +SIZE (stp-OutputCheck-eab62a5_GH0.tar.gz) = 16493 Added: head/misc/glow/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/glow/files/patch-CMakeLists.txt Wed Jan 15 23:13:33 2020 (r523192) @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2020-01-15 20:28:56 UTC ++++ CMakeLists.txt +@@ -151,7 +151,7 @@ endif () + # Top level setup for external backends + ExternalBackendsInit() + +-find_package(LLVM CONFIG) ++find_package(LLVM ${FREEBSD_LLVM_VERSION} CONFIG) + if(NOT LLVM_FOUND OR LLVM_VERSION VERSION_LESS 7.0) + message(SEND_ERROR "LLVM >= 7.0 is required to build Glow") + endif() Added: head/misc/glow/files/patch-lib_LLVMIRCodeGen_LLVMCompiledFunction.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/glow/files/patch-lib_LLVMIRCodeGen_LLVMCompiledFunction.cpp Wed Jan 15 23:13:33 2020 (r523192) @@ -0,0 +1,11 @@ +--- lib/LLVMIRCodeGen/LLVMCompiledFunction.cpp.orig 2020-01-15 20:31:37 UTC ++++ lib/LLVMIRCodeGen/LLVMCompiledFunction.cpp +@@ -99,7 +99,7 @@ Error LLVMCompiledFunction::execute(ExecutionContext * + auto *traceContext = context->getTraceContext(); + TRACE_EVENT_SCOPE_NAMED(traceContext, TraceLevel::RUNTIME, + "findJitmainSymbol", fjEvent); +- Expected address = NULL; ++ Expected address = 0; + { + std::lock_guard lock(JITLock_); + auto sym = JIT_->findSymbol("jitmain"); Added: head/misc/glow/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/glow/pkg-descr Wed Jan 15 23:13:33 2020 (r523192) @@ -0,0 +1,6 @@ +Glow is a machine learning compiler and execution engine for hardware +accelerators. It is designed to be used as a backend for high-level machine +learning frameworks. The compiler is designed to allow state of the art compiler +optimizations and code generation of neural network graphs. + +WWW: https://github.com/pytorch/glow Added: head/misc/glow/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/glow/pkg-plist Wed Jan 15 23:13:33 2020 (r523192) @@ -0,0 +1,146 @@ +include/foxi/onnxifi.h +include/foxi/onnxifi_ext.h +include/foxi/onnxifi_loader.h +include/glow/AutoGenIRBuilder.cpp +include/glow/AutoGenIRBuilder.h +include/glow/AutoGenIRGen.h +include/glow/AutoGenInstr.cpp +include/glow/AutoGenInstr.def +include/glow/AutoGenInstr.h +include/glow/AutoGenNodes.cpp +include/glow/AutoGenNodes.def +include/glow/AutoGenNodes.h +include/glow/Backend/Backend.h +include/glow/Backend/BackendUtils.h +include/glow/Backend/CompiledFunction.h +include/glow/Backends/BackendOptions.h +include/glow/Backends/DeviceManager.h +include/glow/Backends/DummyDeviceManager.h +include/glow/Backends/Interpreter/Interpreter.h +include/glow/Backends/Interpreter/InterpreterDeviceManager.h +include/glow/Backends/Interpreter/InterpreterFunction.h +include/glow/Backends/LayoutConverter.h +include/glow/Backends/QueueBackedDeviceManager.h +include/glow/Base/DeviceTensorTransferManager.h +include/glow/Base/DimType.h +include/glow/Base/IO.h +include/glow/Base/Image.h +include/glow/Base/SharedMutex.h +include/glow/Base/TaggedList.h +include/glow/Base/Tensor.h +include/glow/Base/Train.h +include/glow/Base/Traits.h +include/glow/Base/Type.h +include/glow/CPU/libjit_bc.inc +include/glow/CPUSpecificInstrsVerification.h +include/glow/CPUSpecificNodesVerification.h +include/glow/CodeGen/MemoryAllocator.h +include/glow/Converter/Float16Converter.h +include/glow/Converter/FunctionConverter.h +include/glow/Converter/TypeAToTypeBFunctionConverter.h +include/glow/ExecutionContext/ExecutionContext.h +include/glow/ExecutionContext/TraceEvents.h +include/glow/ExecutionEngine/ExecutionEngine.h +include/glow/Exporter/CommonOperatorWriter.h +include/glow/Exporter/ONNXModelWriter.h +include/glow/Exporter/ProtobufWriter.h +include/glow/Graph/Grad.h +include/glow/Graph/Graph.h +include/glow/Graph/Hook.h +include/glow/Graph/Log.h +include/glow/Graph/Node.h +include/glow/Graph/NodeValue.h +include/glow/Graph/Nodes.h +include/glow/Graph/PlaceholderBindings.h +include/glow/Graph/TensorLayout.h +include/glow/Graph/UseDef.h +include/glow/Graph/Utils.h +include/glow/Graph/VerifierHelper.h +include/glow/IR/IR.h +include/glow/IR/IRBuilder.h +include/glow/IR/IRGen.h +include/glow/IR/IRUtils.h +include/glow/IR/Instrs.h +include/glow/Importer/Caffe2ModelLoader.h +include/glow/Importer/CommonOperatorLoader.h +include/glow/Importer/ONNXIFIModelLoader.h +include/glow/Importer/ONNXModelLoader.h +include/glow/Importer/ProtobufLoader.h +include/glow/InstrGenIncludes.h +include/glow/LLVMIRCodeGen/AllocationsInfo.h +include/glow/LLVMIRCodeGen/GlowJIT.h +include/glow/LLVMIRCodeGen/LLVMBackend.h +include/glow/LLVMIRCodeGen/LLVMCompiledFunction.h +include/glow/LLVMIRCodeGen/LLVMIRGen.h +include/glow/NodeGenIncludes.h +include/glow/Optimizer/GraphOptimizer/CompilationContext.h +include/glow/Optimizer/GraphOptimizer/FunctionPass.h +include/glow/Optimizer/GraphOptimizer/FunctionPasses.def +include/glow/Optimizer/GraphOptimizer/FunctionPasses.h +include/glow/Optimizer/GraphOptimizer/GraphOptimizer.h +include/glow/Optimizer/GraphOptimizer/PassManager.h +include/glow/Optimizer/GraphOptimizer/TrainingPreparation.h +include/glow/Optimizer/GraphOptimizerPipeline/Pipeline.h +include/glow/Optimizer/IROptimizer/IROptimizer.h +include/glow/Optimizer/Lower/Lower.h +include/glow/Partitioner/Partitioner.h +include/glow/Partitioner/PartitionerBase.h +include/glow/Partitioner/PartitionerOptimizer.h +include/glow/Partitioner/PartitionerTypes.h +include/glow/Partitioner/PartitionerUtils.h +include/glow/Partitioner/PartitionerValidation.h +include/glow/Quantization/Base/Base.h +include/glow/Quantization/Base/Profile.h +include/glow/Quantization/Quantization.h +include/glow/Quantization/Serialization.h +include/glow/Runtime/DeferredWeightLoader.h +include/glow/Runtime/Executor/Executor.h +include/glow/Runtime/Executor/ThreadPoolExecutor.h +include/glow/Runtime/HostManager/HostManager.h +include/glow/Runtime/Provisioner/Provisioner.h +include/glow/Runtime/RuntimeTypes.h +include/glow/Runtime/StatsExporter.h +include/glow/Support/Compiler.h +include/glow/Support/Debug.h +include/glow/Support/Error.h +include/glow/Support/Float16.h +include/glow/Support/Memory.h +include/glow/Support/Random.h +include/glow/Support/Register.h +include/glow/Support/Support.h +include/glow/Support/TensorPool.h +include/glow/Support/ThreadPool.h +include/glow/Support/ZipUtils.h +include/glow/Testing/StrCheck.h +lib/libBackend.a +lib/libBackends.a +lib/libBase.a +lib/libCPUBackend.a +lib/libCPURuntimeNative.a +lib/libCodeGen.a +lib/libConverter.a +lib/libExecutionContext.a +lib/libExecutionEngine.a +lib/libExecutor.a +lib/libExporter.a +lib/libGraph.a +lib/libGraphOptimizer.a +lib/libGraphOptimizerPipeline.a +lib/libHostManager.a +lib/libIR.a +lib/libIROptimizer.a +lib/libImporter.a +lib/libInterpreter.a +lib/libLLVMIRCodeGen.a +lib/libLower.a +lib/libMemberType.a +lib/libMiniz.a +lib/libPartitioner.a +lib/libProvisioner.a +lib/libQuantization.a +lib/libQuantizationBase.a +lib/libRuntime.a +lib/libSupport.a +lib/libTensorPool.a +lib/libonnx_proto.a +lib/libonnxifi-glow-lib.a