Skip to content

Commit 20e4bc9

Browse files
xinyazhangslojosic-amd
authored andcommitted
fix lint
1 parent 502feb1 commit 20e4bc9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

aten/src/ATen/Context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void Context::setUserEnabledNNPACK(bool e) {
180180
}
181181

182182
bool Context::allowTF32CuDNN(const std::string& op) const {
183-
if (op.size() == 0){
183+
if (op.empty()){
184184
bool allow_tf32_rnn = float32Precision("cuda", "rnn") == "tf32";
185185
bool allow_tf32_conv = float32Precision("cuda", "conv") == "tf32";
186186
TORCH_CHECK(
@@ -426,7 +426,7 @@ void Context::setFloat32Precision(const std::string& backend, const std::string&
426426
std::string msg;
427427
auto iterp = _fp32_precisions.find(backend);
428428
TORCH_CHECK(iterp != _fp32_precisions.end());
429-
for (auto p : iterp->second) {
429+
for (const auto& p : iterp->second) {
430430
msg += p;
431431
msg += " ";
432432
}

test/test_transformers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
PLATFORM_SUPPORTS_CUDNN_ATTENTION,
5252
tf32_on_and_off,
5353
tf32_enabled,
54-
ROCM_VERSION,
5554
)
5655

5756
if TEST_FAIRSEQ:

0 commit comments

Comments
 (0)