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 Python support for 3.12, and include legacy support #7

Open
4 of 14 tasks
khuck opened this issue Jun 10, 2024 · 0 comments
Open
4 of 14 tasks

Add Python support for 3.12, and include legacy support #7

khuck opened this issue Jun 10, 2024 · 0 comments

Comments

@khuck
Copy link
Collaborator

khuck commented Jun 10, 2024

Using this documentation: https://docs.python.org/3/library/sys.monitoring.html update the support in TAU for profiling Python code. Additional info: https://blog.jetbrains.com/pycharm/2024/01/new-low-impact-monitoring-api-in-python-3-12/.

Subtasks for this work:

  • Implement the 3.12+ API using sys.monitoring() to call the PerfStubs API
  • Implement the <3.12 API using sys.setprofile() to call the PerfStubsAPI
  • Replace this with PyEval_SetProfile in C for potentially lower overhead?
  • Optionally filter the Python internal function calls (any timers in files that are or in the python installation)
  • Optionally delay tracing timers until the _run_module_code timer is encountered. Use a bootstrap start/stop function until that point. Possibly need a custom stop timer event, so that we can shut down at that point. Otherwise, TAU could get an extra stop event for any events on the stack after _run_module_code exits.
  • Add selective measurement support using the same file format TAU expects
  • Add and test special support for Spark
  • Add and test special support for TensorFlow
  • Add and test special support for PyTorch (if any)
  • Confirm no support from TAU implementation has been lost (metadata support? error handling? backtrace collection at crash?)
  • Test with both TAU and APEX
  • Test with multiple threads - anything else needed? register thread?
  • Test with async/wait call from python (https://docs.python.org/3/library/asyncio-task.html)
  • ABI compatibility between Python versions? Is it even possible? LD_AUDIT/PRELOAD version switcher?

Completion of this issue will contribute to the completion of issue UO-OACISS/tau2#16 which contributes to project milestone https://github.com/orgs/UO-OACISS/projects/1.

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

No branches or pull requests

1 participant