tinygrad 0.10.0__py3-none-any.whl → 0.10.2__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.
Files changed (88) hide show
  1. tinygrad/codegen/devectorizer.py +247 -0
  2. tinygrad/codegen/expander.py +121 -0
  3. tinygrad/codegen/kernel.py +141 -201
  4. tinygrad/codegen/linearize.py +223 -84
  5. tinygrad/codegen/lowerer.py +60 -42
  6. tinygrad/codegen/symbolic.py +476 -0
  7. tinygrad/codegen/transcendental.py +22 -13
  8. tinygrad/device.py +187 -47
  9. tinygrad/dtype.py +39 -28
  10. tinygrad/engine/jit.py +83 -65
  11. tinygrad/engine/memory.py +4 -5
  12. tinygrad/engine/multi.py +161 -0
  13. tinygrad/engine/realize.py +62 -108
  14. tinygrad/engine/schedule.py +396 -357
  15. tinygrad/engine/search.py +55 -66
  16. tinygrad/gradient.py +73 -0
  17. tinygrad/helpers.py +81 -59
  18. tinygrad/nn/__init__.py +30 -32
  19. tinygrad/nn/datasets.py +1 -2
  20. tinygrad/nn/optim.py +22 -26
  21. tinygrad/nn/state.py +91 -66
  22. tinygrad/ops.py +492 -641
  23. tinygrad/renderer/__init__.py +95 -36
  24. tinygrad/renderer/cstyle.py +99 -92
  25. tinygrad/renderer/llvmir.py +83 -34
  26. tinygrad/renderer/ptx.py +83 -99
  27. tinygrad/renderer/wgsl.py +95 -0
  28. tinygrad/runtime/autogen/amd_gpu.py +39507 -12
  29. tinygrad/runtime/autogen/comgr.py +2 -0
  30. tinygrad/runtime/autogen/kfd.py +4 -3
  31. tinygrad/runtime/autogen/kgsl.py +1 -1
  32. tinygrad/runtime/autogen/libc.py +404 -71
  33. tinygrad/runtime/autogen/llvm.py +11379 -0
  34. tinygrad/runtime/autogen/pci.py +1333 -0
  35. tinygrad/runtime/autogen/vfio.py +891 -0
  36. tinygrad/runtime/autogen/webgpu.py +6985 -0
  37. tinygrad/runtime/graph/cuda.py +8 -9
  38. tinygrad/runtime/graph/hcq.py +84 -79
  39. tinygrad/runtime/graph/metal.py +40 -43
  40. tinygrad/runtime/ops_amd.py +498 -334
  41. tinygrad/runtime/ops_cloud.py +34 -34
  42. tinygrad/runtime/ops_cpu.py +24 -0
  43. tinygrad/runtime/ops_cuda.py +30 -27
  44. tinygrad/runtime/ops_disk.py +62 -63
  45. tinygrad/runtime/ops_dsp.py +159 -42
  46. tinygrad/runtime/ops_gpu.py +30 -30
  47. tinygrad/runtime/ops_hip.py +29 -31
  48. tinygrad/runtime/ops_llvm.py +48 -41
  49. tinygrad/runtime/ops_metal.py +149 -113
  50. tinygrad/runtime/ops_npy.py +2 -2
  51. tinygrad/runtime/ops_nv.py +238 -273
  52. tinygrad/runtime/ops_python.py +55 -50
  53. tinygrad/runtime/ops_qcom.py +129 -157
  54. tinygrad/runtime/ops_webgpu.py +225 -0
  55. tinygrad/runtime/support/allocator.py +94 -0
  56. tinygrad/runtime/support/am/__init__.py +0 -0
  57. tinygrad/runtime/support/am/amdev.py +396 -0
  58. tinygrad/runtime/support/am/ip.py +463 -0
  59. tinygrad/runtime/support/compiler_cuda.py +4 -2
  60. tinygrad/runtime/support/elf.py +28 -4
  61. tinygrad/runtime/support/hcq.py +256 -324
  62. tinygrad/runtime/support/llvm.py +26 -0
  63. tinygrad/shape/shapetracker.py +85 -53
  64. tinygrad/shape/view.py +104 -140
  65. tinygrad/spec.py +155 -0
  66. tinygrad/tensor.py +835 -527
  67. tinygrad/viz/assets/cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js +1232 -0
  68. tinygrad/viz/assets/cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/cpp.min.js +47 -0
  69. tinygrad/viz/assets/cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/python.min.js +42 -0
  70. tinygrad/viz/assets/cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/default.min.css +9 -0
  71. tinygrad/viz/assets/d3js.org/d3.v5.min.js +2 -0
  72. tinygrad/viz/assets/dagrejs.github.io/project/dagre-d3/latest/dagre-d3.min.js +4816 -0
  73. tinygrad/viz/assets/unpkg.com/@highlightjs/cdn-assets@11.10.0/styles/tokyo-night-dark.min.css +8 -0
  74. tinygrad/viz/index.html +544 -0
  75. tinygrad/viz/perfetto.html +178 -0
  76. tinygrad/viz/serve.py +205 -0
  77. {tinygrad-0.10.0.dist-info → tinygrad-0.10.2.dist-info}/METADATA +48 -25
  78. tinygrad-0.10.2.dist-info/RECORD +99 -0
  79. {tinygrad-0.10.0.dist-info → tinygrad-0.10.2.dist-info}/WHEEL +1 -1
  80. tinygrad/codegen/uopgraph.py +0 -506
  81. tinygrad/engine/lazy.py +0 -228
  82. tinygrad/function.py +0 -212
  83. tinygrad/multi.py +0 -177
  84. tinygrad/runtime/graph/clang.py +0 -39
  85. tinygrad/runtime/ops_clang.py +0 -35
  86. tinygrad-0.10.0.dist-info/RECORD +0 -77
  87. {tinygrad-0.10.0.dist-info → tinygrad-0.10.2.dist-info}/LICENSE +0 -0
  88. {tinygrad-0.10.0.dist-info → tinygrad-0.10.2.dist-info}/top_level.txt +0 -0
@@ -10,6 +10,8 @@ import ctypes, ctypes.util, os
10
10
  PATHS_TO_TRY = [
11
11
  '/opt/rocm/lib/libamd_comgr.so',
12
12
  os.getenv('ROCM_PATH', '')+'/lib/libamd_comgr.so',
13
+ '/usr/local/lib/libamd_comgr.dylib',
14
+ '/opt/homebrew/lib/libamd_comgr.dylib',
13
15
  ]
14
16
  def _try_dlopen_amd_comgr():
15
17
  library = ctypes.util.find_library("amd_comgr")
@@ -10,10 +10,11 @@ import ctypes, os
10
10
 
11
11
 
12
12
 
13
- import fcntl, functools
13
+ import functools
14
+ from tinygrad.runtime.support.hcq import HWInterface
14
15
 
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)
16
+ def _do_ioctl(__idir, __base, __nr, __user_struct, __fd:HWInterface, **kwargs):
17
+ ret = __fd.ioctl((__idir<<30) | (ctypes.sizeof(made := __user_struct(**kwargs))<<16) | (__base<<8) | __nr, made)
17
18
  if ret != 0: raise RuntimeError(f"ioctl returned {ret}")
18
19
  return made
19
20
 
@@ -129,7 +129,7 @@ else:
129
129
  import fcntl, functools
130
130
 
131
131
  def _do_ioctl(__idir, __base, __nr, __user_struct, __fd, __payload=None, **kwargs):
132
- ret = fcntl.ioctl(__fd, (__idir<<30) | (ctypes.sizeof(made := (__payload or __user_struct(**kwargs)))<<16) | (__base<<8) | __nr, made)
132
+ ret = __fd.ioctl((__idir<<30) | (ctypes.sizeof(made := (__payload or __user_struct(**kwargs)))<<16) | (__base<<8) | __nr, made)
133
133
  if ret != 0: raise RuntimeError(f"ioctl returned {ret}")
134
134
  return made
135
135
 
@@ -245,6 +245,265 @@ try:
245
245
  except AttributeError:
246
246
  pass
247
247
  _SYSCALL_H = 1 # macro
248
+ _STRING_H = 1 # macro
249
+ __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION = True # macro
250
+ __need_NULL = True # macro
251
+ try:
252
+ memcpy = _libraries['libc'].memcpy
253
+ memcpy.restype = ctypes.POINTER(None)
254
+ memcpy.argtypes = [ctypes.POINTER(None), ctypes.POINTER(None), size_t]
255
+ except AttributeError:
256
+ pass
257
+ try:
258
+ memmove = _libraries['libc'].memmove
259
+ memmove.restype = ctypes.POINTER(None)
260
+ memmove.argtypes = [ctypes.POINTER(None), ctypes.POINTER(None), size_t]
261
+ except AttributeError:
262
+ pass
263
+ try:
264
+ memccpy = _libraries['libc'].memccpy
265
+ memccpy.restype = ctypes.POINTER(None)
266
+ memccpy.argtypes = [ctypes.POINTER(None), ctypes.POINTER(None), ctypes.c_int32, size_t]
267
+ except AttributeError:
268
+ pass
269
+ try:
270
+ memset = _libraries['libc'].memset
271
+ memset.restype = ctypes.POINTER(None)
272
+ memset.argtypes = [ctypes.POINTER(None), ctypes.c_int32, size_t]
273
+ except AttributeError:
274
+ pass
275
+ try:
276
+ memcmp = _libraries['libc'].memcmp
277
+ memcmp.restype = ctypes.c_int32
278
+ memcmp.argtypes = [ctypes.POINTER(None), ctypes.POINTER(None), size_t]
279
+ except AttributeError:
280
+ pass
281
+ try:
282
+ __memcmpeq = _libraries['libc'].__memcmpeq
283
+ __memcmpeq.restype = ctypes.c_int32
284
+ __memcmpeq.argtypes = [ctypes.POINTER(None), ctypes.POINTER(None), size_t]
285
+ except AttributeError:
286
+ pass
287
+ try:
288
+ memchr = _libraries['libc'].memchr
289
+ memchr.restype = ctypes.POINTER(None)
290
+ memchr.argtypes = [ctypes.POINTER(None), ctypes.c_int32, size_t]
291
+ except AttributeError:
292
+ pass
293
+ try:
294
+ strcpy = _libraries['libc'].strcpy
295
+ strcpy.restype = ctypes.POINTER(ctypes.c_char)
296
+ strcpy.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
297
+ except AttributeError:
298
+ pass
299
+ try:
300
+ strncpy = _libraries['libc'].strncpy
301
+ strncpy.restype = ctypes.POINTER(ctypes.c_char)
302
+ strncpy.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), size_t]
303
+ except AttributeError:
304
+ pass
305
+ try:
306
+ strcat = _libraries['libc'].strcat
307
+ strcat.restype = ctypes.POINTER(ctypes.c_char)
308
+ strcat.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
309
+ except AttributeError:
310
+ pass
311
+ try:
312
+ strncat = _libraries['libc'].strncat
313
+ strncat.restype = ctypes.POINTER(ctypes.c_char)
314
+ strncat.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), size_t]
315
+ except AttributeError:
316
+ pass
317
+ try:
318
+ strcmp = _libraries['libc'].strcmp
319
+ strcmp.restype = ctypes.c_int32
320
+ strcmp.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
321
+ except AttributeError:
322
+ pass
323
+ try:
324
+ strncmp = _libraries['libc'].strncmp
325
+ strncmp.restype = ctypes.c_int32
326
+ strncmp.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), size_t]
327
+ except AttributeError:
328
+ pass
329
+ try:
330
+ strcoll = _libraries['libc'].strcoll
331
+ strcoll.restype = ctypes.c_int32
332
+ strcoll.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
333
+ except AttributeError:
334
+ pass
335
+ try:
336
+ strxfrm = _libraries['libc'].strxfrm
337
+ strxfrm.restype = ctypes.c_uint64
338
+ strxfrm.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), size_t]
339
+ except AttributeError:
340
+ pass
341
+ class struct___locale_struct(Structure):
342
+ pass
343
+
344
+ class struct___locale_data(Structure):
345
+ pass
346
+
347
+ struct___locale_struct._pack_ = 1 # source:False
348
+ struct___locale_struct._fields_ = [
349
+ ('__locales', ctypes.POINTER(struct___locale_data) * 13),
350
+ ('__ctype_b', ctypes.POINTER(ctypes.c_uint16)),
351
+ ('__ctype_tolower', ctypes.POINTER(ctypes.c_int32)),
352
+ ('__ctype_toupper', ctypes.POINTER(ctypes.c_int32)),
353
+ ('__names', ctypes.POINTER(ctypes.c_char) * 13),
354
+ ]
355
+
356
+ locale_t = ctypes.POINTER(struct___locale_struct)
357
+ try:
358
+ strcoll_l = _libraries['libc'].strcoll_l
359
+ strcoll_l.restype = ctypes.c_int32
360
+ strcoll_l.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), locale_t]
361
+ except AttributeError:
362
+ pass
363
+ try:
364
+ strxfrm_l = _libraries['libc'].strxfrm_l
365
+ strxfrm_l.restype = size_t
366
+ strxfrm_l.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), size_t, locale_t]
367
+ except AttributeError:
368
+ pass
369
+ try:
370
+ strdup = _libraries['libc'].strdup
371
+ strdup.restype = ctypes.POINTER(ctypes.c_char)
372
+ strdup.argtypes = [ctypes.POINTER(ctypes.c_char)]
373
+ except AttributeError:
374
+ pass
375
+ try:
376
+ strndup = _libraries['libc'].strndup
377
+ strndup.restype = ctypes.POINTER(ctypes.c_char)
378
+ strndup.argtypes = [ctypes.POINTER(ctypes.c_char), size_t]
379
+ except AttributeError:
380
+ pass
381
+ try:
382
+ strchr = _libraries['libc'].strchr
383
+ strchr.restype = ctypes.POINTER(ctypes.c_char)
384
+ strchr.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.c_int32]
385
+ except AttributeError:
386
+ pass
387
+ try:
388
+ strrchr = _libraries['libc'].strrchr
389
+ strrchr.restype = ctypes.POINTER(ctypes.c_char)
390
+ strrchr.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.c_int32]
391
+ except AttributeError:
392
+ pass
393
+ try:
394
+ strcspn = _libraries['libc'].strcspn
395
+ strcspn.restype = ctypes.c_uint64
396
+ strcspn.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
397
+ except AttributeError:
398
+ pass
399
+ try:
400
+ strspn = _libraries['libc'].strspn
401
+ strspn.restype = ctypes.c_uint64
402
+ strspn.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
403
+ except AttributeError:
404
+ pass
405
+ try:
406
+ strpbrk = _libraries['libc'].strpbrk
407
+ strpbrk.restype = ctypes.POINTER(ctypes.c_char)
408
+ strpbrk.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
409
+ except AttributeError:
410
+ pass
411
+ try:
412
+ strstr = _libraries['libc'].strstr
413
+ strstr.restype = ctypes.POINTER(ctypes.c_char)
414
+ strstr.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
415
+ except AttributeError:
416
+ pass
417
+ try:
418
+ strtok = _libraries['libc'].strtok
419
+ strtok.restype = ctypes.POINTER(ctypes.c_char)
420
+ strtok.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
421
+ except AttributeError:
422
+ pass
423
+ try:
424
+ __strtok_r = _libraries['libc'].__strtok_r
425
+ __strtok_r.restype = ctypes.POINTER(ctypes.c_char)
426
+ __strtok_r.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.POINTER(ctypes.c_char))]
427
+ except AttributeError:
428
+ pass
429
+ try:
430
+ strtok_r = _libraries['libc'].strtok_r
431
+ strtok_r.restype = ctypes.POINTER(ctypes.c_char)
432
+ strtok_r.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.POINTER(ctypes.c_char))]
433
+ except AttributeError:
434
+ pass
435
+ try:
436
+ strlen = _libraries['libc'].strlen
437
+ strlen.restype = ctypes.c_uint64
438
+ strlen.argtypes = [ctypes.POINTER(ctypes.c_char)]
439
+ except AttributeError:
440
+ pass
441
+ try:
442
+ strnlen = _libraries['libc'].strnlen
443
+ strnlen.restype = size_t
444
+ strnlen.argtypes = [ctypes.POINTER(ctypes.c_char), size_t]
445
+ except AttributeError:
446
+ pass
447
+ try:
448
+ strerror = _libraries['libc'].strerror
449
+ strerror.restype = ctypes.POINTER(ctypes.c_char)
450
+ strerror.argtypes = [ctypes.c_int32]
451
+ except AttributeError:
452
+ pass
453
+ try:
454
+ strerror_r = _libraries['libc'].strerror_r
455
+ strerror_r.restype = ctypes.c_int32
456
+ strerror_r.argtypes = [ctypes.c_int32, ctypes.POINTER(ctypes.c_char), size_t]
457
+ except AttributeError:
458
+ pass
459
+ try:
460
+ strerror_l = _libraries['libc'].strerror_l
461
+ strerror_l.restype = ctypes.POINTER(ctypes.c_char)
462
+ strerror_l.argtypes = [ctypes.c_int32, locale_t]
463
+ except AttributeError:
464
+ pass
465
+ try:
466
+ explicit_bzero = _libraries['libc'].explicit_bzero
467
+ explicit_bzero.restype = None
468
+ explicit_bzero.argtypes = [ctypes.POINTER(None), size_t]
469
+ except AttributeError:
470
+ pass
471
+ try:
472
+ strsep = _libraries['libc'].strsep
473
+ strsep.restype = ctypes.POINTER(ctypes.c_char)
474
+ strsep.argtypes = [ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_char)]
475
+ except AttributeError:
476
+ pass
477
+ try:
478
+ strsignal = _libraries['libc'].strsignal
479
+ strsignal.restype = ctypes.POINTER(ctypes.c_char)
480
+ strsignal.argtypes = [ctypes.c_int32]
481
+ except AttributeError:
482
+ pass
483
+ try:
484
+ __stpcpy = _libraries['libc'].__stpcpy
485
+ __stpcpy.restype = ctypes.POINTER(ctypes.c_char)
486
+ __stpcpy.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
487
+ except AttributeError:
488
+ pass
489
+ try:
490
+ stpcpy = _libraries['libc'].stpcpy
491
+ stpcpy.restype = ctypes.POINTER(ctypes.c_char)
492
+ stpcpy.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)]
493
+ except AttributeError:
494
+ pass
495
+ try:
496
+ __stpncpy = _libraries['libc'].__stpncpy
497
+ __stpncpy.restype = ctypes.POINTER(ctypes.c_char)
498
+ __stpncpy.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), size_t]
499
+ except AttributeError:
500
+ pass
501
+ try:
502
+ stpncpy = _libraries['libc'].stpncpy
503
+ stpncpy.restype = ctypes.POINTER(ctypes.c_char)
504
+ stpncpy.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), size_t]
505
+ except AttributeError:
506
+ pass
248
507
  _ELF_H = 1 # macro
249
508
  EI_NIDENT = (16) # macro
250
509
  EI_MAG0 = 0 # macro
@@ -3726,7 +3985,6 @@ STDIN_FILENO = 0 # macro
3726
3985
  STDOUT_FILENO = 1 # macro
3727
3986
  STDERR_FILENO = 2 # macro
3728
3987
  __ssize_t_defined = True # macro
3729
- __need_NULL = True # macro
3730
3988
  __gid_t_defined = True # macro
3731
3989
  __uid_t_defined = True # macro
3732
3990
  __useconds_t_defined = True # macro
@@ -4401,6 +4659,55 @@ try:
4401
4659
  getentropy.argtypes = [ctypes.POINTER(None), size_t]
4402
4660
  except AttributeError:
4403
4661
  pass
4662
+ __ASM_GENERIC_MMAN_COMMON_H = True # macro
4663
+ PROT_READ = 0x1 # macro
4664
+ PROT_WRITE = 0x2 # macro
4665
+ PROT_EXEC = 0x4 # macro
4666
+ PROT_SEM = 0x8 # macro
4667
+ PROT_NONE = 0x0 # macro
4668
+ PROT_GROWSDOWN = 0x01000000 # macro
4669
+ PROT_GROWSUP = 0x02000000 # macro
4670
+ MAP_TYPE = 0x0f # macro
4671
+ MAP_FIXED = 0x10 # macro
4672
+ MAP_ANONYMOUS = 0x20 # macro
4673
+ MAP_POPULATE = 0x008000 # macro
4674
+ MAP_NONBLOCK = 0x010000 # macro
4675
+ MAP_STACK = 0x020000 # macro
4676
+ MAP_HUGETLB = 0x040000 # macro
4677
+ MAP_SYNC = 0x080000 # macro
4678
+ MAP_FIXED_NOREPLACE = 0x100000 # macro
4679
+ MAP_UNINITIALIZED = 0x4000000 # macro
4680
+ MLOCK_ONFAULT = 0x01 # macro
4681
+ MS_ASYNC = 1 # macro
4682
+ MS_INVALIDATE = 2 # macro
4683
+ MS_SYNC = 4 # macro
4684
+ MADV_NORMAL = 0 # macro
4685
+ MADV_RANDOM = 1 # macro
4686
+ MADV_SEQUENTIAL = 2 # macro
4687
+ MADV_WILLNEED = 3 # macro
4688
+ MADV_DONTNEED = 4 # macro
4689
+ MADV_FREE = 8 # macro
4690
+ MADV_REMOVE = 9 # macro
4691
+ MADV_DONTFORK = 10 # macro
4692
+ MADV_DOFORK = 11 # macro
4693
+ MADV_HWPOISON = 100 # macro
4694
+ MADV_SOFT_OFFLINE = 101 # macro
4695
+ MADV_MERGEABLE = 12 # macro
4696
+ MADV_UNMERGEABLE = 13 # macro
4697
+ MADV_HUGEPAGE = 14 # macro
4698
+ MADV_NOHUGEPAGE = 15 # macro
4699
+ MADV_DONTDUMP = 16 # macro
4700
+ MADV_DODUMP = 17 # macro
4701
+ MADV_WIPEONFORK = 18 # macro
4702
+ MADV_KEEPONFORK = 19 # macro
4703
+ MADV_COLD = 20 # macro
4704
+ MADV_PAGEOUT = 21 # macro
4705
+ MADV_POPULATE_READ = 22 # macro
4706
+ MADV_POPULATE_WRITE = 23 # macro
4707
+ MAP_FILE = 0 # macro
4708
+ PKEY_DISABLE_ACCESS = 0x1 # macro
4709
+ PKEY_DISABLE_WRITE = 0x2 # macro
4710
+ PKEY_ACCESS_MASK = (0x1|0x2) # macro
4404
4711
  __all__ = \
4405
4712
  ['AT_BASE', 'AT_BASE_PLATFORM', 'AT_CLKTCK', 'AT_DCACHEBSIZE',
4406
4713
  'AT_EGID', 'AT_ENTRY', 'AT_EUID', 'AT_EXECFD', 'AT_EXECFN',
@@ -4596,20 +4903,31 @@ __all__ = \
4596
4903
  'LITUSE_ALPHA_TLS_GD', 'LITUSE_ALPHA_TLS_LDM', 'LL_DELAY_LOAD',
4597
4904
  'LL_DELTA', 'LL_EXACT_MATCH', 'LL_EXPORTS', 'LL_IGNORE_INT_VER',
4598
4905
  'LL_NONE', 'LL_REQUIRE_MINOR', 'L_INCR', 'L_SET', 'L_XTND',
4599
- 'MIPS_AFL_ASE_DSP', 'MIPS_AFL_ASE_DSPR2', 'MIPS_AFL_ASE_EVA',
4600
- 'MIPS_AFL_ASE_MASK', 'MIPS_AFL_ASE_MCU', 'MIPS_AFL_ASE_MDMX',
4601
- 'MIPS_AFL_ASE_MICROMIPS', 'MIPS_AFL_ASE_MIPS16',
4602
- 'MIPS_AFL_ASE_MIPS3D', 'MIPS_AFL_ASE_MSA', 'MIPS_AFL_ASE_MT',
4603
- 'MIPS_AFL_ASE_SMARTMIPS', 'MIPS_AFL_ASE_VIRT', 'MIPS_AFL_ASE_XPA',
4604
- 'MIPS_AFL_EXT_10000', 'MIPS_AFL_EXT_3900', 'MIPS_AFL_EXT_4010',
4605
- 'MIPS_AFL_EXT_4100', 'MIPS_AFL_EXT_4111', 'MIPS_AFL_EXT_4120',
4606
- 'MIPS_AFL_EXT_4650', 'MIPS_AFL_EXT_5400', 'MIPS_AFL_EXT_5500',
4607
- 'MIPS_AFL_EXT_5900', 'MIPS_AFL_EXT_LOONGSON_2E',
4608
- 'MIPS_AFL_EXT_LOONGSON_2F', 'MIPS_AFL_EXT_LOONGSON_3A',
4609
- 'MIPS_AFL_EXT_OCTEON', 'MIPS_AFL_EXT_OCTEON2',
4610
- 'MIPS_AFL_EXT_OCTEONP', 'MIPS_AFL_EXT_SB1', 'MIPS_AFL_EXT_XLR',
4906
+ 'MADV_COLD', 'MADV_DODUMP', 'MADV_DOFORK', 'MADV_DONTDUMP',
4907
+ 'MADV_DONTFORK', 'MADV_DONTNEED', 'MADV_FREE', 'MADV_HUGEPAGE',
4908
+ 'MADV_HWPOISON', 'MADV_KEEPONFORK', 'MADV_MERGEABLE',
4909
+ 'MADV_NOHUGEPAGE', 'MADV_NORMAL', 'MADV_PAGEOUT',
4910
+ 'MADV_POPULATE_READ', 'MADV_POPULATE_WRITE', 'MADV_RANDOM',
4911
+ 'MADV_REMOVE', 'MADV_SEQUENTIAL', 'MADV_SOFT_OFFLINE',
4912
+ 'MADV_UNMERGEABLE', 'MADV_WILLNEED', 'MADV_WIPEONFORK',
4913
+ 'MAP_ANONYMOUS', 'MAP_FILE', 'MAP_FIXED', 'MAP_FIXED_NOREPLACE',
4914
+ 'MAP_HUGETLB', 'MAP_NONBLOCK', 'MAP_POPULATE', 'MAP_STACK',
4915
+ 'MAP_SYNC', 'MAP_TYPE', 'MAP_UNINITIALIZED', 'MIPS_AFL_ASE_DSP',
4916
+ 'MIPS_AFL_ASE_DSPR2', 'MIPS_AFL_ASE_EVA', 'MIPS_AFL_ASE_MASK',
4917
+ 'MIPS_AFL_ASE_MCU', 'MIPS_AFL_ASE_MDMX', 'MIPS_AFL_ASE_MICROMIPS',
4918
+ 'MIPS_AFL_ASE_MIPS16', 'MIPS_AFL_ASE_MIPS3D', 'MIPS_AFL_ASE_MSA',
4919
+ 'MIPS_AFL_ASE_MT', 'MIPS_AFL_ASE_SMARTMIPS', 'MIPS_AFL_ASE_VIRT',
4920
+ 'MIPS_AFL_ASE_XPA', 'MIPS_AFL_EXT_10000', 'MIPS_AFL_EXT_3900',
4921
+ 'MIPS_AFL_EXT_4010', 'MIPS_AFL_EXT_4100', 'MIPS_AFL_EXT_4111',
4922
+ 'MIPS_AFL_EXT_4120', 'MIPS_AFL_EXT_4650', 'MIPS_AFL_EXT_5400',
4923
+ 'MIPS_AFL_EXT_5500', 'MIPS_AFL_EXT_5900',
4924
+ 'MIPS_AFL_EXT_LOONGSON_2E', 'MIPS_AFL_EXT_LOONGSON_2F',
4925
+ 'MIPS_AFL_EXT_LOONGSON_3A', 'MIPS_AFL_EXT_OCTEON',
4926
+ 'MIPS_AFL_EXT_OCTEON2', 'MIPS_AFL_EXT_OCTEONP',
4927
+ 'MIPS_AFL_EXT_SB1', 'MIPS_AFL_EXT_XLR',
4611
4928
  'MIPS_AFL_FLAGS1_ODDSPREG', 'MIPS_AFL_REG_128', 'MIPS_AFL_REG_32',
4612
- 'MIPS_AFL_REG_64', 'MIPS_AFL_REG_NONE',
4929
+ 'MIPS_AFL_REG_64', 'MIPS_AFL_REG_NONE', 'MLOCK_ONFAULT',
4930
+ 'MS_ASYNC', 'MS_INVALIDATE', 'MS_SYNC',
4613
4931
  'NOTE_GNU_PROPERTY_SECTION_NAME', 'NT_386_IOPERM', 'NT_386_TLS',
4614
4932
  'NT_ARM_HW_BREAK', 'NT_ARM_HW_WATCH', 'NT_ARM_PACA_KEYS',
4615
4933
  'NT_ARM_PACG_KEYS', 'NT_ARM_PAC_ENABLED_KEYS', 'NT_ARM_PAC_MASK',
@@ -4644,9 +4962,12 @@ __all__ = \
4644
4962
  'PF_HP_FAR_SHARED', 'PF_HP_LAZYSWAP', 'PF_HP_MODIFY',
4645
4963
  'PF_HP_NEAR_SHARED', 'PF_HP_PAGE_SIZE', 'PF_HP_SBP',
4646
4964
  'PF_IA_64_NORECOV', 'PF_MASKOS', 'PF_MASKPROC', 'PF_MIPS_LOCAL',
4647
- 'PF_PARISC_SBP', 'PF_R', 'PF_W', 'PF_X', 'PN_XNUM',
4965
+ 'PF_PARISC_SBP', 'PF_R', 'PF_W', 'PF_X', 'PKEY_ACCESS_MASK',
4966
+ 'PKEY_DISABLE_ACCESS', 'PKEY_DISABLE_WRITE', 'PN_XNUM',
4648
4967
  'PPC64_OPT_LOCALENTRY', 'PPC64_OPT_MULTI_TOC', 'PPC64_OPT_TLS',
4649
- 'PPC_OPT_TLS', 'PT_ARM_EXIDX', 'PT_DYNAMIC', 'PT_GNU_EH_FRAME',
4968
+ 'PPC_OPT_TLS', 'PROT_EXEC', 'PROT_GROWSDOWN', 'PROT_GROWSUP',
4969
+ 'PROT_NONE', 'PROT_READ', 'PROT_SEM', 'PROT_WRITE',
4970
+ 'PT_ARM_EXIDX', 'PT_DYNAMIC', 'PT_GNU_EH_FRAME',
4650
4971
  'PT_GNU_PROPERTY', 'PT_GNU_RELRO', 'PT_GNU_STACK', 'PT_HIOS',
4651
4972
  'PT_HIPROC', 'PT_HISUNW', 'PT_HP_CORE_COMM', 'PT_HP_CORE_KERNEL',
4652
4973
  'PT_HP_CORE_LOADABLE', 'PT_HP_CORE_MMF', 'PT_HP_CORE_NONE',
@@ -5404,59 +5725,71 @@ __all__ = \
5404
5725
  'Val_GNU_MIPS_ABI_FP_SOFT', 'Val_GNU_MIPS_ABI_FP_XX', 'W_OK',
5405
5726
  'X_OK', '_ELF_H', '_POSIX2_C_BIND', '_POSIX2_C_DEV',
5406
5727
  '_POSIX2_C_VERSION', '_POSIX2_LOCALEDEF', '_POSIX2_SW_DEV',
5407
- '_POSIX2_VERSION', '_POSIX_VERSION', '_SYSCALL_H', '_SYS_MMAN_H',
5408
- '_UNISTD_H', '_XOPEN_ENH_I18N', '_XOPEN_LEGACY', '_XOPEN_UNIX',
5409
- '_XOPEN_VERSION', '_XOPEN_XCU_VERSION', '_XOPEN_XPG2',
5410
- '_XOPEN_XPG3', '_XOPEN_XPG4', '__POSIX2_THIS_VERSION',
5411
- '__environ', '__getpgid', '__gid_t', '__gid_t_defined',
5412
- '__intptr_t_defined', '__mode_t_defined', '__need_NULL',
5413
- '__need_size_t', '__off_t', '__off_t_defined', '__pid_t',
5414
- '__pid_t_defined', '__socklen_t_defined', '__ssize_t_defined',
5415
- '__uid_t', '__uid_t_defined', '__useconds_t',
5416
- '__useconds_t_defined', '_exit', 'access', 'acct', 'alarm', 'brk',
5417
- 'c__Ea_Val_GNU_MIPS_ABI_FP_ANY', 'chdir', 'chown', 'chroot',
5418
- 'close', 'closefrom', 'confstr', 'crypt', 'daemon', 'dup', 'dup2',
5419
- 'endusershell', 'execl', 'execle', 'execlp', 'execv', 'execve',
5420
- 'execvp', 'faccessat', 'fchdir', 'fchown', 'fchownat',
5421
- 'fdatasync', 'fexecve', 'fork', 'fpathconf', 'fsync', 'ftruncate',
5422
- 'getcwd', 'getdomainname', 'getdtablesize', 'getegid',
5423
- 'getentropy', 'geteuid', 'getgid', 'getgroups', 'gethostid',
5424
- 'gethostname', 'getlogin', 'getlogin_r', 'getpagesize', 'getpass',
5425
- 'getpgid', 'getpgrp', 'getpid', 'getppid', 'getsid', 'getuid',
5426
- 'getusershell', 'getwd', 'gid_t', 'intptr_t', 'isatty', 'lchown',
5427
- 'link', 'linkat', 'lockf', 'lseek', 'madvise', 'mincore', 'mlock',
5428
- 'mlockall', 'mmap', 'mode_t', 'mprotect', 'msync', 'munlock',
5429
- 'munlockall', 'munmap', 'nice', 'off_t', 'pathconf', 'pause',
5430
- 'pid_t', 'pipe', 'posix_madvise', 'pread', 'profil', 'pwrite',
5431
- 'read', 'readlink', 'readlinkat', 'revoke', 'rmdir', 'sbrk',
5432
- 'setdomainname', 'setegid', 'seteuid', 'setgid', 'sethostid',
5433
- 'sethostname', 'setlogin', 'setpgid', 'setpgrp', 'setregid',
5434
- 'setreuid', 'setsid', 'setuid', 'setusershell', 'shm_open',
5435
- 'shm_unlink', 'size_t', 'sleep', 'socklen_t', 'ssize_t',
5436
- 'struct_c__SA_Elf32_Chdr', 'struct_c__SA_Elf32_Dyn',
5437
- 'struct_c__SA_Elf32_Ehdr', 'struct_c__SA_Elf32_Lib',
5438
- 'struct_c__SA_Elf32_Move', 'struct_c__SA_Elf32_Nhdr',
5439
- 'struct_c__SA_Elf32_Phdr', 'struct_c__SA_Elf32_RegInfo',
5440
- 'struct_c__SA_Elf32_Rel', 'struct_c__SA_Elf32_Rela',
5441
- 'struct_c__SA_Elf32_Shdr', 'struct_c__SA_Elf32_Sym',
5442
- 'struct_c__SA_Elf32_Syminfo', 'struct_c__SA_Elf32_Verdaux',
5443
- 'struct_c__SA_Elf32_Verdef', 'struct_c__SA_Elf32_Vernaux',
5444
- 'struct_c__SA_Elf32_Verneed', 'struct_c__SA_Elf32_auxv_t',
5445
- 'struct_c__SA_Elf64_Chdr', 'struct_c__SA_Elf64_Dyn',
5446
- 'struct_c__SA_Elf64_Ehdr', 'struct_c__SA_Elf64_Lib',
5447
- 'struct_c__SA_Elf64_Move', 'struct_c__SA_Elf64_Nhdr',
5448
- 'struct_c__SA_Elf64_Phdr', 'struct_c__SA_Elf64_Rel',
5449
- 'struct_c__SA_Elf64_Rela', 'struct_c__SA_Elf64_Shdr',
5450
- 'struct_c__SA_Elf64_Sym', 'struct_c__SA_Elf64_Syminfo',
5451
- 'struct_c__SA_Elf64_Verdaux', 'struct_c__SA_Elf64_Verdef',
5452
- 'struct_c__SA_Elf64_Vernaux', 'struct_c__SA_Elf64_Verneed',
5453
- 'struct_c__SA_Elf64_auxv_t', 'struct_c__SA_Elf_MIPS_ABIFlags_v0',
5454
- 'struct_c__SA_Elf_Options', 'struct_c__SA_Elf_Options_Hw',
5728
+ '_POSIX2_VERSION', '_POSIX_VERSION', '_STRING_H', '_SYSCALL_H',
5729
+ '_SYS_MMAN_H', '_UNISTD_H', '_XOPEN_ENH_I18N', '_XOPEN_LEGACY',
5730
+ '_XOPEN_UNIX', '_XOPEN_VERSION', '_XOPEN_XCU_VERSION',
5731
+ '_XOPEN_XPG2', '_XOPEN_XPG3', '_XOPEN_XPG4',
5732
+ '__ASM_GENERIC_MMAN_COMMON_H',
5733
+ '__GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION',
5734
+ '__POSIX2_THIS_VERSION', '__environ', '__getpgid', '__gid_t',
5735
+ '__gid_t_defined', '__intptr_t_defined', '__memcmpeq',
5736
+ '__mode_t_defined', '__need_NULL', '__need_size_t', '__off_t',
5737
+ '__off_t_defined', '__pid_t', '__pid_t_defined',
5738
+ '__socklen_t_defined', '__ssize_t_defined', '__stpcpy',
5739
+ '__stpncpy', '__strtok_r', '__uid_t', '__uid_t_defined',
5740
+ '__useconds_t', '__useconds_t_defined', '_exit', 'access', 'acct',
5741
+ 'alarm', 'brk', 'c__Ea_Val_GNU_MIPS_ABI_FP_ANY', 'chdir', 'chown',
5742
+ 'chroot', 'close', 'closefrom', 'confstr', 'crypt', 'daemon',
5743
+ 'dup', 'dup2', 'endusershell', 'execl', 'execle', 'execlp',
5744
+ 'execv', 'execve', 'execvp', 'explicit_bzero', 'faccessat',
5745
+ 'fchdir', 'fchown', 'fchownat', 'fdatasync', 'fexecve', 'fork',
5746
+ 'fpathconf', 'fsync', 'ftruncate', 'getcwd', 'getdomainname',
5747
+ 'getdtablesize', 'getegid', 'getentropy', 'geteuid', 'getgid',
5748
+ 'getgroups', 'gethostid', 'gethostname', 'getlogin', 'getlogin_r',
5749
+ 'getpagesize', 'getpass', 'getpgid', 'getpgrp', 'getpid',
5750
+ 'getppid', 'getsid', 'getuid', 'getusershell', 'getwd', 'gid_t',
5751
+ 'intptr_t', 'isatty', 'lchown', 'link', 'linkat', 'locale_t',
5752
+ 'lockf', 'lseek', 'madvise', 'memccpy', 'memchr', 'memcmp',
5753
+ 'memcpy', 'memmove', 'memset', 'mincore', 'mlock', 'mlockall',
5754
+ 'mmap', 'mode_t', 'mprotect', 'msync', 'munlock', 'munlockall',
5755
+ 'munmap', 'nice', 'off_t', 'pathconf', 'pause', 'pid_t', 'pipe',
5756
+ 'posix_madvise', 'pread', 'profil', 'pwrite', 'read', 'readlink',
5757
+ 'readlinkat', 'revoke', 'rmdir', 'sbrk', 'setdomainname',
5758
+ 'setegid', 'seteuid', 'setgid', 'sethostid', 'sethostname',
5759
+ 'setlogin', 'setpgid', 'setpgrp', 'setregid', 'setreuid',
5760
+ 'setsid', 'setuid', 'setusershell', 'shm_open', 'shm_unlink',
5761
+ 'size_t', 'sleep', 'socklen_t', 'ssize_t', 'stpcpy', 'stpncpy',
5762
+ 'strcat', 'strchr', 'strcmp', 'strcoll', 'strcoll_l', 'strcpy',
5763
+ 'strcspn', 'strdup', 'strerror', 'strerror_l', 'strerror_r',
5764
+ 'strlen', 'strncat', 'strncmp', 'strncpy', 'strndup', 'strnlen',
5765
+ 'strpbrk', 'strrchr', 'strsep', 'strsignal', 'strspn', 'strstr',
5766
+ 'strtok', 'strtok_r', 'struct___locale_data',
5767
+ 'struct___locale_struct', 'struct_c__SA_Elf32_Chdr',
5768
+ 'struct_c__SA_Elf32_Dyn', 'struct_c__SA_Elf32_Ehdr',
5769
+ 'struct_c__SA_Elf32_Lib', 'struct_c__SA_Elf32_Move',
5770
+ 'struct_c__SA_Elf32_Nhdr', 'struct_c__SA_Elf32_Phdr',
5771
+ 'struct_c__SA_Elf32_RegInfo', 'struct_c__SA_Elf32_Rel',
5772
+ 'struct_c__SA_Elf32_Rela', 'struct_c__SA_Elf32_Shdr',
5773
+ 'struct_c__SA_Elf32_Sym', 'struct_c__SA_Elf32_Syminfo',
5774
+ 'struct_c__SA_Elf32_Verdaux', 'struct_c__SA_Elf32_Verdef',
5775
+ 'struct_c__SA_Elf32_Vernaux', 'struct_c__SA_Elf32_Verneed',
5776
+ 'struct_c__SA_Elf32_auxv_t', 'struct_c__SA_Elf64_Chdr',
5777
+ 'struct_c__SA_Elf64_Dyn', 'struct_c__SA_Elf64_Ehdr',
5778
+ 'struct_c__SA_Elf64_Lib', 'struct_c__SA_Elf64_Move',
5779
+ 'struct_c__SA_Elf64_Nhdr', 'struct_c__SA_Elf64_Phdr',
5780
+ 'struct_c__SA_Elf64_Rel', 'struct_c__SA_Elf64_Rela',
5781
+ 'struct_c__SA_Elf64_Shdr', 'struct_c__SA_Elf64_Sym',
5782
+ 'struct_c__SA_Elf64_Syminfo', 'struct_c__SA_Elf64_Verdaux',
5783
+ 'struct_c__SA_Elf64_Verdef', 'struct_c__SA_Elf64_Vernaux',
5784
+ 'struct_c__SA_Elf64_Verneed', 'struct_c__SA_Elf64_auxv_t',
5785
+ 'struct_c__SA_Elf_MIPS_ABIFlags_v0', 'struct_c__SA_Elf_Options',
5786
+ 'struct_c__SA_Elf_Options_Hw',
5455
5787
  'struct_c__UA_Elf32_gptab_gt_entry',
5456
- 'struct_c__UA_Elf32_gptab_gt_header', 'symlink', 'symlinkat',
5457
- 'sync', 'syscall', 'sysconf', 'tcgetpgrp', 'tcsetpgrp',
5458
- 'truncate', 'ttyname', 'ttyname_r', 'ttyslot', 'ualarm', 'uid_t',
5459
- 'union_c__SA_Elf32_Dyn_d_un', 'union_c__SA_Elf32_auxv_t_a_un',
5460
- 'union_c__SA_Elf64_Dyn_d_un', 'union_c__SA_Elf64_auxv_t_a_un',
5461
- 'union_c__UA_Elf32_gptab', 'unlink', 'unlinkat', 'useconds_t',
5462
- 'usleep', 'vfork', 'vhangup', 'write']
5788
+ 'struct_c__UA_Elf32_gptab_gt_header', 'strxfrm', 'strxfrm_l',
5789
+ 'symlink', 'symlinkat', 'sync', 'syscall', 'sysconf', 'tcgetpgrp',
5790
+ 'tcsetpgrp', 'truncate', 'ttyname', 'ttyname_r', 'ttyslot',
5791
+ 'ualarm', 'uid_t', 'union_c__SA_Elf32_Dyn_d_un',
5792
+ 'union_c__SA_Elf32_auxv_t_a_un', 'union_c__SA_Elf64_Dyn_d_un',
5793
+ 'union_c__SA_Elf64_auxv_t_a_un', 'union_c__UA_Elf32_gptab',
5794
+ 'unlink', 'unlinkat', 'useconds_t', 'usleep', 'vfork', 'vhangup',
5795
+ 'write']