clspv icon indicating copy to clipboard operation
clspv copied to clipboard

UNREACHABLE executed at lib/SPIRVProducerPass.cpp:2399

Open zwang20 opened this issue 2 years ago • 4 comments

Compiling the attached source with the following command line

unzip a.zip
clspv -cl-mad-enable -DDEVICE_INFO=32 -D__SIZEOF_HOST_SIZE_T__=8 -DDEV_VER_MAJOR=3 -DDEV_VER_MINOR=0 -D_OPENCL_COMPILER -DHASH_LOOPS=791 -DBLOBLEN=8192 -DPLAINTEXT_LENGTH=55 -cl-single-precision-constant -cl-kernel-arg-info -rounding-mode-rte=16,32,64 -rewrite-packed-structs -std430-ubo-layout -decorate-nonuniform -arch=spir --use-native-builtins=acos,acosh,acospi,asin,asinh,asinpi,atan,atan2,atan2pi,atanh,atanpi,ceil,copysign,fabs,fdim,floor,fma,fmax,fmin,frexp,half_rsqrt,half_sqrt,isequal,isfinite,isgreater,isgreaterequal,isinf,isless,islessequal,islessgreater,isnan,isnormal,isnotequal,isordered,isunordered,ldexp,mad,rint,round,rsqrt,signbit,sqrt,tanh,trunc, -spv-version=1.6 -max-pushconstant-size=256 -max-ubo-size=65536 -global-offset -long-vector -module-constants-in-storage-buffer -cl-arm-non-uniform-work-group-size -enable-printf -printf-buffer-size=1048576 -x ir a.bc

results in the following output

Variable not found
UNREACHABLE executed at /path/to/clvk/external/clspv/lib/SPIRVProducerPass.cpp:2399!

a.zip

zwang20 avatar Sep 06 '23 03:09 zwang20

clspv does not really support kernels calling other kernels. In many cases it works because the called kernel got inlined at some point.

A quick work-around would be to compile with --inline-entry-points.

A good fix would be to have a wrapper for each kernel so that we always have a version with the spirv interface and one callable one.

rjodinchr avatar Sep 13 '23 15:09 rjodinchr

@Rekt3421 Can you take care of it?

rjodinchr avatar Sep 13 '23 15:09 rjodinchr

Yes happily, thanks!

Rekt3421 avatar Sep 13 '23 16:09 Rekt3421

Assigning back to Romaric

Rekt3421 avatar Oct 05 '23 17:10 Rekt3421

working with physical addressing

rjodinchr avatar Mar 09 '24 10:03 rjodinchr