Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lang] Enable definition of local matrices/vectors #5782

Merged
merged 46 commits into from
Aug 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4ce08c8
cherrypick Matrix repr support
AD1024 Aug 15, 2022
549a359
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 15, 2022
07a4dc1
matrix assign
AD1024 Aug 15, 2022
d2264f4
Merge branch 'matrix-repr' of github.com:AD1024/taichi into matrix-repr
AD1024 Aug 15, 2022
efca3f0
move checks to caller side
AD1024 Aug 15, 2022
82c9413
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 15, 2022
38ec750
use ==
AD1024 Aug 15, 2022
13159fd
merge and format
AD1024 Aug 15, 2022
9c91103
refine impl
AD1024 Aug 17, 2022
28f3e0a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 17, 2022
bf719a3
no long in use
AD1024 Aug 17, 2022
72e8f26
Merge branch 'matrix-repr' of github.com:AD1024/taichi into matrix-repr
AD1024 Aug 17, 2022
65199ea
add some comments
AD1024 Aug 17, 2022
cbf1ea8
get rid of always-true condition
AD1024 Aug 23, 2022
4c8d6b7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 23, 2022
1a9df8c
save
AD1024 Aug 23, 2022
834699e
some fixes for print and matrix expr
AD1024 Aug 23, 2022
23d7bf7
fix codegen alloca size
AD1024 Aug 23, 2022
6a8a8cb
unsupport empty matrix
AD1024 Aug 24, 2022
08926ef
only check and cast elements
AD1024 Aug 24, 2022
1ae02aa
fmt Vectors to one line
AD1024 Aug 24, 2022
17412e8
lift duplicate part
AD1024 Aug 24, 2022
5421fe1
clean-up
AD1024 Aug 24, 2022
b9fd3a9
clean-up cse code
AD1024 Aug 24, 2022
43a456a
breaks ci; keep as original impl
AD1024 Aug 24, 2022
78ad14a
handle alloca
AD1024 Aug 24, 2022
40825f4
move checks to front
AD1024 Aug 24, 2022
88d01b6
Merge branch 'master' into matrix-repr
AD1024 Aug 24, 2022
f395d2a
reuse code
AD1024 Aug 24, 2022
2a6a8e6
Revert "clean-up cse code"
AD1024 Aug 24, 2022
7f8ca37
clean up together
AD1024 Aug 24, 2022
988abb3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 24, 2022
93b3a03
also checks for tlctx
AD1024 Aug 24, 2022
13d2efd
Merge branch 'matrix-repr' of github.com:AD1024/taichi into matrix-repr
AD1024 Aug 24, 2022
b2e101a
format
AD1024 Aug 24, 2022
6fcf070
fix codegen: allocate pointer to vector
AD1024 Aug 24, 2022
f43d2a8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 24, 2022
c613318
check real matrix when allocating memory
AD1024 Aug 24, 2022
41b6641
Merge branch 'matrix-repr' of github.com:AD1024/taichi into matrix-repr
AD1024 Aug 24, 2022
9fc758d
format and fix tc for variable holding matrix expression
AD1024 Aug 24, 2022
f635b7c
refactor: change to `make_local_matrix` which returns only an Expr; p…
AD1024 Aug 25, 2022
f82dc25
get rid of duplicated check
AD1024 Aug 25, 2022
bd68c23
save changes
AD1024 Aug 25, 2022
5d00c98
format
AD1024 Aug 25, 2022
3451397
also rename cxx part
AD1024 Aug 25, 2022
5ed0e93
Apply suggestions from code review
strongoier Aug 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
get rid of always-true condition
Co-authored-by: Yi Xu <[email protected]>
AD1024 and strongoier authored Aug 23, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit cbf1ea84ec52f9c721e1b687e06068de1fdb2386
2 changes: 1 addition & 1 deletion python/taichi/lang/ast/ast_transformer.py
Original file line number Diff line number Diff line change
@@ -490,7 +490,7 @@ def build_Call(ctx, node):

if (isinstance(node.func, ast.Attribute) and
(func == Matrix or func == Vector)
) and impl.current_cfg().real_matrix and in_taichi_scope():
) and impl.current_cfg().real_matrix:
node.ptr = matrix.make_matrix(*args, **keywords)
return node.ptr