mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
Add UOps.VECTORIZE [run_process_replay] (#5289)
* Add UOps.VECTORIZE to core * Update vectorized cast tests * Addresses code review comments - Removes VECTORIZE from LLVMRenderer - Add line breaks to unduly long lines - Add noop CAST rule back - Update asserts and add render_vectorize in CSytleLanguage renderer * Add missing const folding rule for VECTORIZE Also adds corresponding test * Fixes test_const_vectorize_fold and add assert - Use sane types with VECTORIZE in test_const_vectorize_fold - Add assert that sanity checks the types for VECTORIZE * Rename test_cast_vectorized_fold Renames test_cast_vectorized_fold to test_noop_vectorize_fold because the test targets a very specific rule and there are other tests for VECTORIZE. * Revert unrelated changes --------- Co-authored-by: qazal <77887910+Qazalin@users.noreply.github.com> Co-authored-by: qazal <qazal.software@gmail.com>
This commit is contained in:
parent
2a7282c1e1
commit
77b2ce9fc9
7 changed files with 67 additions and 44 deletions
|
|
@ -100,7 +100,7 @@ class PythonProgram:
|
|||
del ul[i]
|
||||
i = loop_ends[i] + 1
|
||||
continue
|
||||
elif uop in (UOps.CAST, UOps.BITCAST):
|
||||
elif uop in (UOps.CAST, UOps.BITCAST, UOps.VECTORIZE):
|
||||
if dtype.count > 1: ul[i] = inp
|
||||
else:
|
||||
assert dtp[0].fmt and dtype.fmt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue