Skip to content

Commit

Permalink
Diable L2_cahce_size display on ROCm platforms
Browse files Browse the repository at this point in the history
This is not supported by clr and hsa and will return wrong results.

Signed-off-by: Tim Gu <[email protected]>
  • Loading branch information
tcgu-amd committed Jan 31, 2025
1 parent 6a28181 commit dbeff96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torch/csrc/cuda/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,9 @@ static void registerCudaDeviceProperties(PyObject* module) {
#ifndef FBCODE_CAFFE2
.def_readonly("uuid", &cudaDeviceProp::uuid)
#endif
#if !USE_ROCM
.def_readonly("L2_cache_size", &cudaDeviceProp::l2CacheSize)
#endif
.def("__repr__", [](const cudaDeviceProp& prop) {
std::ostringstream stream;
stream << "_CudaDeviceProperties(name='" << prop.name
Expand Down

0 comments on commit dbeff96

Please sign in to comment.