Migration to ORC JIT for llvmpipe to run on RISC-V

2023-03-01 Thread abel.berna...@gmail.com
Dear mesa developers,

I am trying to run mesa with llvmpipe on a RISC-V platform, without
success. This is needed in order to get some performance figures for the
RISC-V Graphics SIG.

By default llvmpipe is using MCJIT and crashes on
lp_build_create_jit_compiler_for_module because MCJit does not support
RISC-V.

Seems like MCJIT is deprecated and it is not going to accept new
architectures, so llvmpipe will never run on RISC-V unless ported to ORC
JIT. I see there is already a merge request for migrating llvmpipe from the
deprecated MCJIT to the new ORC JIT:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17801

My understanding is that the code is good for merging in a disabled state
(rather than enabled by default). However the merge is gated by the fact
that a meson build option is still missing.

Do the mesa developers need help with this? I could try to add the missing
option myself if that helps, as this task is critical for supporting basic
graphics on RISC-V. Let me know what RISC-V can do to help.

Regards.


Re: Benefits of cryptographic hash functions for uniquely identifing Vulkan shaders.

2023-07-03 Thread abel.berna...@gmail.com
Two cents, sorry if too obvious.

If you want to try to squeeze more performance here, it seems valid to try
to fallback to full comparison in case of collision. The algorithm will be
correct irrespective of your (bad luck) with hash collisions, and at worst,
with an insignificant probability, the time cost is O(n*n), but the typical
cost will remain close to always O(n).

That way you try cheaper hashing algorithms without worry.

Regards.



On Thu, 29 Jun 2023 at 13:35, Marek Olšák  wrote:

> If there is a hash collision, it will cause a GPU hang. A cryptographic
> hash function reduces that chance to practically zero.
>
> Marek
>
> On Thu, Jun 29, 2023, 07:04 mikolajlubiak1337 
> wrote:
>
>> Hi,
>> I have recently read Phoronix article[1] about you switching to BLAKE3
>> instead of SHA1.
>> If BLAKE3 is a cryptographic hash function wouldn't it be faster to use a
>> non cryptographic hash function or even a checksum function? Do you need
>> the benefits of cryptographic hash functions over other hash/checksum
>> functions for the purpose of uniquely identifing Vulkan shaders?
>>
>> [1]: https://www.phoronix.com/news/Mesa-BLAKE3-Shader-Hashing
>>
>> -- me
>>
>>