Skip to content

Commit

Permalink
[CI] Fix windows build, add azure pipeline (#3458)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored Jun 28, 2019
1 parent 3818b2a commit 4d9976c
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 10 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/HalideIR
Submodule HalideIR updated 1 files
+6 −4 src/tvm/node/node.h
16 changes: 12 additions & 4 deletions 3rdparty/compiler-rt/builtin_fp16.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@

<img src=https://raw.githubusercontent.com/tqchen/tvm.ai/master/images/logo/tvm-logo-small.png width=128/> 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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
81 changes: 81 additions & 0 deletions tests/azure-pipelines/main.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4d9976c

Please sign in to comment.