Skip to content

Commit edf9e1b

Browse files
authored
am: move out soc21 to a sep module (tinygrad#9551)
* am: soc module is not part of am * am: soc module is not part of am
1 parent 74d98ea commit edf9e1b

File tree

4 files changed

+39229
-39201
lines changed

4 files changed

+39229
-39201
lines changed

autogen_stubs.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,21 @@ generate_am() {
297297
extra/amdpci/headers/amdgpu_vm.h \
298298
extra/amdpci/headers/discovery.h \
299299
extra/amdpci/headers/amdgpu_ucode.h \
300-
extra/amdpci/headers/soc21_enum.h \
301300
extra/amdpci/headers/psp_gfx_if.h \
302301
extra/amdpci/headers/amdgpu_psp.h \
303302
extra/amdpci/headers/amdgpu_irq.h \
304303
extra/amdpci/headers/amdgpu_doorbell.h \
305304
extra/amdpci/headers/soc15_ih_clientid.h \
305+
--clang-args="-include stdint.h" \
306306
-o $BASE/am/am.py
307307
fixup $BASE/am/am.py
308+
sed -i "s\(int64_t)\ \g" $BASE/am/am.py
309+
sed -i "s\AMDGPU_PTE_MTYPE_VG10(2)\AMDGPU_PTE_MTYPE_VG10(0, 2)\g" $BASE/am/am.py # incorrect parsing (TODO: remove when clang2py is gone).
310+
311+
clang2py -k cdefstum \
312+
extra/amdpci/headers/soc21_enum.h \
313+
-o $BASE/am/soc21.py
314+
fixup $BASE/am/soc21.py
308315

309316
clang2py -k cdefstum \
310317
extra/amdpci/headers/mp_13_0_0_offset.h \

0 commit comments

Comments
 (0)