Commit a5865f6
committed
rocr/clr: Add SDMA linear swap copy support
- Add SDMA_PKT_COPY_LINEAR_SWAP packet (SDMA_SUBOP_COPY_SWAP=9) with
30-bit count for gfx94X/gfx95X
- Add BlitSdma::BuildSwapCopyCommand and SubmitLinearSwapBody to build
and submit swap packets via the existing prologue/body/epilogue path
- Refactor DmaCopyFanOut into DmaCopyFanOutOp parameterised by
hsa_amd_memory_copy_op_type_t so copy and swap share the same
fan-out logic without code duplication
- Add GpuAgent::DmaCopySwap and wire HSA_AMD_MEMORY_COPY_OP_LINEAR_SWAP
in DmaCopyBatch (rejects num_entries==0; swap always uses list form)
- Check SwapSupported() early in DmaCopyFanOutOp before allocating
signals to avoid resource leaks on unsupported hardware
- CLR rocrCopyBufferBatch: group swap ops into multi-entry ops using
the same MultiArrays struct as linear multi, bypassing broadcast
grouping; set src_agent for validation routing; assert src_size ==
dst_size (asymmetric swap reserved for future use)
- Update hsa_ext_amd.cpp validation for multi-entry swap (num_entries,
src_list/dst_list/size_list, reserved0) and single-entry swap
- Rename num_dsts -> num_entries across the public API and all callers;
keep num_dsts as deprecated union alias for backward compatibility
- Update LINEAR_SWAP docs to describe both multi-entry and single-entry
forms
Made-with: Cursor1 parent 7beafab commit a5865f6
File tree
11 files changed
+348
-84
lines changed- projects
- clr
- hipamd/src
- rocclr/device
- rocm
- rocr-runtime/runtime/hsa-runtime
- core
- inc
- runtime
- inc
11 files changed
+348
-84
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2806 | 2806 | | |
2807 | 2807 | | |
2808 | 2808 | | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
2809 | 2817 | | |
2810 | 2818 | | |
2811 | 2819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
696 | | - | |
| 696 | + | |
| 697 | + | |
697 | 698 | | |
698 | 699 | | |
699 | 700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
789 | 799 | | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
790 | 809 | | |
791 | 810 | | |
792 | 811 | | |
| |||
800 | 819 | | |
801 | 820 | | |
802 | 821 | | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | 822 | | |
810 | 823 | | |
811 | 824 | | |
812 | 825 | | |
813 | 826 | | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
814 | 843 | | |
815 | 844 | | |
816 | 845 | | |
| |||
823 | 852 | | |
824 | 853 | | |
825 | 854 | | |
826 | | - | |
| 855 | + | |
827 | 856 | | |
828 | 857 | | |
829 | 858 | | |
| |||
848 | 877 | | |
849 | 878 | | |
850 | 879 | | |
851 | | - | |
| 880 | + | |
852 | 881 | | |
853 | 882 | | |
854 | 883 | | |
| |||
872 | 901 | | |
873 | 902 | | |
874 | 903 | | |
875 | | - | |
| 904 | + | |
876 | 905 | | |
877 | 906 | | |
878 | 907 | | |
879 | | - | |
| 908 | + | |
880 | 909 | | |
881 | 910 | | |
882 | 911 | | |
883 | | - | |
884 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
885 | 924 | | |
886 | 925 | | |
887 | 926 | | |
888 | | - | |
| 927 | + | |
889 | 928 | | |
890 | 929 | | |
891 | 930 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
210 | 222 | | |
211 | 223 | | |
212 | 224 | | |
| |||
261 | 273 | | |
262 | 274 | | |
263 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
264 | 279 | | |
265 | 280 | | |
266 | 281 | | |
| |||
334 | 349 | | |
335 | 350 | | |
336 | 351 | | |
| 352 | + | |
| 353 | + | |
337 | 354 | | |
338 | 355 | | |
339 | 356 | | |
| |||
392 | 409 | | |
393 | 410 | | |
394 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
395 | 415 | | |
396 | 416 | | |
397 | 417 | | |
| |||
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
751 | | - | |
| 751 | + | |
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
759 | | - | |
760 | | - | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
761 | 773 | | |
762 | 774 | | |
763 | 775 | | |
| |||
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
226 | 291 | | |
227 | 292 | | |
228 | 293 | | |
| |||
0 commit comments