Skip to content

Commit 80a6f33

Browse files
d4l3kc-p-i-o
andauthored
Formatting changes + fix windows OSS build (#409) (#409)
Summary: Add .clang-format Copied from https://github.com/pytorch/pytorch/blob/main/.clang-format Reviewed By: wconstab, fduwjj Differential Revision: D69275930 Pulled By: d4l3k Co-authored-by: Chirag Pandya <[email protected]>
1 parent 4ff6edf commit 80a6f33

File tree

5 files changed

+34
-26
lines changed

5 files changed

+34
-26
lines changed

.github/workflows/build-windows.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,22 @@ jobs:
4949
cd libuv-v1.38.0
5050
mkdir -p build
5151
cd build
52-
mkdir -p ${{ env.gtest_lib_path }}
52+
mkdir -p ${{ env.libuv_path }}
5353
cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.libuv_path }}
5454
msbuild INSTALL.vcxproj
5555
- name: Install googletest
5656
run: |
5757
conda activate py376_build
58-
curl https://codeload.github.com/google/googletest/tar.gz/release-1.10.0 --output `
59-
googletest-release-1.10.0.tar.gz
60-
tar xzvf googletest-release-1.10.0.tar.gz
61-
cd googletest-release-1.10.0
58+
curl -L https://github.com/google/googletest/releases/download/v1.15.2/googletest-1.15.2.tar.gz `
59+
--output googletest-1.15.2.tar.gz
60+
tar xzvf googletest-1.15.2.tar.gz
61+
cd googletest-1.15.2
6262
mkdir -p build
6363
cd build
6464
if (Test-Path -Path ${{ env.gtest_lib_path }}) {
6565
echo "Directory already exists"
6666
} else {
67-
mkdir ${{ env.gtest_lib_path }}
67+
mkdir -p ${{ env.gtest_lib_path }}
6868
}
6969
cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.gtest_lib_path }} -Dgtest_force_shared_crt=ON
7070
msbuild INSTALL.vcxproj
@@ -76,9 +76,9 @@ jobs:
7676
mkdir -p build
7777
cd build
7878
cmake .. -DBUILD_TEST=ON -Dlibuv_ROOT=${{ env.libuv_path }} `
79-
-DGTEST_LIBRARY=${{ env.gtest_lib_path }}/lib/gtestd.lib `
79+
-DGTEST_LIBRARY=${{ env.gtest_lib_path }}/lib/gtest.lib `
8080
-DGTEST_INCLUDE_DIR=${{ env.gtest_lib_path }}/include `
81-
-DGTEST_MAIN_LIBRARY=${{ env.gtest_lib_path }}/lib/gtest_maind.lib
81+
-DGTEST_MAIN_LIBRARY=${{ env.gtest_lib_path }}/lib/gtest_main.lib
8282
msbuild ALL_BUILD.vcxproj
8383
- name: Test
8484
run: |

.github/workflows/super-linter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ jobs:
3434
DEFAULT_BRANCH: "main"
3535
# disable JSCPD (copy-paste checker)
3636
VALIDATE_JSCPD: false
37+
# disable CPP
38+
VALIDATE_CPP: false

gloo/allreduce_bcube.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
#include <cstring>
1616
#include <iomanip>
1717
#include <iostream>
18+
#include <memory>
19+
#include <string>
1820
#include <unordered_map>
21+
#include <vector>
1922

2023
#include "gloo/algorithm.h"
2124
#include "gloo/common/error.h"

gloo/test/base_test.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@ namespace test {
1414

1515
const char* kDefaultDevice = "localhost";
1616

17+
// Transports that instantiated algorithms can be tested against.
18+
const std::vector<Transport> kTransportsForClassAlgorithms = {
19+
Transport::TCP,
20+
#if GLOO_HAVE_TRANSPORT_TCP_TLS
21+
Transport::TCP_TLS,
22+
#endif
23+
};
24+
25+
// Transports that function algorithms can be tested against.
26+
// This is the new style of calling collectives and must be
27+
// preferred over the instantiated style.
28+
const std::vector<Transport> kTransportsForFunctionAlgorithms = {
29+
Transport::TCP,
30+
#if GLOO_HAVE_TRANSPORT_TCP_TLS
31+
Transport::TCP_TLS,
32+
#endif
33+
Transport::UV,
34+
};
35+
1736
std::shared_ptr<::gloo::transport::Device> createDevice(Transport transport) {
1837
#if GLOO_HAVE_TRANSPORT_TCP
1938
if (transport == Transport::TCP) {

gloo/test/base_test.h

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,8 @@ enum Transport {
6565
UV,
6666
};
6767

68-
// Transports that instantiated algorithms can be tested against.
69-
const std::vector<Transport> kTransportsForClassAlgorithms{
70-
Transport::TCP,
71-
#if GLOO_HAVE_TRANSPORT_TCP_TLS
72-
Transport::TCP_TLS,
73-
#endif
74-
};
75-
76-
// Transports that function algorithms can be tested against.
77-
// This is the new style of calling collectives and must be
78-
// preferred over the instantiated style.
79-
const std::vector<Transport> kTransportsForFunctionAlgorithms{
80-
Transport::TCP,
81-
#if GLOO_HAVE_TRANSPORT_TCP_TLS
82-
Transport::TCP_TLS,
83-
#endif
84-
Transport::UV,
85-
};
68+
extern const std::vector<Transport> kTransportsForClassAlgorithms;
69+
extern const std::vector<Transport> kTransportsForFunctionAlgorithms;
8670

8771
std::shared_ptr<::gloo::transport::Device> createDevice(Transport transport);
8872

0 commit comments

Comments
 (0)