tinygrad 0.9.1__py3-none-any.whl → 0.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tinygrad/__init__.py +11 -6
- tinygrad/codegen/kernel.py +308 -175
- tinygrad/codegen/linearize.py +95 -0
- tinygrad/codegen/lowerer.py +143 -0
- tinygrad/codegen/transcendental.py +257 -0
- tinygrad/codegen/uopgraph.py +506 -0
- tinygrad/device.py +72 -171
- tinygrad/dtype.py +122 -47
- tinygrad/engine/jit.py +184 -87
- tinygrad/{lazy.py → engine/lazy.py} +74 -66
- tinygrad/engine/memory.py +51 -0
- tinygrad/engine/realize.py +86 -61
- tinygrad/engine/schedule.py +366 -317
- tinygrad/engine/search.py +58 -47
- tinygrad/function.py +59 -58
- tinygrad/helpers.py +120 -102
- tinygrad/multi.py +82 -78
- tinygrad/nn/__init__.py +116 -67
- tinygrad/nn/datasets.py +12 -5
- tinygrad/nn/optim.py +1 -1
- tinygrad/nn/state.py +91 -6
- tinygrad/ops.py +1126 -143
- tinygrad/renderer/__init__.py +47 -23
- tinygrad/renderer/cstyle.py +338 -265
- tinygrad/renderer/llvmir.py +125 -143
- tinygrad/renderer/ptx.py +225 -0
- tinygrad/runtime/autogen/adreno.py +17904 -0
- tinygrad/runtime/autogen/amd_gpu.py +46974 -11993
- tinygrad/runtime/autogen/cuda.py +6 -162
- tinygrad/runtime/autogen/io_uring.py +97 -63
- tinygrad/runtime/autogen/kfd.py +60 -47
- tinygrad/runtime/autogen/kgsl.py +1386 -0
- tinygrad/runtime/autogen/libc.py +5462 -0
- tinygrad/runtime/autogen/nv_gpu.py +1976 -1957
- tinygrad/runtime/autogen/nvrtc.py +579 -0
- tinygrad/runtime/autogen/opencl.py +11 -11
- tinygrad/runtime/autogen/qcom_dsp.py +1739 -0
- tinygrad/runtime/graph/clang.py +3 -3
- tinygrad/runtime/graph/cuda.py +11 -15
- tinygrad/runtime/graph/hcq.py +120 -107
- tinygrad/runtime/graph/metal.py +71 -43
- tinygrad/runtime/ops_amd.py +244 -323
- tinygrad/runtime/ops_clang.py +12 -5
- tinygrad/runtime/ops_cloud.py +220 -0
- tinygrad/runtime/ops_cuda.py +42 -99
- tinygrad/runtime/ops_disk.py +25 -26
- tinygrad/runtime/ops_dsp.py +181 -0
- tinygrad/runtime/ops_gpu.py +29 -16
- tinygrad/runtime/ops_hip.py +68 -0
- tinygrad/runtime/ops_llvm.py +15 -10
- tinygrad/runtime/ops_metal.py +147 -64
- tinygrad/runtime/ops_nv.py +356 -397
- tinygrad/runtime/ops_python.py +78 -79
- tinygrad/runtime/ops_qcom.py +405 -0
- tinygrad/runtime/support/__init__.py +0 -0
- tinygrad/runtime/support/compiler_cuda.py +77 -0
- tinygrad/runtime/{driver/hip_comgr.py → support/compiler_hip.py} +13 -1
- tinygrad/runtime/support/elf.py +38 -0
- tinygrad/runtime/support/hcq.py +539 -0
- tinygrad/shape/shapetracker.py +40 -50
- tinygrad/shape/view.py +102 -63
- tinygrad/tensor.py +1109 -365
- {tinygrad-0.9.1.dist-info → tinygrad-0.10.0.dist-info}/METADATA +54 -50
- tinygrad-0.10.0.dist-info/RECORD +77 -0
- {tinygrad-0.9.1.dist-info → tinygrad-0.10.0.dist-info}/WHEEL +1 -1
- tinygrad/codegen/linearizer.py +0 -528
- tinygrad/codegen/uops.py +0 -451
- tinygrad/engine/graph.py +0 -100
- tinygrad/renderer/assembly.py +0 -269
- tinygrad/shape/symbolic.py +0 -327
- tinygrad-0.9.1.dist-info/RECORD +0 -63
- /tinygrad/{runtime/driver/__init__.py → py.typed} +0 -0
- {tinygrad-0.9.1.dist-info → tinygrad-0.10.0.dist-info}/LICENSE +0 -0
- {tinygrad-0.9.1.dist-info → tinygrad-0.10.0.dist-info}/top_level.txt +0 -0
tinygrad/runtime/autogen/kfd.py
CHANGED
@@ -9,6 +9,19 @@
|
|
9
9
|
import ctypes, os
|
10
10
|
|
11
11
|
|
12
|
+
|
13
|
+
import fcntl, functools
|
14
|
+
|
15
|
+
def _do_ioctl(__idir, __base, __nr, __user_struct, __fd, **kwargs):
|
16
|
+
ret = fcntl.ioctl(__fd, (__idir<<30) | (ctypes.sizeof(made := __user_struct(**kwargs))<<16) | (__base<<8) | __nr, made)
|
17
|
+
if ret != 0: raise RuntimeError(f"ioctl returned {ret}")
|
18
|
+
return made
|
19
|
+
|
20
|
+
def _IO(base, nr): return functools.partial(_do_ioctl, 0, ord(base) if isinstance(base, str) else base, nr, None)
|
21
|
+
def _IOW(base, nr, type): return functools.partial(_do_ioctl, 1, ord(base) if isinstance(base, str) else base, nr, type)
|
22
|
+
def _IOR(base, nr, type): return functools.partial(_do_ioctl, 2, ord(base) if isinstance(base, str) else base, nr, type)
|
23
|
+
def _IOWR(base, nr, type): return functools.partial(_do_ioctl, 3, ord(base) if isinstance(base, str) else base, nr, type)
|
24
|
+
|
12
25
|
class AsDictMixin:
|
13
26
|
@classmethod
|
14
27
|
def as_dict(cls, self):
|
@@ -167,8 +180,8 @@ KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE = (1<<28) # macro
|
|
167
180
|
KFD_IOC_ALLOC_MEM_FLAGS_AQL_QUEUE_MEM = (1<<27) # macro
|
168
181
|
KFD_IOC_ALLOC_MEM_FLAGS_COHERENT = (1<<26) # macro
|
169
182
|
KFD_IOC_ALLOC_MEM_FLAGS_UNCACHED = (1<<25) # macro
|
170
|
-
|
171
|
-
|
183
|
+
def KFD_SMI_EVENT_MASK_FROM_INDEX(i): # macro
|
184
|
+
return (1<<((i)-1))
|
172
185
|
KFD_IOCTL_SVM_FLAG_HOST_ACCESS = 0x00000001 # macro
|
173
186
|
KFD_IOCTL_SVM_FLAG_COHERENT = 0x00000002 # macro
|
174
187
|
KFD_IOCTL_SVM_FLAG_HIVE_LOCAL = 0x00000004 # macro
|
@@ -176,47 +189,14 @@ KFD_IOCTL_SVM_FLAG_GPU_RO = 0x00000008 # macro
|
|
176
189
|
KFD_IOCTL_SVM_FLAG_GPU_EXEC = 0x00000010 # macro
|
177
190
|
KFD_IOCTL_SVM_FLAG_GPU_READ_MOSTLY = 0x00000020 # macro
|
178
191
|
AMDKFD_IOCTL_BASE = 'K' # macro
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
# AMDKFD_IOC_GET_VERSION = _IOR('K',nr,type) ( 0x01 , struct kfd_ioctl_get_version_args ) # macro
|
188
|
-
# AMDKFD_IOC_CREATE_QUEUE = _IOWR('K',nr,type) ( 0x02 , struct kfd_ioctl_create_queue_args ) # macro
|
189
|
-
# AMDKFD_IOC_DESTROY_QUEUE = _IOWR('K',nr,type) ( 0x03 , struct kfd_ioctl_destroy_queue_args ) # macro
|
190
|
-
# AMDKFD_IOC_SET_MEMORY_POLICY = _IOW('K',nr,type) ( 0x04 , struct kfd_ioctl_set_memory_policy_args ) # macro
|
191
|
-
# AMDKFD_IOC_GET_CLOCK_COUNTERS = _IOWR('K',nr,type) ( 0x05 , struct kfd_ioctl_get_clock_counters_args ) # macro
|
192
|
-
# AMDKFD_IOC_GET_PROCESS_APERTURES = _IOR('K',nr,type) ( 0x06 , struct kfd_ioctl_get_process_apertures_args ) # macro
|
193
|
-
# AMDKFD_IOC_UPDATE_QUEUE = _IOW('K',nr,type) ( 0x07 , struct kfd_ioctl_update_queue_args ) # macro
|
194
|
-
# AMDKFD_IOC_CREATE_EVENT = _IOWR('K',nr,type) ( 0x08 , struct kfd_ioctl_create_event_args ) # macro
|
195
|
-
# AMDKFD_IOC_DESTROY_EVENT = _IOW('K',nr,type) ( 0x09 , struct kfd_ioctl_destroy_event_args ) # macro
|
196
|
-
# AMDKFD_IOC_SET_EVENT = _IOW('K',nr,type) ( 0x0A , struct kfd_ioctl_set_event_args ) # macro
|
197
|
-
# AMDKFD_IOC_RESET_EVENT = _IOW('K',nr,type) ( 0x0B , struct kfd_ioctl_reset_event_args ) # macro
|
198
|
-
# AMDKFD_IOC_WAIT_EVENTS = _IOWR('K',nr,type) ( 0x0C , struct kfd_ioctl_wait_events_args ) # macro
|
199
|
-
# AMDKFD_IOC_DBG_REGISTER = _IOW('K',nr,type) ( 0x0D , struct kfd_ioctl_dbg_register_args ) # macro
|
200
|
-
# AMDKFD_IOC_DBG_UNREGISTER = _IOW('K',nr,type) ( 0x0E , struct kfd_ioctl_dbg_unregister_args ) # macro
|
201
|
-
# AMDKFD_IOC_DBG_ADDRESS_WATCH = _IOW('K',nr,type) ( 0x0F , struct kfd_ioctl_dbg_address_watch_args ) # macro
|
202
|
-
# AMDKFD_IOC_DBG_WAVE_CONTROL = _IOW('K',nr,type) ( 0x10 , struct kfd_ioctl_dbg_wave_control_args ) # macro
|
203
|
-
# AMDKFD_IOC_SET_SCRATCH_BACKING_VA = _IOWR('K',nr,type) ( 0x11 , struct kfd_ioctl_set_scratch_backing_va_args ) # macro
|
204
|
-
# AMDKFD_IOC_GET_TILE_CONFIG = _IOWR('K',nr,type) ( 0x12 , struct kfd_ioctl_get_tile_config_args ) # macro
|
205
|
-
# AMDKFD_IOC_SET_TRAP_HANDLER = _IOW('K',nr,type) ( 0x13 , struct kfd_ioctl_set_trap_handler_args ) # macro
|
206
|
-
# AMDKFD_IOC_GET_PROCESS_APERTURES_NEW = _IOWR('K',nr,type) ( 0x14 , struct kfd_ioctl_get_process_apertures_new_args ) # macro
|
207
|
-
# AMDKFD_IOC_ACQUIRE_VM = _IOW('K',nr,type) ( 0x15 , struct kfd_ioctl_acquire_vm_args ) # macro
|
208
|
-
# AMDKFD_IOC_ALLOC_MEMORY_OF_GPU = _IOWR('K',nr,type) ( 0x16 , struct kfd_ioctl_alloc_memory_of_gpu_args ) # macro
|
209
|
-
# AMDKFD_IOC_FREE_MEMORY_OF_GPU = _IOW('K',nr,type) ( 0x17 , struct kfd_ioctl_free_memory_of_gpu_args ) # macro
|
210
|
-
# AMDKFD_IOC_MAP_MEMORY_TO_GPU = _IOWR('K',nr,type) ( 0x18 , struct kfd_ioctl_map_memory_to_gpu_args ) # macro
|
211
|
-
# AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU = _IOWR('K',nr,type) ( 0x19 , struct kfd_ioctl_unmap_memory_from_gpu_args ) # macro
|
212
|
-
# AMDKFD_IOC_SET_CU_MASK = _IOW('K',nr,type) ( 0x1A , struct kfd_ioctl_set_cu_mask_args ) # macro
|
213
|
-
# AMDKFD_IOC_GET_QUEUE_WAVE_STATE = _IOWR('K',nr,type) ( 0x1B , struct kfd_ioctl_get_queue_wave_state_args ) # macro
|
214
|
-
# AMDKFD_IOC_GET_DMABUF_INFO = _IOWR('K',nr,type) ( 0x1C , struct kfd_ioctl_get_dmabuf_info_args ) # macro
|
215
|
-
# AMDKFD_IOC_IMPORT_DMABUF = _IOWR('K',nr,type) ( 0x1D , struct kfd_ioctl_import_dmabuf_args ) # macro
|
216
|
-
# AMDKFD_IOC_ALLOC_QUEUE_GWS = _IOWR('K',nr,type) ( 0x1E , struct kfd_ioctl_alloc_queue_gws_args ) # macro
|
217
|
-
# AMDKFD_IOC_SMI_EVENTS = _IOWR('K',nr,type) ( 0x1F , struct kfd_ioctl_smi_events_args ) # macro
|
218
|
-
# AMDKFD_IOC_SVM = _IOWR('K',nr,type) ( 0x20 , struct kfd_ioctl_svm_args ) # macro
|
219
|
-
# AMDKFD_IOC_SET_XNACK_MODE = _IOWR('K',nr,type) ( 0x21 , struct kfd_ioctl_set_xnack_mode_args ) # macro
|
192
|
+
def AMDKFD_IO(nr): # macro
|
193
|
+
return _IO('K',nr)
|
194
|
+
def AMDKFD_IOR(nr, type): # macro
|
195
|
+
return _IOR('K',nr,type)
|
196
|
+
def AMDKFD_IOW(nr, type): # macro
|
197
|
+
return _IOW('K',nr,type)
|
198
|
+
def AMDKFD_IOWR(nr, type): # macro
|
199
|
+
return _IOWR('K',nr,type)
|
220
200
|
AMDKFD_COMMAND_START = 0x01 # macro
|
221
201
|
AMDKFD_COMMAND_END = 0x22 # macro
|
222
202
|
class struct_kfd_ioctl_get_version_args(Structure):
|
@@ -228,6 +208,7 @@ struct_kfd_ioctl_get_version_args._fields_ = [
|
|
228
208
|
('minor_version', ctypes.c_uint32),
|
229
209
|
]
|
230
210
|
|
211
|
+
AMDKFD_IOC_GET_VERSION = AMDKFD_IOR ( 0x01 , struct_kfd_ioctl_get_version_args ) # macro (from list)
|
231
212
|
class struct_kfd_ioctl_create_queue_args(Structure):
|
232
213
|
pass
|
233
214
|
|
@@ -250,6 +231,7 @@ struct_kfd_ioctl_create_queue_args._fields_ = [
|
|
250
231
|
('ctl_stack_size', ctypes.c_uint32),
|
251
232
|
]
|
252
233
|
|
234
|
+
AMDKFD_IOC_CREATE_QUEUE = AMDKFD_IOWR ( 0x02 , struct_kfd_ioctl_create_queue_args ) # macro (from list)
|
253
235
|
class struct_kfd_ioctl_destroy_queue_args(Structure):
|
254
236
|
pass
|
255
237
|
|
@@ -259,6 +241,7 @@ struct_kfd_ioctl_destroy_queue_args._fields_ = [
|
|
259
241
|
('pad', ctypes.c_uint32),
|
260
242
|
]
|
261
243
|
|
244
|
+
AMDKFD_IOC_DESTROY_QUEUE = AMDKFD_IOWR ( 0x03 , struct_kfd_ioctl_destroy_queue_args ) # macro (from list)
|
262
245
|
class struct_kfd_ioctl_update_queue_args(Structure):
|
263
246
|
pass
|
264
247
|
|
@@ -271,6 +254,7 @@ struct_kfd_ioctl_update_queue_args._fields_ = [
|
|
271
254
|
('queue_priority', ctypes.c_uint32),
|
272
255
|
]
|
273
256
|
|
257
|
+
AMDKFD_IOC_UPDATE_QUEUE = AMDKFD_IOW ( 0x07 , struct_kfd_ioctl_update_queue_args ) # macro (from list)
|
274
258
|
class struct_kfd_ioctl_set_cu_mask_args(Structure):
|
275
259
|
pass
|
276
260
|
|
@@ -281,6 +265,7 @@ struct_kfd_ioctl_set_cu_mask_args._fields_ = [
|
|
281
265
|
('cu_mask_ptr', ctypes.c_uint64),
|
282
266
|
]
|
283
267
|
|
268
|
+
AMDKFD_IOC_SET_CU_MASK = AMDKFD_IOW ( 0x1A , struct_kfd_ioctl_set_cu_mask_args ) # macro (from list)
|
284
269
|
class struct_kfd_ioctl_get_queue_wave_state_args(Structure):
|
285
270
|
pass
|
286
271
|
|
@@ -293,6 +278,7 @@ struct_kfd_ioctl_get_queue_wave_state_args._fields_ = [
|
|
293
278
|
('pad', ctypes.c_uint32),
|
294
279
|
]
|
295
280
|
|
281
|
+
AMDKFD_IOC_GET_QUEUE_WAVE_STATE = AMDKFD_IOWR ( 0x1B , struct_kfd_ioctl_get_queue_wave_state_args ) # macro (from list)
|
296
282
|
class struct_kfd_ioctl_set_memory_policy_args(Structure):
|
297
283
|
pass
|
298
284
|
|
@@ -306,6 +292,7 @@ struct_kfd_ioctl_set_memory_policy_args._fields_ = [
|
|
306
292
|
('pad', ctypes.c_uint32),
|
307
293
|
]
|
308
294
|
|
295
|
+
AMDKFD_IOC_SET_MEMORY_POLICY = AMDKFD_IOW ( 0x04 , struct_kfd_ioctl_set_memory_policy_args ) # macro (from list)
|
309
296
|
class struct_kfd_ioctl_get_clock_counters_args(Structure):
|
310
297
|
pass
|
311
298
|
|
@@ -319,6 +306,7 @@ struct_kfd_ioctl_get_clock_counters_args._fields_ = [
|
|
319
306
|
('pad', ctypes.c_uint32),
|
320
307
|
]
|
321
308
|
|
309
|
+
AMDKFD_IOC_GET_CLOCK_COUNTERS = AMDKFD_IOWR ( 0x05 , struct_kfd_ioctl_get_clock_counters_args ) # macro (from list)
|
322
310
|
class struct_kfd_process_device_apertures(Structure):
|
323
311
|
pass
|
324
312
|
|
@@ -344,6 +332,7 @@ struct_kfd_ioctl_get_process_apertures_args._fields_ = [
|
|
344
332
|
('pad', ctypes.c_uint32),
|
345
333
|
]
|
346
334
|
|
335
|
+
AMDKFD_IOC_GET_PROCESS_APERTURES = AMDKFD_IOR ( 0x06 , struct_kfd_ioctl_get_process_apertures_args ) # macro (from list)
|
347
336
|
class struct_kfd_ioctl_get_process_apertures_new_args(Structure):
|
348
337
|
pass
|
349
338
|
|
@@ -354,6 +343,7 @@ struct_kfd_ioctl_get_process_apertures_new_args._fields_ = [
|
|
354
343
|
('pad', ctypes.c_uint32),
|
355
344
|
]
|
356
345
|
|
346
|
+
AMDKFD_IOC_GET_PROCESS_APERTURES_NEW = AMDKFD_IOWR ( 0x14 , struct_kfd_ioctl_get_process_apertures_new_args ) # macro (from list)
|
357
347
|
class struct_kfd_ioctl_dbg_register_args(Structure):
|
358
348
|
pass
|
359
349
|
|
@@ -363,6 +353,7 @@ struct_kfd_ioctl_dbg_register_args._fields_ = [
|
|
363
353
|
('pad', ctypes.c_uint32),
|
364
354
|
]
|
365
355
|
|
356
|
+
AMDKFD_IOC_DBG_REGISTER = AMDKFD_IOW ( 0x0D , struct_kfd_ioctl_dbg_register_args ) # macro (from list)
|
366
357
|
class struct_kfd_ioctl_dbg_unregister_args(Structure):
|
367
358
|
pass
|
368
359
|
|
@@ -372,6 +363,7 @@ struct_kfd_ioctl_dbg_unregister_args._fields_ = [
|
|
372
363
|
('pad', ctypes.c_uint32),
|
373
364
|
]
|
374
365
|
|
366
|
+
AMDKFD_IOC_DBG_UNREGISTER = AMDKFD_IOW ( 0x0E , struct_kfd_ioctl_dbg_unregister_args ) # macro (from list)
|
375
367
|
class struct_kfd_ioctl_dbg_address_watch_args(Structure):
|
376
368
|
pass
|
377
369
|
|
@@ -382,6 +374,7 @@ struct_kfd_ioctl_dbg_address_watch_args._fields_ = [
|
|
382
374
|
('buf_size_in_bytes', ctypes.c_uint32),
|
383
375
|
]
|
384
376
|
|
377
|
+
AMDKFD_IOC_DBG_ADDRESS_WATCH = AMDKFD_IOW ( 0x0F , struct_kfd_ioctl_dbg_address_watch_args ) # macro (from list)
|
385
378
|
class struct_kfd_ioctl_dbg_wave_control_args(Structure):
|
386
379
|
pass
|
387
380
|
|
@@ -392,6 +385,7 @@ struct_kfd_ioctl_dbg_wave_control_args._fields_ = [
|
|
392
385
|
('buf_size_in_bytes', ctypes.c_uint32),
|
393
386
|
]
|
394
387
|
|
388
|
+
AMDKFD_IOC_DBG_WAVE_CONTROL = AMDKFD_IOW ( 0x10 , struct_kfd_ioctl_dbg_wave_control_args ) # macro (from list)
|
395
389
|
class struct_kfd_ioctl_create_event_args(Structure):
|
396
390
|
pass
|
397
391
|
|
@@ -406,6 +400,7 @@ struct_kfd_ioctl_create_event_args._fields_ = [
|
|
406
400
|
('event_slot_index', ctypes.c_uint32),
|
407
401
|
]
|
408
402
|
|
403
|
+
AMDKFD_IOC_CREATE_EVENT = AMDKFD_IOWR ( 0x08 , struct_kfd_ioctl_create_event_args ) # macro (from list)
|
409
404
|
class struct_kfd_ioctl_destroy_event_args(Structure):
|
410
405
|
pass
|
411
406
|
|
@@ -415,6 +410,7 @@ struct_kfd_ioctl_destroy_event_args._fields_ = [
|
|
415
410
|
('pad', ctypes.c_uint32),
|
416
411
|
]
|
417
412
|
|
413
|
+
AMDKFD_IOC_DESTROY_EVENT = AMDKFD_IOW ( 0x09 , struct_kfd_ioctl_destroy_event_args ) # macro (from list)
|
418
414
|
class struct_kfd_ioctl_set_event_args(Structure):
|
419
415
|
pass
|
420
416
|
|
@@ -424,6 +420,7 @@ struct_kfd_ioctl_set_event_args._fields_ = [
|
|
424
420
|
('pad', ctypes.c_uint32),
|
425
421
|
]
|
426
422
|
|
423
|
+
AMDKFD_IOC_SET_EVENT = AMDKFD_IOW ( 0x0A , struct_kfd_ioctl_set_event_args ) # macro (from list)
|
427
424
|
class struct_kfd_ioctl_reset_event_args(Structure):
|
428
425
|
pass
|
429
426
|
|
@@ -433,6 +430,7 @@ struct_kfd_ioctl_reset_event_args._fields_ = [
|
|
433
430
|
('pad', ctypes.c_uint32),
|
434
431
|
]
|
435
432
|
|
433
|
+
AMDKFD_IOC_RESET_EVENT = AMDKFD_IOW ( 0x0B , struct_kfd_ioctl_reset_event_args ) # macro (from list)
|
436
434
|
class struct_kfd_memory_exception_failure(Structure):
|
437
435
|
pass
|
438
436
|
|
@@ -500,6 +498,7 @@ struct_kfd_ioctl_wait_events_args._fields_ = [
|
|
500
498
|
('wait_result', ctypes.c_uint32),
|
501
499
|
]
|
502
500
|
|
501
|
+
AMDKFD_IOC_WAIT_EVENTS = AMDKFD_IOWR ( 0x0C , struct_kfd_ioctl_wait_events_args ) # macro (from list)
|
503
502
|
class struct_kfd_ioctl_set_scratch_backing_va_args(Structure):
|
504
503
|
pass
|
505
504
|
|
@@ -510,6 +509,7 @@ struct_kfd_ioctl_set_scratch_backing_va_args._fields_ = [
|
|
510
509
|
('pad', ctypes.c_uint32),
|
511
510
|
]
|
512
511
|
|
512
|
+
AMDKFD_IOC_SET_SCRATCH_BACKING_VA = AMDKFD_IOWR ( 0x11 , struct_kfd_ioctl_set_scratch_backing_va_args ) # macro (from list)
|
513
513
|
class struct_kfd_ioctl_get_tile_config_args(Structure):
|
514
514
|
pass
|
515
515
|
|
@@ -525,6 +525,7 @@ struct_kfd_ioctl_get_tile_config_args._fields_ = [
|
|
525
525
|
('num_ranks', ctypes.c_uint32),
|
526
526
|
]
|
527
527
|
|
528
|
+
AMDKFD_IOC_GET_TILE_CONFIG = AMDKFD_IOWR ( 0x12 , struct_kfd_ioctl_get_tile_config_args ) # macro (from list)
|
528
529
|
class struct_kfd_ioctl_set_trap_handler_args(Structure):
|
529
530
|
pass
|
530
531
|
|
@@ -536,6 +537,7 @@ struct_kfd_ioctl_set_trap_handler_args._fields_ = [
|
|
536
537
|
('pad', ctypes.c_uint32),
|
537
538
|
]
|
538
539
|
|
540
|
+
AMDKFD_IOC_SET_TRAP_HANDLER = AMDKFD_IOW ( 0x13 , struct_kfd_ioctl_set_trap_handler_args ) # macro (from list)
|
539
541
|
class struct_kfd_ioctl_acquire_vm_args(Structure):
|
540
542
|
pass
|
541
543
|
|
@@ -545,6 +547,7 @@ struct_kfd_ioctl_acquire_vm_args._fields_ = [
|
|
545
547
|
('gpu_id', ctypes.c_uint32),
|
546
548
|
]
|
547
549
|
|
550
|
+
AMDKFD_IOC_ACQUIRE_VM = AMDKFD_IOW ( 0x15 , struct_kfd_ioctl_acquire_vm_args ) # macro (from list)
|
548
551
|
class struct_kfd_ioctl_alloc_memory_of_gpu_args(Structure):
|
549
552
|
pass
|
550
553
|
|
@@ -558,6 +561,7 @@ struct_kfd_ioctl_alloc_memory_of_gpu_args._fields_ = [
|
|
558
561
|
('flags', ctypes.c_uint32),
|
559
562
|
]
|
560
563
|
|
564
|
+
AMDKFD_IOC_ALLOC_MEMORY_OF_GPU = AMDKFD_IOWR ( 0x16 , struct_kfd_ioctl_alloc_memory_of_gpu_args ) # macro (from list)
|
561
565
|
class struct_kfd_ioctl_free_memory_of_gpu_args(Structure):
|
562
566
|
pass
|
563
567
|
|
@@ -566,6 +570,7 @@ struct_kfd_ioctl_free_memory_of_gpu_args._fields_ = [
|
|
566
570
|
('handle', ctypes.c_uint64),
|
567
571
|
]
|
568
572
|
|
573
|
+
AMDKFD_IOC_FREE_MEMORY_OF_GPU = AMDKFD_IOW ( 0x17 , struct_kfd_ioctl_free_memory_of_gpu_args ) # macro (from list)
|
569
574
|
class struct_kfd_ioctl_map_memory_to_gpu_args(Structure):
|
570
575
|
pass
|
571
576
|
|
@@ -577,6 +582,7 @@ struct_kfd_ioctl_map_memory_to_gpu_args._fields_ = [
|
|
577
582
|
('n_success', ctypes.c_uint32),
|
578
583
|
]
|
579
584
|
|
585
|
+
AMDKFD_IOC_MAP_MEMORY_TO_GPU = AMDKFD_IOWR ( 0x18 , struct_kfd_ioctl_map_memory_to_gpu_args ) # macro (from list)
|
580
586
|
class struct_kfd_ioctl_unmap_memory_from_gpu_args(Structure):
|
581
587
|
pass
|
582
588
|
|
@@ -588,6 +594,7 @@ struct_kfd_ioctl_unmap_memory_from_gpu_args._fields_ = [
|
|
588
594
|
('n_success', ctypes.c_uint32),
|
589
595
|
]
|
590
596
|
|
597
|
+
AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU = AMDKFD_IOWR ( 0x19 , struct_kfd_ioctl_unmap_memory_from_gpu_args ) # macro (from list)
|
591
598
|
class struct_kfd_ioctl_alloc_queue_gws_args(Structure):
|
592
599
|
pass
|
593
600
|
|
@@ -599,6 +606,7 @@ struct_kfd_ioctl_alloc_queue_gws_args._fields_ = [
|
|
599
606
|
('pad', ctypes.c_uint32),
|
600
607
|
]
|
601
608
|
|
609
|
+
AMDKFD_IOC_ALLOC_QUEUE_GWS = AMDKFD_IOWR ( 0x1E , struct_kfd_ioctl_alloc_queue_gws_args ) # macro (from list)
|
602
610
|
class struct_kfd_ioctl_get_dmabuf_info_args(Structure):
|
603
611
|
pass
|
604
612
|
|
@@ -612,6 +620,7 @@ struct_kfd_ioctl_get_dmabuf_info_args._fields_ = [
|
|
612
620
|
('dmabuf_fd', ctypes.c_uint32),
|
613
621
|
]
|
614
622
|
|
623
|
+
AMDKFD_IOC_GET_DMABUF_INFO = AMDKFD_IOWR ( 0x1C , struct_kfd_ioctl_get_dmabuf_info_args ) # macro (from list)
|
615
624
|
class struct_kfd_ioctl_import_dmabuf_args(Structure):
|
616
625
|
pass
|
617
626
|
|
@@ -623,6 +632,7 @@ struct_kfd_ioctl_import_dmabuf_args._fields_ = [
|
|
623
632
|
('dmabuf_fd', ctypes.c_uint32),
|
624
633
|
]
|
625
634
|
|
635
|
+
AMDKFD_IOC_IMPORT_DMABUF = AMDKFD_IOWR ( 0x1D , struct_kfd_ioctl_import_dmabuf_args ) # macro (from list)
|
626
636
|
|
627
637
|
# values for enumeration 'kfd_smi_event'
|
628
638
|
kfd_smi_event__enumvalues = {
|
@@ -647,6 +657,7 @@ struct_kfd_ioctl_smi_events_args._fields_ = [
|
|
647
657
|
('anon_fd', ctypes.c_uint32),
|
648
658
|
]
|
649
659
|
|
660
|
+
AMDKFD_IOC_SMI_EVENTS = AMDKFD_IOWR ( 0x1F , struct_kfd_ioctl_smi_events_args ) # macro (from list)
|
650
661
|
|
651
662
|
# values for enumeration 'kfd_mmio_remap'
|
652
663
|
kfd_mmio_remap__enumvalues = {
|
@@ -716,6 +727,7 @@ struct_kfd_ioctl_svm_args._fields_ = [
|
|
716
727
|
('attrs', struct_kfd_ioctl_svm_attribute * 0),
|
717
728
|
]
|
718
729
|
|
730
|
+
AMDKFD_IOC_SVM = AMDKFD_IOWR ( 0x20 , struct_kfd_ioctl_svm_args ) # macro (from list)
|
719
731
|
class struct_kfd_ioctl_set_xnack_mode_args(Structure):
|
720
732
|
pass
|
721
733
|
|
@@ -724,6 +736,7 @@ struct_kfd_ioctl_set_xnack_mode_args._fields_ = [
|
|
724
736
|
('xnack_enabled', ctypes.c_int32),
|
725
737
|
]
|
726
738
|
|
739
|
+
AMDKFD_IOC_SET_XNACK_MODE = AMDKFD_IOWR ( 0x21 , struct_kfd_ioctl_set_xnack_mode_args ) # macro (from list)
|
727
740
|
__all__ = \
|
728
741
|
['AMDKFD_COMMAND_END', 'AMDKFD_COMMAND_START',
|
729
742
|
'AMDKFD_IOCTL_BASE', 'KFD_HW_EXCEPTION_ECC',
|
@@ -770,10 +783,10 @@ __all__ = \
|
|
770
783
|
'KFD_SMI_EVENT_NONE', 'KFD_SMI_EVENT_THERMAL_THROTTLE',
|
771
784
|
'KFD_SMI_EVENT_VMFAULT', 'MAX_ALLOWED_AW_BUFF_SIZE',
|
772
785
|
'MAX_ALLOWED_NUM_POINTS', 'MAX_ALLOWED_WAC_BUFF_SIZE',
|
773
|
-
'NUM_OF_SUPPORTED_GPUS', '
|
774
|
-
'
|
775
|
-
'
|
776
|
-
'struct_kfd_hsa_hw_exception_data',
|
786
|
+
'NUM_OF_SUPPORTED_GPUS', '_IO', '_IOR', '_IOW', '_IOWR',
|
787
|
+
'kfd_ioctl_svm_attr_type', 'kfd_ioctl_svm_location',
|
788
|
+
'kfd_ioctl_svm_op', 'kfd_mmio_remap', 'kfd_smi_event',
|
789
|
+
'struct_kfd_event_data', 'struct_kfd_hsa_hw_exception_data',
|
777
790
|
'struct_kfd_hsa_memory_exception_data',
|
778
791
|
'struct_kfd_ioctl_acquire_vm_args',
|
779
792
|
'struct_kfd_ioctl_alloc_memory_of_gpu_args',
|