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

[ir] Fix ir_printer now that print() supports end #1350

Merged
merged 5 commits into from
Jul 4, 2020

Conversation

k-ye
Copy link
Member

@k-ye k-ye commented Jun 28, 2020

Now IR looks normal:

kernel {
  $0 = offloaded  
  body {
    <f32 x1> $1 = const [1.0]
    print "[", $1, ", ", $1, "]"
  }
}

Off-topic change: I switched Metal's print from std::cout to py_cout.

Related issue = #1329 (comment)

[Click here for the format server]


@k-ye k-ye requested a review from archibate June 28, 2020 07:35
@codecov
Copy link

codecov bot commented Jun 28, 2020

Codecov Report

Merging #1350 into master will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1350      +/-   ##
==========================================
+ Coverage   66.51%   66.55%   +0.03%     
==========================================
  Files          37       37              
  Lines        5188     5188              
  Branches      932      932              
==========================================
+ Hits         3451     3453       +2     
+ Misses       1575     1574       -1     
+ Partials      162      161       -1     
Impacted Files Coverage Δ
python/taichi/lang/expr.py 90.00% <100.00%> (-0.06%) ⬇️
python/taichi/lang/impl.py 90.12% <100.00%> (-0.16%) ⬇️
python/taichi/lang/snode.py 87.03% <100.00%> (ø)
python/taichi/misc/test.py 69.56% <100.00%> (+10.74%) ⬆️
python/taichi/lang/shell.py 44.06% <0.00%> (+3.38%) ⬆️

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 4e37b9a...c2674ab. Read the comment docs.

@k-ye
Copy link
Member Author

k-ye commented Jul 1, 2020

Now the IR looks like this:

[I 07/01/20 21:56:33.645] [compile_to_offloads.cpp:operator()@23] Simplified III:
kernel {
  $0 = offloaded  
  body {
    <i32 x1> $1 = const [42]
    print "hello ", $1, " world!\n"
    print "hello ", $1, " Tai"
    <i32 x1> $4 = const [233]
    print "chi ", $4, " world!\n"
    print "hello", $1, "world!\n"
    print "  "
    print "  aswd", $1, "qwer"
  }
}

@k-ye k-ye requested a review from archibate July 1, 2020 13:33
@k-ye k-ye requested a review from archibate July 4, 2020 02:47
Copy link
Collaborator

@archibate archibate left a comment

Choose a reason for hiding this comment

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

LGTM now.

@archibate archibate merged commit 564ee30 into taichi-dev:master Jul 4, 2020
@FantasyVR FantasyVR mentioned this pull request Jul 4, 2020
@k-ye k-ye deleted the print branch July 9, 2020 12:23
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.

2 participants