UNREACHABLE executed at lib/BitcastUtils.cpp:1272
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=105 -DITERATIONS=4095 -DMAX_OUTLEN=32 -DPLAINTEXT_LENGTH=64 -DV_WIDTH=1 -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
Unexpected node when traversing alloca users
UNREACHABLE executed at /path/to/clvk/external/clspv/lib/LowerPrivatePointerPHIPass.cpp:195!
#1210 does not completely fix this bug. Could you run the application generating this input with this fix (#1210) and also with the following env variables set:
CLVK_SPIRV_ARCH=spir64
CLVK_PHYSICAL_ADDRESSING=1
With env variables:
unzip env.zip
CLVK_SPIRV_ARCH=spir64 CLVK_PHYSICAL_ADDRESSING=1 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=105 -DITERATIONS=4095 -DMAX_OUTLEN=32 -DPLAINTEXT_LENGTH=64 -DV_WIDTH=1 -cl-single-precision-constant -cl-kernel-arg-info -rounding-mode-rte=16,32,64 -rewrite-packed-structs -std430-ubo-layout -decorate-nonuniform -arch=spir64 -physical-storage-buffers --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 env.bc
outputs
clspv: /path/to/clvk/external/clspv/third_party/llvm/llvm/include/llvm/IR/Instructions.h:2831: void llvm::PHINode::setIncomingValue(unsigned int, llvm::Value *): Assertion `getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!"' failed.
Without env variables:
unzip wo.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=105 -DITERATIONS=4095 -DMAX_OUTLEN=32 -DPLAINTEXT_LENGTH=64 -DV_WIDTH=1 -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 wo.bc
outputs
Missing inferred type
UNREACHABLE executed at /path/to/clvk/external/clspv/lib/SPIRVProducerPass.cpp:1647!
thanks, I'll look at that later this week.
with #1214, both versions (default one, and the physical-addressing one) are now failing on the same thing:
We have a ptr type to translate in SPIRVProducerPass. I think this is coming from a potential pointer type in a struct from the source code.
@alan-baker, is clspv expected to support lowering ptr types in spirv-producer?
working with physical addressing