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

[CLI] Add TI_ADVANCED_OPTIMIZATION config env var #1212

Merged
merged 1 commit into from
Jun 12, 2020

Conversation

archibate
Copy link
Collaborator

Related issue = #... (if any)


Btw. is that possible to move advanced_optimization to CompilerConfig?

Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Originally the flag was introduced as an ad-hoc solution to long compilation time, but now it seems that we have to live with it for long... Yes, in the future we should make it part of CompileConfig. Maybe we should change the name to allow_expensive_optimizations?

@archibate
Copy link
Collaborator Author

IMO the current name is good enough :)
@xumingkuan seems the obstacle of moving advanced_optimization to CompilerConfig is that we don't pass a CompilerConfig var to all transforms/passes? I understand the difficulty, but I think ultimately we should make all transfroms a class method of Compiler, who has a member variable of CompilerConfig?

@codecov
Copy link

codecov bot commented Jun 10, 2020

Codecov Report

Merging #1212 into master will decrease coverage by 0.02%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1212      +/-   ##
==========================================
- Coverage   67.10%   67.08%   -0.03%     
==========================================
  Files          35       35              
  Lines        4831     4834       +3     
  Branches      885      886       +1     
==========================================
+ Hits         3242     3243       +1     
- Misses       1414     1415       +1     
- Partials      175      176       +1     
Impacted Files Coverage Δ
python/taichi/lang/__init__.py 71.81% <33.33%> (-0.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bec9bdb...3875fb7. Read the comment docs.

Copy link
Contributor

@xumingkuan xumingkuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@xumingkuan
Copy link
Contributor

IMO the current name is good enough :)
@xumingkuan seems the obstacle of moving advanced_optimization to CompilerConfig is that we don't pass a CompilerConfig var to all transforms/passes? I understand the difficulty, but I think ultimately we should make all transfroms a class method of Compiler, who has a member variable of CompilerConfig?

Please checkout #988 and https://github.com/taichi-dev/taichi/pull/1058/files#diff-60ee40c377644d6a6a4ff0cedad49110R182: we can obtain the CompileConfig in all passes by root->get_kernel()->program.config now.

@archibate
Copy link
Collaborator Author

IMO the current name is good enough :)
@xumingkuan seems the obstacle of moving advanced_optimization to CompilerConfig is that we don't pass a CompilerConfig var to all transforms/passes? I understand the difficulty, but I think ultimately we should make all transfroms a class method of Compiler, who has a member variable of CompilerConfig?

Please checkout #988 and https://github.com/taichi-dev/taichi/pull/1058/files#diff-60ee40c377644d6a6a4ff0cedad49110R182: we can obtain the CompileConfig in all passes by root->get_kernel()->program.config now.

So, should I refactor all advanced_optimization to root->get_kernel()->program.config.advanced_optimization in this PR?

@archibate archibate added the LGTM label Jun 11, 2020
@xumingkuan
Copy link
Contributor

IMO the current name is good enough :)
@xumingkuan seems the obstacle of moving advanced_optimization to CompilerConfig is that we don't pass a CompilerConfig var to all transforms/passes? I understand the difficulty, but I think ultimately we should make all transfroms a class method of Compiler, who has a member variable of CompilerConfig?

Please checkout #988 and https://github.com/taichi-dev/taichi/pull/1058/files#diff-60ee40c377644d6a6a4ff0cedad49110R182: we can obtain the CompileConfig in all passes by root->get_kernel()->program.config now.

So, should I refactor all advanced_optimization to root->get_kernel()->program.config.advanced_optimization in this PR?

I think that should be in another PR.

@archibate
Copy link
Collaborator Author

Great! Let's merge this then,

@archibate archibate merged commit ea30eec into taichi-dev:master Jun 12, 2020
@FantasyVR FantasyVR mentioned this pull request Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants