[GPU] Updated GPU cache size retrieval and refined closest_pow_of_2 #28059
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details:
Existing method for cache size calculation was static and need continious updates to the sku table which was already being missed for latest skus e.g DG2.
This update introduces a new member variable, max_global_cache_size, to store the GPU's global cache size, obtained via the OpenCL property CL_DEVICE_GLOBAL_MEM_CACHE_SIZE. The existing hard coded cache calculations are removed. Additionally, the closest_pow_of_2 function has been enhanced to return the nearest power of 2, favoring the upper value if the input is within 30% of the range for the upper bound. These changes improve memory management and ensure better utilization of GPU resources towards bottle neck situations.
Tickets:
CVS-159076