krrishnarraj / clpeak

A tool which profiles OpenCL devices to find their peak capacities
Apache License 2.0
396 stars 111 forks source link

`half` should not be passed as kernel argument #29

Closed Oblomov closed 7 years ago

Oblomov commented 7 years ago

The compute kernels testing half-precision performance pass a half value as kernel argument, even though this is forbidden by the specification (see the relevant bullet point here.

A possible solution would be to pass the extra argument as an int and then cast as appropriate.

(Most platforms seem to accept it, but beignet follows the spec more closely.)

krrishnarraj commented 7 years ago

@Oblomov tried fixing this in 2fb43e4, but I am getting a runtime error/coredump

Platform: Intel Gen OCL Driver drm_intel_gem_bo_context_exec() failed: Device or resource busy Beignet: "Exec event 0x556754c88fa0 error, type is 4592, error status is -5" Device: Intel(R) HD Graphics Haswell GT2 Mobile Driver version : 1.4 (Linux x64) Compute units : 20 Clock frequency : 1000 MHz ASSERTION FAILED: Not supported at file ... beignet/backend/src/backend/gen_insn_selection.cpp, function uint32_t gbe::getByteScatterGatherSize(gbe::Selection::Opaque&, gbe::ir::Type), line 4050 Trace/breakpoint trap (core dumped)

Can you check this commit in devel branch?

Oblomov commented 7 years ago

I get the same error. The commit seems correct to me, so there is the possibility that this is an issue in Beignet itself. I'll try to have a look at it (I'm somewhat busy right now, so this might take some time).