Skip to content

Conversation

@ayakayorihiro
Copy link
Contributor

This PR updates both calyx-py and the profiler so that we can profile at the calyx-py level again. The changes in #2579 unfortunately broke calyx-py profiling (which makes a strong case for having automated tests for end-to-end profiling across Calyx and ADLs 🙃 ). Specifically, this PR:

  • [calyx-py] Adds position tags to comb groups and static groups
  • [calyx-py] Adds a workaround to position tags not being generated for gen-exp.py (discussed below; this was needed to update exp tests)
  • [profiler] Fixes the code around generating flame maps for Calyx-py

gen-exp.py Issue

When running exp tests 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 that PosTable.determine_source_loc() was returning None because gen-exp.py was being filtered out since it exists in the same directory as py_ast.py (and builder.py).

Because I still needed to update exp tests, I added a workaround where if FILEINFO_BASE_PATH is the same as the calyx-py library path, then any file that is not py_ast.py and builder.py qualifies as the source file path (diff here).

I hope this isn't too hacky, but please let me know if it is!

@ayakayorihiro ayakayorihiro self-assigned this Jan 7, 2026
@ayakayorihiro ayakayorihiro added C: calyx-py Items that have to do with the builder library C: calyx-profiler Profiling Calyx programs labels Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: calyx-profiler Profiling Calyx programs C: calyx-py Items that have to do with the builder library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants