From: peter Date: Wed, 27 Feb 2019 04:33:59 +0000 (-0800) Subject: Fix linking errors when building dataloader test binaries on Windows (#17494) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~1072 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96faaa9d50fd4b5d96a9d400a544f8e229c52aa8;p=platform%2Fupstream%2Fpytorch.git Fix linking errors when building dataloader test binaries on Windows (#17494) Summary: Fixes #17489. Pull Request resolved: https://github.com/pytorch/pytorch/pull/17494 Differential Revision: D14226525 Pulled By: ezyang fbshipit-source-id: 3dfef9bc6f443d647e9f05a54bc17c5717033723 --- diff --git a/torch/csrc/api/include/torch/data/samplers/distributed.h b/torch/csrc/api/include/torch/data/samplers/distributed.h index ff2ade0..2289915 100644 --- a/torch/csrc/api/include/torch/data/samplers/distributed.h +++ b/torch/csrc/api/include/torch/data/samplers/distributed.h @@ -38,11 +38,11 @@ class DistributedSampler : public Sampler { /// Set the epoch for the current enumeration. This can be used to alter the /// sample selection and shuffling behavior. - TORCH_API void set_epoch(size_t epoch) { + void set_epoch(size_t epoch) { epoch_ = epoch; } - TORCH_API size_t epoch() const { + size_t epoch() const { return epoch_; }