Commit 751273f
Run constructor Run wait and run start hook for temporal sharing usecase (Xilinx#9721)
* Add run_constructor XDP hook in xrt::run for per-run plugin callbacks
Call xrt_core::xdp::run_constructor from the xrt::run constructor,
passing the run pointer and hw_context_impl pointer. The hook
dispatches to aie::profile::run_constructor via dlsym-registered
callback (aieProfileRunConstructor), gated on get_aie_profile().
This enables XDP plugins to attach per-run resources at run
construction time.
Made-with: Cursor
* Pass run UID through run_constructor hook for CT filename
Thread the run_impl::get_uid() value as a uint32_t through the
entire hook chain so the per-run CT file is named with the actual
run UID (e.g. aie_profile_ctx_1_run_3.ct), matching the dtrace
dump naming convention (dtrace_dump_ctx_1_run_3_<timestamp>.py).
Made-with: Cursor
* Thread kernel_name and elf_handle through run_constructor XDP hook
Pass kernel name and ELF handle (from xrt::module) through the
run_constructor callback chain so the AIE profile plugin can extract
SAVE_TIMESTAMP locations directly from the ELF at run construction time.
Made-with: Cursor
* XRT: Wire AIE dtrace config and load xdp_aie_dtrace_plugin_xdna
Expose Debug.aie_dtrace and AIE_dtrace_settings (interval, tile- and
graph-based interface tile metrics) in config_reader.h for xrt.ini.
Register the xdp_aie_dtrace_plugin_xdna module loader in profile.cpp
when the XDP VE2 build supplies that shared library.
Bump the src/runtime_src/xdp submodule to pick up the AIE dtrace plugin
and related XDP profile changes.
Made-with: Cursor
* Remove AIE_profile_settings.dtrace_debug config reader
Delete get_aie_profile_settings_dtrace_debug(); AIE dtrace uses
Debug.aie_dtrace only (xdp submodule).
Made-with: Cursor
* Wire AIE dtrace run start and run wait hooks from xrt::run
Add xrt_core::xdp::run_start and run_wait APIs and load aieDtraceRunStart /
aieDtraceRunWait from the dtrace plugin when aie_dtrace is enabled.
Call run_start before kernel submit from xrt::run::start, and run_wait after
xrt::run::wait / wait2 return. Use const_cast for wait paths because wait is
const.
Bump src/runtime_src/xdp submodule to include the plugin exports and hooks.
Made-with: Cursor
* xdp: aie_profile drops CT writer and bandwidth metrics
Bump src/runtime_src/xdp to include aie_profile cleanup (remove
AieProfileCTWriter, ddr/read/write_bandwidth handling, and generateCTForRun).
Made-with: Cursor
* xdp: bump submodule for aie_profile CT bandwidth metric cleanup
Points src/runtime_src/xdp at commit adding METRIC_* bandwidth constants,
isInterfaceTileBandwidthMetricSet(), and VE2 AieProfileCTWriter updates.
Made-with: Cursor
* Revert "xdp: bump submodule for aie_profile CT bandwidth metric cleanup"
This reverts commit befc23e.
* xdp: bump submodule (revert a0d7280 CT writer / bandwidth drop)
Made-with: Cursor
* xdp: route run_constructor to AIE dtrace only
Remove aie::profile run_constructor callback registration and the
get_aie_profile() branch in xrt_core::xdp::run_constructor. Per-run setup is
handled solely by the aie_dtrace plugin when enabled.
Submodule src/runtime_src/xdp: AIE profile VE2 CT writer removal and related
cleanup (see submodule commit).
Made-with: Cursor
* Update xdp submodule for aie_dtrace CT writer UC column handling
Points xdp at commit that derives UC spans from aiebu op_loc and extends
the last UC through the maximum configured counter column.
Made-with: Cursor
* Update latest xdp submodule
Signed-off-by: Garima Dhaked <[email protected]>
* xdp: Compile run hooks only for VE2 XDNA builds
Guard run_constructor, run_start, and run_wait hooks with
XDP_VE2_BUILD preprocessor conditional to exclude this code
from non-VE2 builds. These hooks are only needed for AIE dtrace
functionality on VE2 XDNA platforms.
Changes:
- Wrap aie::dtrace namespace in profile.cpp with #ifdef XDP_VE2_BUILD
- Wrap run hook functions in xrt_core::xdp namespace with same guard
- Add XDP_VE2_BUILD compile definition to core_common_api_library_objects
in CMakeLists.txt for VE2 builds
- Guard run hook calls in xrt_kernel.cpp (run constructor, start, wait)
- Update copyright year in profile.h
Made-with: Cursor
* Reverted the changed copyright comment in previous checkin
Signed-off-by: Garima Dhaked <[email protected]>
* xdp: refactor run hooks to use run_info struct with runtime aie_dtrace check
Replace compile-time XDP_VE2_BUILD guards with runtime aie_dtrace config check
for run_constructor, run_start, and run_wait hooks. Introduce run_info struct
to encapsulate hook arguments and add make_run_info helper for cleaner call sites.
Made-with: Cursor
* Reverted the changed copyright comment in previous checkin
Signed-off-by: Garima Dhaked <[email protected]>
* xdp: refactor run hooks to use run_info struct with runtime aie_dtrace check
Replace compile-time XDP_VE2_BUILD guards with runtime aie_dtrace config check
for run_constructor, run_start, and run_wait hooks. Introduce run_info struct
to encapsulate hook arguments and add make_run_info helper in profile.h for
cleaner call sites.
Remove XDP_VE2_BUILD compile definition from CMakeLists.txt since hooks are
now controlled at runtime via aie_dtrace config.
Made-with: Cursor
* DCO Remediation Commit for Garima Dhaked and Jyotheeswar Ganne
I, Garima Dhaked <[email protected]>, hereby add my Signed-off-by to this
commit and all preceding commits in this pull request that were authored by me.
This remediation covers the following commits by Garima Dhaked:
6d09bc8 xdp: refactor run hooks to use run_info struct with runtime aie_dtrace check
ab6e2a7 xdp: refactor run hooks to use run_info struct with runtime aie_dtrace check
9129d2a xdp: Compile run hooks only for VE2 XDNA builds
4e88252 Update xdp submodule for aie_dtrace CT writer UC column handling
a2fa7ca xdp: route run_constructor to AIE dtrace only
1fcd5b3 xdp: bump submodule (revert a0d7280 CT writer / bandwidth drop)
339e681 Revert "xdp: bump submodule for aie_profile CT bandwidth metric cleanup"
befc23e xdp: bump submodule for aie_profile CT bandwidth metric cleanup
50b4d53 xdp: aie_profile drops CT writer and bandwidth metrics
02335bc Wire AIE dtrace run start and run wait hooks from xrt::run
5572676 Remove AIE_profile_settings.dtrace_debug config reader
9c455aa XRT: Wire AIE dtrace config and load xdp_aie_dtrace_plugin_xdna
Signed-off-by: Garima Dhaked <[email protected]>
I, Jyotheeswar Ganne <[email protected]>, hereby add my Signed-off-by to
this commit and all preceding commits in this pull request that were authored by me.
This remediation covers the following commits by Jyotheeswar Ganne:
21b8c68 Thread kernel_name and elf_handle through run_constructor XDP hook
ae60a20 Pass run UID through run_constructor hook for CT filename
b441e2b Add run_constructor XDP hook in xrt::run for per-run plugin callbacks
Signed-off-by: Jyotheeswar Ganne <[email protected]>
Made-with: Cursor
* xdp: simplify dtrace run hooks with direct xrt::run API
Refactor the dtrace run hooks to simplify call sites in xrt_kernel.cpp
by moving all run info extraction logic into profile.cpp.
Changes:
- Add run-level accessor functions to kernel_int.h (get_run_uid,
get_run_hwctx, get_run_kernel_name, get_run_module, get_run_state)
- Simplify run_constructor, run_start, and run_wait to take xrt::run
directly instead of run_info struct
- Remove run_info struct and make_run_info helper from profile.h
- Move config check and info extraction into profile.cpp
Call sites in xrt_kernel.cpp are now simplified to:
xrt_core::xdp::run_constructor(*this);
xrt_core::xdp::run_start(*this);
xrt_core::xdp::run_wait(*this);
Signed-off-by: Garima Dhaked <[email protected]>
Made-with: Cursor
* xdp: add implementation-level XDP profiling hooks
Move XDP profiling hooks for run_start and run_wait from the public
xrt::run API level to the internal run_impl implementation level.
This ensures these hooks are called regardless of whether the C++ API
or C API is used.
The run_constructor hook remains at the xrt::run API level because the
XDP plugin needs to call methods on the xrt::run object (specifically
set_dtrace_control_file).
Changes:
- Add xrt_kernel_data struct with ert_state field for run state
- Add implementation-level XDP hooks:
- run_start(const xrt_kernel_data&)
- run_wait(const xrt_kernel_data&)
- Add get_xdp_kernel_data() helper to run_impl class
- Call run_start and run_wait hooks from run_impl methods
- Keep run_constructor at xrt::run level (requires xrt::run object)
- Remove unused run_wait(const xrt::run&) overload and get_run_state()
This enables XDP profiling for run_start and run_wait when using the
C API (xrtRunStart, xrtRunWait) which calls run_impl methods directly.
Signed-off-by: Garima Dhaked <[email protected]>
Made-with: Cursor
* xrt: refactor XDP run hooks to use run_impl handles
Refactor XDP profiling hooks to operate at the handle level (run_impl*)
rather than requiring xrt::run objects. This provides consistency with
how other XDP hooks work in the codebase.
* updated xdp submodule to 4f426595bb2f38e8a3ea1df10744eccd0559597d commit
Signed-off-by: Garima Dhaked <[email protected]>
* xrt: simplify XDP run hooks to accept run_impl pointer directly
Refactor the XDP profiling hooks (run_constructor, run_start, run_wait)
to accept const xrt::run_impl* instead of xrt_kernel_data struct. This
simplifies the API and moves data extraction into the callback functions
themselves, avoiding unnecessary work when callbacks are not registered.
Changes:
- Update profile.h/cpp: Change hook signatures to take run_impl*
- Update kernel_int.h: Replace xrt::run overload with run_impl* version
- Update xrt_kernel.cpp: Simplify call sites to pass 'this' directly
- Add get_xdp_kernel_data(run_impl*) to extract kernel data internally
- Populate ert_state in xrt_kernel_data via run_impl->state()
The aie::dtrace namespace functions now check if callbacks are registered
before extracting kernel data, improving efficiency when profiling is
disabled.
Signed-off-by: Garima Dhaked <[email protected]>
Made-with: Cursor
* xrt: remove unused get_xdp_kernel_data() private method from run_impl
Remove the unused private get_xdp_kernel_data() member function from
run_impl class. This function is no longer needed since XDP profiling
hooks now use the exported xrt_core::kernel_int::get_xdp_kernel_data()
function that takes a run_impl pointer directly.
Signed-off-by: Garima Dhaked <[email protected]>
Made-with: Cursor
* xrt: remove unused header includes from kernel_int.h
Remove unnecessary header includes that are not used in kernel_int.h:
- xrt_module.h: not referenced in the header
- xrt_hw_context.h: already included transitively via xrt_kernel.h
- ert.h: not referenced in the header
Signed-off-by: Garima Dhaked <[email protected]>
Made-with: Cursor
* Removed trace points from set_dtace_control_file()
Signed-off-by: Garima Dhaked <[email protected]>
---------
Signed-off-by: Garima Dhaked <[email protected]>
Signed-off-by: Jyotheeswar Ganne <[email protected]>
Co-authored-by: Jyotheeswar Ganne <[email protected]>1 parent c157601 commit 751273f
7 files changed
Lines changed: 263 additions & 5 deletions
File tree
- src/runtime_src
- core/common
- api
- xdp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
99 | 115 | | |
100 | 116 | | |
101 | 117 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
2471 | 2472 | | |
2472 | 2473 | | |
2473 | 2474 | | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
2474 | 2478 | | |
2475 | 2479 | | |
2476 | 2480 | | |
| |||
2783 | 2787 | | |
2784 | 2788 | | |
2785 | 2789 | | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
2786 | 2793 | | |
2787 | 2794 | | |
2788 | 2795 | | |
| |||
2884 | 2891 | | |
2885 | 2892 | | |
2886 | 2893 | | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
2887 | 2897 | | |
2888 | 2898 | | |
2889 | 2899 | | |
| |||
2936 | 2946 | | |
2937 | 2947 | | |
2938 | 2948 | | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
2939 | 2952 | | |
2940 | 2953 | | |
2941 | 2954 | | |
| |||
4220 | 4233 | | |
4221 | 4234 | | |
4222 | 4235 | | |
4223 | | - | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
4224 | 4252 | | |
| 4253 | + | |
4225 | 4254 | | |
4226 | 4255 | | |
4227 | 4256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
177 | 184 | | |
178 | 185 | | |
179 | 186 | | |
| |||
965 | 972 | | |
966 | 973 | | |
967 | 974 | | |
968 | | - | |
969 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
970 | 993 | | |
971 | | - | |
| 994 | + | |
| 995 | + | |
972 | 996 | | |
973 | 997 | | |
974 | 998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
148 | 246 | | |
149 | 247 | | |
150 | 248 | | |
| |||
533 | 631 | | |
534 | 632 | | |
535 | 633 | | |
| 634 | + | |
536 | 635 | | |
537 | 636 | | |
538 | 637 | | |
| |||
662 | 761 | | |
663 | 762 | | |
664 | 763 | | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
665 | 778 | | |
666 | 779 | | |
667 | 780 | | |
| |||
730 | 843 | | |
731 | 844 | | |
732 | 845 | | |
| 846 | + | |
| 847 | + | |
733 | 848 | | |
734 | 849 | | |
735 | 850 | | |
| |||
751 | 866 | | |
752 | 867 | | |
753 | 868 | | |
| 869 | + | |
| 870 | + | |
754 | 871 | | |
755 | 872 | | |
756 | 873 | | |
| |||
771 | 888 | | |
772 | 889 | | |
773 | 890 | | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
774 | 918 | | |
0 commit comments