The following issues were found
caffe2/python/helpers/control_ops.py
1 issues
Line: 1
Column: 1
## @package control_ops
# Module caffe2.python.helpers.control_ops
from caffe2.python.control_ops_util import add_if_op, add_while_op
Reported by Pylint.
caffe2/ideep/utils/ideep_register.cc
1 issues
Line: 22
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
CAFFE_ENFORCE(src);
CAFFE_ENFORCE(dst);
memcpy(dst, src, nbytes);
}
} // namespace
REGISTER_COPY_BYTES_FUNCTION(
DeviceType::IDEEP,
Reported by FlawFinder.
caffe2/core/workspace_test.cc
1 issues
Line: 12
CAFFE_KNOWN_TYPE(WorkspaceTestFoo);
TEST(WorkspaceTest, BlobAccess) {
Workspace ws;
EXPECT_FALSE(ws.HasBlob("nonexisting"));
EXPECT_EQ(ws.GetBlob("nonexisting"), nullptr);
Reported by Cppcheck.
.jenkins/pytorch/fake_numpy/numpy.py
1 issues
Line: 1
Column: 1
raise ModuleNotFoundError("Sorry PyTorch, but our NumPy is in the other folder")
Reported by Pylint.
caffe2/core/transform_test.cc
1 issues
Line: 158
EXPECT_EQ(matches[1][1], 3);
}
TEST(TransformTest, TestReplacePattern) {
Workspace ws;
ws.CreateBlob("in");
NetDef netdef;
AddOp(&netdef, "TransformDummyOp1", {"in"}, {"mid1"});
Reported by Cppcheck.
caffe2/core/timer_test.cc
1 issues
Line: 41
EXPECT_LT(timer.MicroSeconds(), 1000);
}
TEST(TimerTest, TestLatency) {
constexpr int iter = 1000;
float latency = 0;
Timer timer;
for (int i = 0; i < iter; ++i) {
timer.Start();
Reported by Cppcheck.
.circleci/cimodel/data/dimensions.py
1 issues
Line: 1
Column: 1
PHASES = ["build", "test"]
CUDA_VERSIONS = [
"102",
"111",
"113",
]
ROCM_VERSIONS = [
Reported by Pylint.
caffe2/core/stats_test.cc
1 issues
Line: 52
#define EXPECT_SUBSET(map, sub) EXPECT_EQ(filterMap((map), (sub)), (sub))
TEST(StatsTest, StatsTestClass) {
MyCaffeClass a("first");
MyCaffeClass b("second");
for (int i = 0; i < 10; ++i) {
a.run(10);
b.run(5);
Reported by Cppcheck.
caffe2/python/helpers/pooling.py
1 issues
Line: 1
Column: 1
## @package pooling
# Module caffe2.python.helpers.pooling
## @package fc
# Module caffe2.python.helpers.pooling
Reported by Pylint.
caffe2/python/helpers/quantization.py
1 issues
Line: 1
Column: 1
# @package quantization
# Module caffe2.python.helpers.quantization
def fused_8bit_rowwise_quantized_to_float(
model, blob_in, blob_out
):
"""Fused8BitRowwiseQuantizedToFloat"""
return model.net.Fused8BitRowwiseQuantizedToFloat(blob_in, blob_out)
Reported by Pylint.