Skip to content

Commit

Permalink
xe: jit: gemm: fix outerProduct count check
Browse files Browse the repository at this point in the history
Update types with autoTypeConversions before counting outer product ops.
  • Loading branch information
kealan-barbieri committed Feb 6, 2025
1 parent 368b6c4 commit 6e4794e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/gpu/intel/jit/gemm/generator/pieces/compute_utils.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2019-2024 Intel Corporation
* Copyright 2019-2025 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,11 +40,15 @@ struct SystolicParams {

static inline SystolicParams systolicParams(ngen::HW hw, const GEMMProblem &problem, const GEMMStrategy &strategy)
{
// Check opCount using correct compute types.
auto problem_ = problem;
problem_.autoTypeConversions(hw, strategy.systolicAvailable);

SystolicParams params;
params.opsPerChan = std::max(1, std::min(4 / problem.Ta.real(), 4 / problem.Tb.real()));
params.opsPerChan = std::max(1, std::min(4 / problem_.Ta.real(), 4 / problem_.Tb.real()));
params.sdepth = 8;
params.ksys = params.sdepth * params.opsPerChan;
params.osys = ngen::GRF::bytes(hw) / std::max(problem.Tc_compute().real().size(), 4);
params.osys = ngen::GRF::bytes(hw) / std::max(problem_.Tc_compute().real().size(), 4);
params.rcountMax = 8;

return params;
Expand Down

0 comments on commit 6e4794e

Please sign in to comment.