linnaea / beignet

Beignet is an open source implementation of the OpenCL specification - a generic compute oriented API. Here is Beignet Source Code Mirror in github- This is a publish-only repository and all pull requests are ignored. Please follow https://wiki.freedesktop.org/www/Software/Beignet/ for any of your improvements
GNU Lesser General Public License v2.1
4 stars 1 forks source link

IF/ENDIF fix does not work on large nested if/endif block #4

Open linnaea opened 4 years ago

linnaea commented 4 years ago

Current IF/ENDIF fix only handles the innermost block, this will still trigger the IF/ENDIF out of range error if the block is enclosed in another IF/ENDIF block.

https://github.com/linnaea/beignet/blob/6553d2c6b449c96f33f79cbc5664859e39f337ba/backend/src/backend/gen_insn_selection.cpp#L2696-L2708

This might be the cause of some assertions on hashcat.

Removing the assertion on gen_program.cpp as a workaround.

linnaea commented 4 years ago

One possible solution would be to move the code in the large block somewhere else and insert a pair of JMPI instructions.

Might need to rebuild ir::Function.

ryoqun commented 4 years ago

Oh, cool is this worked on at this fork? I've experienced this error when trying https://github.com/solana-labs/solana-perf-libs/pull/58 on my macbook, which has a bit old integrated OpenCL intel chip. :)

linnaea commented 4 years ago

Oh, cool is this worked on at this fork? I've experienced this error when trying solana-labs/solana-perf-libs#58 on my macbook, which has a bit old integrated OpenCL intel chip. :)

Intel's iGPUs are slow and inefficient beyond belief when the workload is cryptography related, a Pentium E5400 can outperform 2 Haswell GT3, plus the iGPU's power draw counts towards the package power limit of the CPU and may cause the CPU to throttle, so overall you might be able to get better performance running CPU-only.

ryoqun commented 4 years ago

@linnaea Thanks for really quick reply! Yeah, I wasn't expecting some great number... But hearing that makes me more certain for the sad fact... Maybe I should just be satisfied that I just can build and barely run the OpenCL thingy on my environment, targeting both nvidia and intel.