Skip to content

Commit

Permalink
Add github action for windows
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#253

Differential Revision: D19463250

Pulled By: shz0116

fbshipit-source-id: b1bf22121ef5b4259ac5218789564db5c9bee084
  • Loading branch information
Hongzhang Shan authored and facebook-github-bot committed Jan 19, 2020
1 parent e1f67bb commit a22e6b8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 3 deletions.
43 changes: 40 additions & 3 deletions .github/workflows/fbgemmci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ on:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest] ## [windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v2
Expand All @@ -37,6 +36,7 @@ jobs:
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
echo GITHUB_SHA = $GITHUB_SHA
echo GITHUB_REF = $GITHUB_REF
c++ --verbose
- name: Build static FBGEMM lib
run: |
Expand All @@ -47,7 +47,7 @@ jobs:
make
- name: Test static FBGEMM lib
if: contains(runner.os, 'Linux') # not run on macos-latest now due to supporting AVX2
if: contains(runner.os, 'linux') # not run on macos-latest now due to supporting AVX2
run: |
set -e
cd build_static
Expand All @@ -68,3 +68,40 @@ jobs:
cd build_shared
ctest
build1:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]

steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Build static FBGEMM lib
shell: cmd
run: |
set
echo %PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
echo "INSTALL NINJA:"
pip install ninja
which ninja
mkdir build_static
cd build_static
echo "STARTING CMAKE"
cmake -G Ninja -DFBGEMM_BUILD_BENCHMARKS=OFF -DFBGEMM_BUILD_TESTS=OFF -DFBGEMM_LIBRARY_TYPE=static -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" ..
ninja all
echo "Build Success"
# - name: Test static FBGEMM lib
# run: |
# set
# cd build_static
# ctest

1 change: 1 addition & 0 deletions src/FbgemmConv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <algorithm>
#include <functional>
#include <numeric>
#include <stdexcept> // for logic_error
#include <vector>
#include "fbgemm/Fbgemm.h"

Expand Down
1 change: 1 addition & 0 deletions src/FbgemmI8Depthwise3DAvx2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define FBGEMM_EXPORTS
#include "fbgemm/FbgemmI8DepthwiseAvx2.h"

#include <stdexcept> // for logic_error
#include <string>
#include <tuple> // for tie

Expand Down
1 change: 1 addition & 0 deletions src/FbgemmI8Depthwise3x3Avx2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define FBGEMM_EXPORTS
#include "fbgemm/FbgemmI8DepthwiseAvx2.h"

#include <stdexcept> // for logic_error
#include <string>

#include "./FbgemmI8Depthwise2DAvx2-inl.h"
Expand Down
1 change: 1 addition & 0 deletions src/FbgemmI8DepthwiseAvx2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define FBGEMM_EXPORTS
#include "fbgemm/FbgemmI8DepthwiseAvx2.h"

#include <stdexcept> // for logic_error
#include <string>

#include "./FbgemmI8Depthwise2DAvx2-inl.h"
Expand Down
1 change: 1 addition & 0 deletions src/FbgemmI8DepthwisePerChannelQuantAvx2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define FBGEMM_EXPORTS
#include "fbgemm/FbgemmI8DepthwiseAvx2.h"

#include <stdexcept> // for logic_error
#include <string>

#include "./FbgemmI8Depthwise2DAvx2-inl.h"
Expand Down

0 comments on commit a22e6b8

Please sign in to comment.