diff --git a/tensorflow/stream_executor/rocm/rocm_gpu_executor.cc b/tensorflow/stream_executor/rocm/rocm_gpu_executor.cc index 2a85cb820ed..dbab0304d82 100644 --- a/tensorflow/stream_executor/rocm/rocm_gpu_executor.cc +++ b/tensorflow/stream_executor/rocm/rocm_gpu_executor.cc @@ -856,6 +856,11 @@ GpuExecutor::CreateDeviceDescription(int device_ordinal) { float clock_rate_ghz = static_cast<float>(prop.clockRate) / 1e6; builder.set_clock_rate_ghz(clock_rate_ghz); + + // mem_bandwidth = 2 * mem_bus_width_in_bytes * mem_clock_rate_in_hz + int64 memory_bandwidth = 2 * (int64(prop.memoryBusWidth) / 8) * + (int64(prop.memoryClockRate) * 1000); + builder.set_memory_bandwidth(memory_bandwidth); } {