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

Add debug_print(msg) util #510

Merged
merged 5 commits into from
Apr 16, 2024
Merged

Add debug_print(msg) util #510

merged 5 commits into from
Apr 16, 2024

Conversation

edg-l
Copy link
Member

@edg-l edg-l commented Apr 10, 2024

This allows us to put a print with the given string in any place we generate MLIR, the breakpoint marker we have right now always prints the same message so it can be confusing where it comes from if you use it multiple times.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.

Copy link

github-actions bot commented Apr 10, 2024

Benchmarking results

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 13.637 ± 0.052 13.519 13.687 31.14 ± 0.44
cairo-native (embedded AOT) 1.571 ± 0.019 1.553 1.617 3.59 ± 0.06
cairo-native (embedded JIT using LLVM's ORC Engine) 1.545 ± 0.023 1.524 1.591 3.53 ± 0.07
cairo-native (standalone AOT) 0.636 ± 0.001 0.634 0.638 1.45 ± 0.02
cairo-native (standalone AOT with -march=native) 0.438 ± 0.006 0.433 0.449 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 13.116 ± 0.068 12.984 13.219 1606.86 ± 19.67
cairo-native (embedded AOT) 1.098 ± 0.014 1.081 1.120 134.55 ± 2.28
cairo-native (embedded JIT using LLVM's ORC Engine) 1.099 ± 0.027 1.069 1.156 134.63 ± 3.63
cairo-native (standalone AOT) 0.008 ± 0.000 0.008 0.010 1.01 ± 0.02
cairo-native (standalone AOT with -march=native) 0.008 ± 0.000 0.008 0.009 1.00

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 1.877 ± 0.030 1.841 1.927 27.58 ± 0.45
cairo-native (embedded AOT) 1.204 ± 0.021 1.188 1.242 17.69 ± 0.31
cairo-native (embedded JIT using LLVM's ORC Engine) 1.440 ± 0.028 1.411 1.481 21.17 ± 0.41
cairo-native (standalone AOT) 0.112 ± 0.000 0.111 0.112 1.64 ± 0.00
cairo-native (standalone AOT with -march=native) 0.068 ± 0.000 0.068 0.069 1.00

igaray
igaray previously approved these changes Apr 10, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 1.75439% with 112 lines in your changes are missing coverage. Please review.

Project coverage is 89.95%. Comparing base (60ed062) to head (bf3c44f).

Files Patch % Lines
src/metadata/debug_utils.rs 1.75% 112 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #510      +/-   ##
==========================================
- Coverage   90.24%   89.95%   -0.30%     
==========================================
  Files         107      107              
  Lines       34398    34512     +114     
==========================================
+ Hits        31042    31044       +2     
- Misses       3356     3468     +112     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juanbono juanbono added this pull request to the merge queue Apr 16, 2024
Merged via the queue into main with commit db96ffc Apr 16, 2024
9 checks passed
@juanbono juanbono deleted the add_debug_print branch April 16, 2024 15:09
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.

4 participants