Skip to content

Commit b32b52b

Browse files
Yinghai Lufacebook-github-bot
Yinghai Lu
authored andcommitted
Back out "Temporarily remove glow optin" (#4722)
Summary: Pull Request resolved: #4722 Reviewed By: hl475 Differential Revision: D22653444 fbshipit-source-id: 31557c523673c98f4fab80a9c90ed52edec33b1c
1 parent 00896cf commit b32b52b

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

.clang-format

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ AlignAfterOpenBracket: Align
66
AlignConsecutiveAssignments: false
77
AlignConsecutiveDeclarations: false
88
AlignEscapedNewlines: Right
9+
AlignEscapedNewlinesLeft: false
910
AlignOperands: true
1011
AlignTrailingComments: true
1112
AllowAllParametersOfDeclarationOnNextLine: true

lib/Backends/OpenCL/OpenCLTensorLayout.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ getLayoutForTempEnumRep(size_t n, const Node *node) {
9090
switch (n) {
9191
case ConvolutionNode::InputIndices::BiasIdx:
9292
return &CanonicalTensorLayout::getInstance().getLayoutsForDims()[1];
93-
default: { return getLayoutFromEnum(CN); }
93+
default:
94+
return getLayoutFromEnum(CN);
9495
}
9596
}
9697
return nullptr;

lib/Base/Tensor.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,8 @@ bool Tensor::isTiled(unsigned_t axis, dim_t size, bool fractional) const {
845845
case ElemKind::BoolTy: {
846846
return isTiledImpl<bool>(this, axis, size, fractional);
847847
}
848-
default: { llvm_unreachable("isTiled: Precision not supported!"); }
848+
default:
849+
llvm_unreachable("isTiled: Precision not supported!");
849850
}
850851
}
851852

lib/Graph/TensorLayout.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,10 @@ static bool acceptsAnyInputLayout(const glow::Node *node) {
666666
case Kinded::Kind::SliceNodeKind:
667667
case Kinded::Kind::TileNodeKind:
668668
case Kinded::Kind::InsertTensorNodeKind:
669-
case Kinded::Kind::SGDNodeKind: {
669+
case Kinded::Kind::SGDNodeKind:
670670
return true;
671-
}
672-
default: { return false; }
671+
default:
672+
return false;
673673
}
674674
}
675675

tests/benchmark/BERTProxyLayerBench.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ class BERTProxyLayerBench : public Benchmark {
179179
(float)(1.0 / std::sqrt(((double)hiddenSize_) / ((double)numHeads_)));
180180

181181
// Softmax expected output. Not needed for inference
182-
Tensor expected_Tensor(ElemKind::Int64ITy, {maxSequenceLength_ * batchSize_, 1});
182+
Tensor expected_Tensor(ElemKind::Int64ITy,
183+
{maxSequenceLength_ * batchSize_, 1});
183184
Constant *expected = mod->createConstant("expected", expected_Tensor);
184185

185186
// Weights/bias constants for FC1

utils/format.sh

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ print_usage() {
2828
}
2929

3030
fix_format() {
31+
$CLANG_COMMAND -version
3132
find lib tests/unittests/ tools/ include examples torch_glow inference_engines externalbackends \
3233
-name \*.h -print0 \
3334
-o -name \*.hpp -print0 \

0 commit comments

Comments
 (0)