[calyx-py, Profiler] Updating calyx-py profiling #2607
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates both
calyx-pyand the profiler so that we can profile at the calyx-py level again. The changes in #2579 unfortunately brokecalyx-pyprofiling (which makes a strong case for having automated tests for end-to-end profiling across Calyx and ADLs 🙃 ). Specifically, this PR:gen-exp.py(discussed below; this was needed to updateexptests)gen-exp.pyIssueWhen running
exptests on my local machine, I found that no position tags were generated, even though on CI tests they were being generated. Looking into this problem further, I found thatPosTable.determine_source_loc()was returningNonebecausegen-exp.pywas being filtered out since it exists in the same directory aspy_ast.py(andbuilder.py).Because I still needed to update
exptests, I added a workaround where ifFILEINFO_BASE_PATHis the same as the calyx-py library path, then any file that is notpy_ast.pyandbuilder.pyqualifies as the source file path (diff here).I hope this isn't too hacky, but please let me know if it is!