[PATCH i-g-t] tests/intel/xe_evict: Skip test if smem less than lmem
Matthew Auld
matthew.auld at intel.com
Wed Mar 13 16:54:15 UTC 2024
On 13/03/2024 09:47, Nayana, Venkata Ramana wrote:
>
>
>> -----Original Message-----
>> From: Brost, Matthew <matthew.brost at intel.com>
>> Sent: Wednesday, March 13, 2024 9:33 AM
>> To: Dandamudi, Priyanka <priyanka.dandamudi at intel.com>
>> Cc: Nayana, Venkata Ramana <venkata.ramana.nayana at intel.com>; igt-
>> dev at lists.freedesktop.org
>> Subject: Re: [PATCH i-g-t] tests/intel/xe_evict: Skip test if smem less than
>> lmem
>>
>> On Tue, Mar 12, 2024 at 12:45:02PM +0530, priyanka.dandamudi at intel.com
>> wrote:
>>> From: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
>>>
>>> Currently the tests are failing with OOO memory error.
>>> Added code to skip the test if the system memory size is less than
>>> local memory size.
>>>
>>> Cc: Matthew Brost <matthew.brost at intel.com>
>>> Cc: Venkata Ramana Nayana <venkata.ramana.nayana at intel.com>
>>> Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
>>> ---
>>> tests/intel/xe_evict.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/tests/intel/xe_evict.c b/tests/intel/xe_evict.c index
>>> 4de82c3bd..2dc3fe542 100644
>>> --- a/tests/intel/xe_evict.c
>>> +++ b/tests/intel/xe_evict.c
>>> @@ -753,6 +753,8 @@ igt_main
>>> igt_require(xe_has_vram(fd));
>>> vram_size = xe_visible_vram_size(fd, 0);
>>> igt_assert(vram_size);
>>
>> I'd add a comment here explaining why we are skipping.
>>
>> Test requires SRAM to about as big as VRAM. For example, small-cm creates
>> (448 / 2) BOs with a size (1 / 128) of the total VRAM size. For simplicity ensure
>> the SRAM size >= VRAM before running this test.
Don't we also need ram_mb() / 2? IIRC that is the actual size of the
system memory manager in ttm. Instead of using igt_get_avail_ram_mb()
maybe use we can use the xe region query interface which already
accounts for that?
>>
>> Matt
> Hi Matt,
>
> If expectation is always SRAM >= VRAM then in pre-silicon environment tests will always skip
> because on emulation LMEM size is 64GB and SMEM is 8GB, we can't get 64gb system memory
> machines. Can't we change the design? Means in the test can we limit LMEM to 4GB and do object's
> evict if >4gb? My intension instead of skip on presil environments, at least test eviction flows.
fwiw we did something like that in i915 where you can set the usable
VRAM size via a modparam, which we make use of in gem_lmem_swapping to
force the VRAM size to be ~4G (for similar reasons). Here we could do
maybe do something similar using the xe region size for system memory?
>
> Any suggestions Matt.
>
> Thanks,
> Venkat.
>>
>>> + igt_skip_on_f(igt_get_avail_ram_mb() < (vram_size >> 20),
>>> + "System memory is less than local memory \n");
>>>
>>> xe_for_each_engine(fd, hwe)
>>> if (hwe->engine_class !=
>> DRM_XE_ENGINE_CLASS_COPY)
>>> --
>>> 2.25.1
>>>
More information about the igt-dev
mailing list