[inductor] Guard a member variable with a define. (#146278)

It's unused otherwise, and when running MPS tests, I get a bunch of warnings of this kind:

/Users/davidino/pytorch/pytorch/torch/include/torch/csrc/inductor/aoti_runtime/model_container.h:412:10: warning: private field 'blob_size_' is not used [-Wunused-private-field]
  412 |   size_t blob_size_;
      |          ^
1 warning generated.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/146278
Approved by: https://github.com/Skylion007, https://github.com/jansel
This commit is contained in:
Davide Italiano 2025-02-03 02:20:07 +00:00 committed by PyTorch MergeBot
parent c0ec2e0a0d
commit d80eef7c6d

View file

@ -409,7 +409,9 @@ class AOTInductorModelContainer {
RAIIDataPtr constant_blob_;
RAIIDataPtr constant_blob_secondary_;
#if defined(USE_CUDA) || defined(USE_XPU)
size_t blob_size_;
#endif
std::vector<size_t> constants_internal_offset_;
// Determine which constants is being used for the model.