Revert "reverted diff: Add python stack tracing option on on-demand flow" (#82378)
Summary:
Changes:
add an option in Config; can use 'PYTHON_STACK_TRACE=true' option (via .conf)
deliver PYTHON_STACK_TRACE value to kineto_client_interface start()
abstract class also changed.
Trace after changes by running //kineto/libkineto/fb/integration_tests/trace_tester.cpp (requested by chaekit)
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree%2Ftraces%2Fdynocli%2F0%2F1657304871%2F127.0.0.1%2Flibkineto_activities_3502962.json.gz&bucket=gpu_traces
Test Plan:
launch a python test case with the following command for on-demand flow:
echo -e "PYTHON_STACK_TRACE=true" > /tmp/scott_kineto.conf && dyno gputrace --gputrace_duration 300ms --gpuconf /tmp/scott_kineto.conf
Reviewed By: chaekit
Differential Revision: D38220201
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82378
Approved by: https://github.com/chaekit