You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Here's the usage example of 1-bit Quantized Arrays on the official website(https://docs.taichi-lang.org/docs/quant).
The quant arrays x and y should have been fields with 2 dims as shown in the official website, but actually it is 1 dim field.
importtaichiastiti.init(arch=ti.cpu)
u1=ti.types.quant.int(1, False)
N=512M=32x=ti.field(dtype=u1)
y=ti.field(dtype=u1)
ti.root.dense(ti.i, N//M).quant_array(ti.i, M, max_num_bits=M).place(x)
ti.root.dense(ti.i, N//M).quant_array(ti.i, M, max_num_bits=M).place(y)
@ti.kerneldefassign_vectorized():
ti.loop_config(bit_vectorize=True)
fori, jinx:
y[i, j] =x[i, j] # 32 bits are handled at a timeassign_vectorized()
Log/Screenshots
[Taichi] mode=release
[Taichi] version 1.6.0, llvm 15.0.1, commit f1c6fbb, win, python 3.11.4
taichi.lang.exception.TaichiCompilationError:
File "D:--.py", line --, in assign_vectorized:
for i, j in x:
^^^^^^^^^^^^^^
Traceback (most recent call last):
File "C:\Users--\AppData\Roaming\Python\Python311\site-packages\taichi\lang\ast\ast_transformer_utils.py", line 27, in call
return method(ctx, node)
^^^^^^^^^^^^^^^^^
File "C:\Users--\AppData\Roaming\Python\Python311\site-packages\taichi\lang\ast\ast_transformer.py", line 1336, in build_For
return ASTTransformer.build_struct_for(ctx, node, is_grouped=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users--\AppData\Roaming\Python\Python311\site-packages\taichi\lang\ast\ast_transformer.py", line 1237, in build_struct_for
impl.begin_frontend_struct_for(ctx.ast_builder, expr_group, loop_var)
File "C:\Users--\AppData\Roaming\Python\Python311\site-packages\taichi\lang\impl.py", line 117, in begin_frontend_struct_for
raise IndexError(
IndexError: Number of struct-for indices does not match loop variable dimensionality (2 != 1). Maybe you wanted to use "for I in ti.grouped(x)" to group all indices into a single vector I?
The text was updated successfully, but these errors were encountered:
Describe the bug
The usage example of 1-bit Quantized Arrays on the official website(https://docs.taichi-lang.org/docs/quant) might be incorrect.
To Reproduce
Here's the usage example of 1-bit Quantized Arrays on the official website(https://docs.taichi-lang.org/docs/quant).
The quant arrays x and y should have been fields with 2 dims as shown in the official website, but actually it is 1 dim field.
Log/Screenshots
[Taichi] mode=release
[Taichi] version 1.6.0, llvm 15.0.1, commit f1c6fbb, win, python 3.11.4
taichi.lang.exception.TaichiCompilationError:
File "D:--.py", line --, in assign_vectorized:
for i, j in x:
^^^^^^^^^^^^^^
Traceback (most recent call last):
File "C:\Users--\AppData\Roaming\Python\Python311\site-packages\taichi\lang\ast\ast_transformer_utils.py", line 27, in call
return method(ctx, node)
^^^^^^^^^^^^^^^^^
File "C:\Users--\AppData\Roaming\Python\Python311\site-packages\taichi\lang\ast\ast_transformer.py", line 1336, in build_For
return ASTTransformer.build_struct_for(ctx, node, is_grouped=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users--\AppData\Roaming\Python\Python311\site-packages\taichi\lang\ast\ast_transformer.py", line 1237, in build_struct_for
impl.begin_frontend_struct_for(ctx.ast_builder, expr_group, loop_var)
File "C:\Users--\AppData\Roaming\Python\Python311\site-packages\taichi\lang\impl.py", line 117, in begin_frontend_struct_for
raise IndexError(
IndexError: Number of struct-for indices does not match loop variable dimensionality (2 != 1). Maybe you wanted to use "for I in ti.grouped(x)" to group all indices into a single vector I?
The text was updated successfully, but these errors were encountered: