From 2804d10b05dde44a8d6daa7bc8d463b05f732c8b Mon Sep 17 00:00:00 2001 From: "Chereshnev, Eugene" Date: Wed, 18 Dec 2024 13:49:02 -0800 Subject: [PATCH] xe: conv: fix tuning support --- src/gpu/intel/jit/conv/config.cpp | 1 + src/gpu/intel/jit/conv/gen_convolution.cpp | 3 ++- src/gpu/intel/jit/conv/tiler.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gpu/intel/jit/conv/config.cpp b/src/gpu/intel/jit/conv/config.cpp index d326f6bd172..9c9f6afa3e8 100644 --- a/src/gpu/intel/jit/conv/config.cpp +++ b/src/gpu/intel/jit/conv/config.cpp @@ -1794,6 +1794,7 @@ status_t init_cfg(conv_config_t &cfg, const primitive_t *prim) { auto try_cfg = cfg; auto status = try_init_cfg(try_cfg); if (status == status::success) { + if (cfg.tiler().is_tuning_mode()) cfg.tiler().move_next(cfg); cfg = std::move(try_cfg); return status::success; } diff --git a/src/gpu/intel/jit/conv/gen_convolution.cpp b/src/gpu/intel/jit/conv/gen_convolution.cpp index 980fe95aa76..330276efa2b 100644 --- a/src/gpu/intel/jit/conv/gen_convolution.cpp +++ b/src/gpu/intel/jit/conv/gen_convolution.cpp @@ -183,7 +183,8 @@ class gen_convolution_t { } for (int try_iter = 0; try_iter < max_tries; try_iter++) { - if (try_iter != 0) tiler->move_next(cfg); + if (try_iter != 0 && !tiler->is_tuning_mode()) + tiler->move_next(cfg); try { cfg = data.pd_cfg; cfg.set_pd( diff --git a/src/gpu/intel/jit/conv/tiler.cpp b/src/gpu/intel/jit/conv/tiler.cpp index ceff6baa377..1305aac899d 100644 --- a/src/gpu/intel/jit/conv/tiler.cpp +++ b/src/gpu/intel/jit/conv/tiler.cpp @@ -1376,7 +1376,7 @@ class conv_tuner_t { if (tune_data_.reported_points() != created_configs_) return; if (created_configs_ < 8) return; - int beg = params_gen_.cur_index() + 1; + int beg = params_gen_.cur_index(); int end = params_gen_.configs(); if (beg == end) return;