fix: Unify logic calculating threads per work group part 2

- use calculateNumThreadsPerThreadGroup instead of getThreadsPerWG to
have same flow and proper values of threads per work groups

Related-To: NEO-8087
Signed-off-by: Cencelewska, Katarzyna <katarzyna.cencelewska@intel.com>
This commit is contained in:
Cencelewska, Katarzyna
2023-06-29 15:51:43 +00:00
committed by Compute-Runtime-Automation
parent c294ef48ce
commit 1e8a53bd53
19 changed files with 90 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -12,7 +12,7 @@
#include <mutex>
namespace NEO {
class GfxCoreHelper;
class LocalIdsCache {
public:
struct LocalIdsCacheEntry {
@@ -30,13 +30,13 @@ class LocalIdsCache {
LocalIdsCache(size_t cacheSize, std::array<uint8_t, 3> wgDimOrder, uint8_t simdSize, uint8_t grfSize, bool usesOnlyImages = false);
~LocalIdsCache();
void setLocalIdsForGroup(const Vec3<uint16_t> &group, void *destination);
void setLocalIdsForGroup(const Vec3<uint16_t> &group, void *destination, const GfxCoreHelper &gfxCoreHelper);
size_t getLocalIdsSizeForGroup(const Vec3<uint16_t> &group) const;
size_t getLocalIdsSizePerThread() const;
protected:
void setLocalIdsForEntry(LocalIdsCacheEntry &entry, void *destination);
void commitNewEntry(LocalIdsCacheEntry &entry, const Vec3<uint16_t> &group);
void commitNewEntry(LocalIdsCacheEntry &entry, const Vec3<uint16_t> &group, const GfxCoreHelper &gfxCoreHelper);
std::unique_lock<std::mutex> lock();
StackVec<LocalIdsCacheEntry, 4> cache;