From 4d9976cf7eb94bbf506e8a1f5713bcc76ec45d49 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Fri, 28 Jun 2019 12:24:04 -0700 Subject: [PATCH] [CI] Fix windows build, add azure pipeline (#3458) --- 3rdparty/HalideIR | 2 +- 3rdparty/compiler-rt/builtin_fp16.h | 16 ++++++-- README.md | 7 ++-- src/common/socket.h | 2 +- tests/azure-pipelines/main.yml | 81 +++++++++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 10 deletions(-) create mode 100644 tests/azure-pipelines/main.yml diff --git a/3rdparty/HalideIR b/3rdparty/HalideIR index 32057b5..c4e5bc7 160000 --- a/3rdparty/HalideIR +++ b/3rdparty/HalideIR @@ -1 +1 @@ -Subproject commit 32057b53eee870d73c6c21dc820d6546b4d9a13f +Subproject commit c4e5bc77bd7bca05e45664b35c6ce88246c43b1b diff --git a/3rdparty/compiler-rt/builtin_fp16.h b/3rdparty/compiler-rt/builtin_fp16.h index 1657d28..67fe643 100644 --- a/3rdparty/compiler-rt/builtin_fp16.h +++ b/3rdparty/compiler-rt/builtin_fp16.h @@ -73,7 +73,9 @@ static inline DST_T __truncXfYf2__(SRC_T a) { const DST_REP_T dstNaNCode = dstQNaN - 1; // Break a into a sign and representation of the absolute value - const union { SRC_T f; SRC_REP_T i; } src_rep = {.f = a}; + union SrcExchangeType { SRC_T f; SRC_REP_T i; }; + SrcExchangeType src_rep; + src_rep.f = a; const SRC_REP_T aRep = src_rep.i; const SRC_REP_T aAbs = aRep & srcAbsMask; const SRC_REP_T sign = aRep & srcSignMask; @@ -134,7 +136,9 @@ static inline DST_T __truncXfYf2__(SRC_T a) { // Apply the signbit to (DST_T)abs(a). const DST_REP_T result = absResult | sign >> (srcBits - dstBits); - const union { DST_T f; DST_REP_T i; } dst_rep = {.i = result}; + union DstExchangeType { DST_T f; DST_REP_T i; }; + DstExchangeType dst_rep; + dst_rep.i = result; return dst_rep.f; } @@ -163,7 +167,9 @@ static inline DST_T __extendXfYf2__(SRC_T a) { const DST_REP_T dstMinNormal = DST_REP_T(1) << DST_SIG_BITS; // Break a into a sign and representation of the absolute value - const union { SRC_T f; SRC_REP_T i; } src_rep = {.f = a}; + union SrcExchangeType { SRC_T f; SRC_REP_T i; }; + SrcExchangeType src_rep; + src_rep.f = a; const SRC_REP_T aRep = src_rep.i; const SRC_REP_T aAbs = aRep & srcAbsMask; const SRC_REP_T sign = aRep & srcSignMask; @@ -205,6 +211,8 @@ static inline DST_T __extendXfYf2__(SRC_T a) { // Apply the signbit to (DST_T)abs(a). const DST_REP_T result = absResult | (DST_REP_T)sign << (dstBits - srcBits); - const union { DST_T f; DST_REP_T i; } dst_rep = {.i = result}; + union DstExchangeType { DST_T f; DST_REP_T i; }; + DstExchangeType dst_rep; + dst_rep.i = result; return dst_rep.f; } diff --git a/README.md b/README.md index 02a3493..742f163 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,14 @@ Open Deep Learning Compiler Stack ============================================== - -[![GitHub license](https://dmlc.github.io/img/apache2.svg)](./LICENSE) -[![Build Status](http://ci.tvm.ai:8080/buildStatus/icon?job=tvm/master)](http://ci.tvm.ai:8080/job/tvm/job/master/) - [Documentation](https://docs.tvm.ai) | [Contributors](CONTRIBUTORS.md) | [Community](https://tvm.ai/community.html) | [Release Notes](NEWS.md) +[![Build Status](http://ci.tvm.ai:8080/buildStatus/icon?job=tvm/master)](http://ci.tvm.ai:8080/job/tvm/job/master/) +[![Azure Pipline Status](https://dev.azure.com/tvmai/tvm/_apis/build/status/tqchen.tvm?branchName=master)](https://dev.azure.com/tvmai/tvm/_build/latest?definitionId=1&branchName=master) + TVM is a compiler stack for deep learning systems. It is designed to close the gap between the productivity-focused deep learning frameworks, and the performance- and efficiency-focused hardware backends. TVM works with deep learning frameworks to provide end to end compilation to different backends. diff --git a/src/common/socket.h b/src/common/socket.h index 91f9f4e..2a2d916 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -135,7 +135,7 @@ struct SockAddr { } #ifdef _WIN32 - const char *s = inet_ntop(addr.ss_family, sinx_addr, + const char *s = inet_ntop(addr.ss_family, (PVOID)sinx_addr, // NOLINT(*) &buf[0], buf.length()); #else const char *s = inet_ntop(addr.ss_family, sinx_addr, diff --git a/tests/azure-pipelines/main.yml b/tests/azure-pipelines/main.yml new file mode 100644 index 0000000..094c1df --- /dev/null +++ b/tests/azure-pipelines/main.yml @@ -0,0 +1,81 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Azure pipeline +# We use it to cover windows and mac build +# Jenkins is still the primary CI + +name: $(Date:yyyyMMdd)$(Rev:.r) +jobs: + - job: Windows_VS2017_x86 + pool: + vmImage: 'vs2017-win2016' + steps: + - script: git submodule update --recursive --init + displayName: Initialize submodules + - script: mkdir build.common + displayName: Make Build Directory + - task: CMake@1 + inputs: + workingDirectory: 'build.common' + cmakeArgs: > + -DUSE_SORT=ON + -DUSE_RPC=ON + -DUSE_GRAPH_RUNTIME=ON + .. + - task: MSBuild@1 + inputs: + solution: 'build.common/ALL_BUILD.vcxproj' + maximumCpuCount: true + configuration: 'Debug' + - job: Windows_VS2017_x64 + pool: + vmImage: 'vs2017-win2016' + steps: + - script: git submodule update --recursive --init + displayName: Initialize submodules + - script: mkdir build.common + displayName: Make Build Directory + - task: CMake@1 + inputs: + workingDirectory: 'build.common' + cmakeArgs: > + -DUSE_SORT=ON + -DUSE_RPC=ON + -DUSE_GRAPH_RUNTIME=ON + .. + - task: MSBuild@1 + inputs: + solution: 'build.common/ALL_BUILD.vcxproj' + - job: MacOS_XCode9 + pool: + vmImage: 'xcode9-macos10.13' + steps: + - script: git submodule update --recursive --init + displayName: Initialize submodules + - script: mkdir build.common + displayName: Make Build Directory + - task: CMake@1 + inputs: + workingDirectory: 'build.common' + cmakeArgs: > + -DUSE_SORT=ON + -DUSE_RPC=ON + -DUSE_GRAPH_RUNTIME=ON + .. + - script: cd build.common && make -j`sysctl -n hw.ncpu` + displayName: Build the project -- 2.7.4