[Autotuner] Initialize random input values for buffer checks. If values are initialized to 0 buffer checker will fail to detect backends with wrong results.

PiperOrigin-RevId: 847627821
This commit is contained in:
Dirk Hornung
2025-12-21 23:34:56 -08:00
committed by TensorFlower Gardener
parent 7b0d71c54e
commit b1d2538541

View File

@@ -80,10 +80,12 @@ AutotuneConfig GetAutotuneConfig(const DebugOptions& debug_options,
return autotune_config;
}
ProfileOptions GetProfileOptions(const DebugOptions& debug_options) {
ProfileOptions GetProfileOptions(const DebugOptions& debug_options,
const AutotuneConfig& autotune_config) {
ProfileOptions profile_options;
profile_options.redzone_padding_bytes =
debug_options.xla_gpu_redzone_padding_bytes();
profile_options.should_init_buffers = autotune_config.check_buffers;
return profile_options;
}
@@ -103,8 +105,9 @@ absl::StatusOr<std::unique_ptr<AutotunerPass>> AutotunerPass::Create(
GetAutotuneConfig(debug_options, is_deviceless, optimize_scratch_bytes);
if (!is_deviceless) {
profiler = GpuProfiler::Create(stream_executor,
GetProfileOptions(debug_options), allocator);
profiler = GpuProfiler::Create(
stream_executor, GetProfileOptions(debug_options, autotune_config),
allocator);
}
std::unique_ptr<AutotunerCacheInterface> cache =