mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
turn on -Werror=unused-variable in our Bazel CPU build
Summary: We also fix any existing issues. Note that we only do this for the CPU build because nvcc is considered a C++ toolchain but it does not have the same flag support. Adding flags to the GPU build will cause nvcc errors. Test Plan: Built locally, rely on CI to confirm. Reviewers: malfet Subscribers: Tasks: Tags: Pull Request resolved: https://github.com/pytorch/pytorch/pull/79156 Approved by: https://github.com/seemethere, https://github.com/osalpekar, https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
e727539c29
commit
ab2ca95dd1
@@ -1900,8 +1900,6 @@ TEST(DataLoaderTest, ChunkDatasetDoesNotHang) {
|
||||
datasets::ChunkDatasetOptions(
|
||||
prefetch_count, batch_size, cache_size));
|
||||
|
||||
samplers::SequentialSampler& chunk_sampler = dataset->chunk_sampler();
|
||||
|
||||
auto data_loader = torch::data::make_data_loader(
|
||||
dataset.map(transforms::BatchLambda<DummyChunkDataReader::BatchType, DummyChunkDataReader::DataType>(
|
||||
[](DummyChunkDataReader::BatchType batch) {
|
||||
@@ -2043,7 +2041,6 @@ TEST(DataLoaderTest, ChunkDatasetLoad) {
|
||||
const size_t prefetch_count = 1;
|
||||
const size_t batch_size = 10;
|
||||
const size_t dataloader_worker_count = 0;
|
||||
const size_t save_interval = 2;
|
||||
|
||||
DummyChunkDataReader data_reader;
|
||||
samplers::SequentialSampler sampler(0);
|
||||
@@ -2223,8 +2220,6 @@ TEST(DataLoaderTest, ChunkDatasetCrossChunkShuffle) {
|
||||
std::vector<int> expected_result;
|
||||
{
|
||||
// construct expected result
|
||||
int offset = 0;
|
||||
|
||||
for (const auto i : c10::irange((chunk_count + cross_chunk_shuffle_count - 1) /
|
||||
cross_chunk_shuffle_count)) {
|
||||
for (const auto j : c10::irange(chunk_size)) {
|
||||
|
||||
Reference in New Issue
Block a user