While compiling this code using the HLS backend for this hcl.select statement, will raise an error like:
heterocl.tvm._ffi.base.TVMError: [17:10:16] src/codegen/codegen_c.cc:49: unknown type of shift_left(int32(acc_mem[(uint32(i) + ((uint32(scalar0[0]) + uint32(((j*dst_factor_in[0]) + (i*dst_factor_out[0]))))*(uint32)16))]), (tvm_if_then_else((uint32(use_imm[0]) == (uint32)1), int32(int16(imm[0])), int32(acc_mem[(uint32(i) + ((uint32(scalar1[0]) + uint32(((j*src_factor_in[0]) + (i*src_factor_out[0]))))*(uint32)16))]))*-1))
However, if I replace hcl.select statement with a if else statement like this:
with hcl.elif_(alu_opcode.v == VTA_ALU_OPCODE_SHR):
with hcl.if_(src >= 0):
dst_tensor[x][y] = dst >> src
with hcl.else_():
dst_tensor[x][y] = dst << (-src)
Hi,
I am trying to generate HLS code for a Shift right op, here's the example:
While compiling this code using the HLS backend for this hcl.select statement, will raise an error like:
heterocl.tvm._ffi.base.TVMError: [17:10:16] src/codegen/codegen_c.cc:49: unknown type of shift_left(int32(acc_mem[(uint32(i) + ((uint32(scalar0[0]) + uint32(((j*dst_factor_in[0]) + (i*dst_factor_out[0]))))*(uint32)16))]), (tvm_if_then_else((uint32(use_imm[0]) == (uint32)1), int32(int16(imm[0])), int32(acc_mem[(uint32(i) + ((uint32(scalar1[0]) + uint32(((j*src_factor_in[0]) + (i*src_factor_out[0]))))*(uint32)16))]))*-1))
However, if I replace hcl.select statement with a if else statement like this:
This compilation will work.
Could you please fix this bug?