You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removed MAX_DEVICE_MEMORY_SIZE_DIVISOR from get_device_info_max_mem_alloc_size() call so the test uses the actual reported max allocation size instead of a divided value.
This fixes an issue with devices with low memory as the test expects to allocate at least 128mb.
I think we talked about MAX_DEVICE_MEMORY_SIZE_DIVISOR during the teleconference a while ago. What I remember from it is that CL_DEVICE_MAX_MEM_ALLOC_SIZE is not the maximum size that one can allocate. It is the size above which you should not expect to be able to allocate. Failing to allocate CL_DEVICE_MAX_MEM_ALLOC_SIZE -1 is compliant with the OpenCL specification if I remember correctly.
Thus removing MAX_DEVICE_MEMORY_SIZE_DIVISOR does not seem a proper fix. Instead we could make sure that we report at least what OpenCL expects as its minimum?
Is there any reason for the requiredAllocSize of 128mb used by the test?
I think 128mb comes from CL_DEVICE_GLOBAL_MEM_SIZE for the full profile.
I agree that the current implementation of this test is weird (wrong?).
We should at least apply the same formula as we find in the specification:
Max size of memory object allocation in bytes. The
minimum value is max(min(1024 × 1024 × 1024, 1/4th of
CL_DEVICE_GLOBAL_MEM_SIZE), 32 × 1024 × 1024).
But for the real allocation (using clCreateBuffer) in the test, we should keep MAX_DEVICE_MEMORY_SIZE_DIVISOR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Removed
MAX_DEVICE_MEMORY_SIZE_DIVISORfromget_device_info_max_mem_alloc_size()call so the test uses the actual reported max allocation size instead of a divided value.This fixes an issue with devices with low memory as the test expects to allocate at least 128mb.