nbxtensor 0.1.5__tar.gz → 0.1.6__tar.gz

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 (369) hide show
  1. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/.gitignore +1 -1
  2. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/CHANGELOG.md +18 -0
  3. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/PKG-INFO +3 -3
  4. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/README.md +2 -2
  5. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/API.md +43 -2
  6. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/pyproject.toml +1 -1
  7. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/__init__.py +1 -1
  8. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/capabilities.py +1 -1
  9. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/device_facts.py +3 -1
  10. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/launcher.py +39 -62
  11. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/metal_device.py +5 -3
  12. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/runtime.py +9 -2
  13. nbxtensor-0.1.6/src/nbxtensor/device.py +79 -0
  14. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/itemsize.py +1 -1
  15. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/operands.py +4 -4
  16. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/outputs.py +11 -11
  17. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/policy.yml +1 -1
  18. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/io/constants.py +1 -1
  19. nbxtensor-0.1.6/src/nbxtensor/memory/__init__.py +126 -0
  20. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/allocator.py +130 -164
  21. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/deferred_frees.py +1 -1
  22. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/oom_advice.py +6 -2
  23. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/to_device_census.py +1 -1
  24. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/attention_wrappers.py +1 -1
  25. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/conv_wrappers.py +1 -1
  26. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/dispatch.py +12 -12
  27. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/elementwise_wrappers.py +4 -4
  28. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/index_wrappers.py +2 -2
  29. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/linalg_wrappers.py +5 -5
  30. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/norm_wrappers.py +1 -1
  31. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/shape_wrappers.py +5 -5
  32. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/spectral_wrappers.py +1 -1
  33. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/quant/quantized_tensor.py +2 -2
  34. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/tensor.py +2 -2
  35. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/tools/scatter_scan.py +2 -2
  36. nbxtensor-0.1.5/src/nbxtensor/memory/__init__.py +0 -41
  37. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/.github/PULL_REQUEST_TEMPLATE/certificate.md +0 -0
  38. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/.github/workflows/cla.yml +0 -0
  39. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/CONTRIBUTING.md +0 -0
  40. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/LICENSE +0 -0
  41. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/NOTICE +0 -0
  42. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/THIRD_PARTY_NOTICES.md +0 -0
  43. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/assets/logo.png +0 -0
  44. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/BACKENDS.md +0 -0
  45. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/api_undocumented.txt +0 -0
  46. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/certified-autotune-method.md +0 -0
  47. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/design/ALLOCATOR.md +0 -0
  48. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/design/COST.md +0 -0
  49. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/design/DESIGN.md +0 -0
  50. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/device_file_template.yml +0 -0
  51. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/device_keys.txt +0 -0
  52. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/history/INVENTORY.md +0 -0
  53. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/history/MIGRATION.md +0 -0
  54. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/history/migration_list.tsv +0 -0
  55. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/replay-recording-in-a-one-shot-request.md +0 -0
  56. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/tensor-cores-through-linear-layouts.md +0 -0
  57. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/docs/triton_cpu_install.md +0 -0
  58. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/__main__.py +0 -0
  59. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/__init__.py +0 -0
  60. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/cpu/__init__.py +0 -0
  61. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/cpu/blas.py +0 -0
  62. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/cpu/pool.py +0 -0
  63. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/cpu_backend.py +0 -0
  64. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/device_files.py +0 -0
  65. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/device_measure.py +0 -0
  66. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/device_names.py +0 -0
  67. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/amd/cdna.yml +0 -0
  68. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/amd/cdna2.yml +0 -0
  69. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/amd/cdna3.yml +0 -0
  70. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/amd/cdna4.yml +0 -0
  71. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/amd/rdna3.yml +0 -0
  72. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/amd/rdna4.yml +0 -0
  73. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m1.yml +0 -0
  74. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m1_max.yml +0 -0
  75. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m1_pro.yml +0 -0
  76. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m1_ultra.yml +0 -0
  77. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m2.yml +0 -0
  78. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m2_max.yml +0 -0
  79. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m2_pro.yml +0 -0
  80. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m2_ultra.yml +0 -0
  81. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m3.yml +0 -0
  82. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m3_max.yml +0 -0
  83. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m3_pro.yml +0 -0
  84. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m3_ultra.yml +0 -0
  85. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m4.yml +0 -0
  86. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m4_max.yml +0 -0
  87. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m4_pro.yml +0 -0
  88. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m5.yml +0 -0
  89. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m5_max.yml +0 -0
  90. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m5_pro.yml +0 -0
  91. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m5_ultra.yml +0 -0
  92. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_m6.yml +0 -0
  93. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/apple/apple_silicon.yml +0 -0
  94. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/arl_h.yml +0 -0
  95. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/arl_s.yml +0 -0
  96. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/bmg.yml +0 -0
  97. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/dg2.yml +0 -0
  98. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/lnl.yml +0 -0
  99. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/mtl.yml +0 -0
  100. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/ptl_h.yml +0 -0
  101. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/ptl_u.yml +0 -0
  102. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/pvc.yml +0 -0
  103. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/wcl.yml +0 -0
  104. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/intel/xe_lp.yml +0 -0
  105. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/nvidia/ampere.yml +0 -0
  106. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/nvidia/hopper.yml +0 -0
  107. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/devices/nvidia/volta.yml +0 -0
  108. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/faults.py +0 -0
  109. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/frozen_plan.py +0 -0
  110. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/host_memory.py +0 -0
  111. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/install_help.py +0 -0
  112. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/install_metal.py +0 -0
  113. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/install_steps.yml +0 -0
  114. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/launcher_contract.py +0 -0
  115. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/level_zero.py +0 -0
  116. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/level_zero_driver.py +0 -0
  117. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/libnames.py +0 -0
  118. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/metal_backend.py +0 -0
  119. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/metal_dispatch.py +0 -0
  120. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/process_memory.py +0 -0
  121. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/replay_graph.py +0 -0
  122. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/backend/triton_ext_driver.py +0 -0
  123. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/__init__.py +0 -0
  124. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/convert.py +0 -0
  125. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/dtypes.yml +0 -0
  126. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/nbx_dtype.py +0 -0
  127. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/policy.py +0 -0
  128. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/dtype/promotion.py +0 -0
  129. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/host.py +0 -0
  130. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/inspection.py +0 -0
  131. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/interop/__init__.py +0 -0
  132. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/interop/dlpack.py +0 -0
  133. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/io/__init__.py +0 -0
  134. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/io/read_rate.py +0 -0
  135. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/io/safetensors.py +0 -0
  136. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/arena.py +0 -0
  137. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/block_upload.py +0 -0
  138. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/device_memory.py +0 -0
  139. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/device_transfer.py +0 -0
  140. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/expert_slots.py +0 -0
  141. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/host_spill.py +0 -0
  142. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/kv_host_pages.py +0 -0
  143. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/kv_host_tier.py +0 -0
  144. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/kv_session.py +0 -0
  145. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/layout.py +0 -0
  146. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/memory_pool.py +0 -0
  147. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/metal.py +0 -0
  148. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/paged_kv.py +0 -0
  149. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/pages.py +0 -0
  150. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/pointer_tables.py +0 -0
  151. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/pool.py +0 -0
  152. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/shadow.py +0 -0
  153. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/slab.py +0 -0
  154. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/trace_replay.py +0 -0
  155. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/traces/sana-video-2b-720p.16g.2026-11-02.tsv +0 -0
  156. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/memory/vmm.py +0 -0
  157. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/__init__.py +0 -0
  158. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/_autotune_policy.py +0 -0
  159. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/_common.py +0 -0
  160. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/_configs.py +0 -0
  161. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/_cost.py +0 -0
  162. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/abs.py +0 -0
  163. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/adaptive_avg_pool2d.py +0 -0
  164. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/add.py +0 -0
  165. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/addcdiv.py +0 -0
  166. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/addcmul.py +0 -0
  167. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/addmv_op.py +0 -0
  168. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/addr.py +0 -0
  169. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/all_reduce.py +0 -0
  170. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/amax.py +0 -0
  171. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/any_reduce.py +0 -0
  172. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/arange_op.py +0 -0
  173. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/argmax.py +0 -0
  174. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/argmin.py +0 -0
  175. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/atan2.py +0 -0
  176. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/autotune_bucket.py +0 -0
  177. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/autotune_cache.py +0 -0
  178. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/autotune_certified.py +0 -0
  179. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/autotune_harness.py +0 -0
  180. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/autotune_refusals.py +0 -0
  181. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/autotune_settings.py +0 -0
  182. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/avg_pool2d.py +0 -0
  183. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/axis_slices.py +0 -0
  184. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/baddbmm_op.py +0 -0
  185. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/batch_norm.py +0 -0
  186. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/binary_strided.py +0 -0
  187. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/bitwise_and.py +0 -0
  188. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/bitwise_left_shift.py +0 -0
  189. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/bitwise_not.py +0 -0
  190. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/bitwise_or.py +0 -0
  191. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/bitwise_right_shift.py +0 -0
  192. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/bucketize.py +0 -0
  193. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/cat_op.py +0 -0
  194. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/celu.py +0 -0
  195. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/certified_index.py +0 -0
  196. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/clamp.py +0 -0
  197. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/clamp_min.py +0 -0
  198. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/conv2d.py +0 -0
  199. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/conv2d_m8n8k4.py +0 -0
  200. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/conv_depthwise2d.py +0 -0
  201. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/conv_transpose2d.py +0 -0
  202. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/copy.py +0 -0
  203. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/copy_op.py +0 -0
  204. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/cos.py +0 -0
  205. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/count_nonzero.py +0 -0
  206. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/cross_entropy.py +0 -0
  207. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/cummax.py +0 -0
  208. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/cummin.py +0 -0
  209. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/cumsum.py +0 -0
  210. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/decode_attn_vec.py +0 -0
  211. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/depthwise_conv2d.py +0 -0
  212. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/dequant_gemv.py +0 -0
  213. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/dft.py +0 -0
  214. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/div.py +0 -0
  215. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/dot_op.py +0 -0
  216. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/dropout.py +0 -0
  217. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/dtype_convert.py +0 -0
  218. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/elementwise_launch.py +0 -0
  219. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/elu.py +0 -0
  220. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/embedding.py +0 -0
  221. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/embedding_pool.py +0 -0
  222. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/eq.py +0 -0
  223. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/erf.py +0 -0
  224. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/exp.py +0 -0
  225. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/exp2.py +0 -0
  226. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/fft_op.py +0 -0
  227. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/fill_op.py +0 -0
  228. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/flash_attention.py +0 -0
  229. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/flash_attention_m8n8k4.py +0 -0
  230. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/flash_decode.py +0 -0
  231. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/flip_op.py +0 -0
  232. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/floor.py +0 -0
  233. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/full_op.py +0 -0
  234. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/fused_moe.py +0 -0
  235. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/fused_moe_m8n8k4.py +0 -0
  236. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/fused_upsample_conv.py +0 -0
  237. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/gather_op.py +0 -0
  238. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/ge.py +0 -0
  239. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/gelu.py +0 -0
  240. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/gemv_vec.py +0 -0
  241. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/glu.py +0 -0
  242. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/grid_sampler.py +0 -0
  243. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/group_norm_tiled.py +0 -0
  244. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/groupnorm.py +0 -0
  245. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/gt.py +0 -0
  246. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/hardsigmoid.py +0 -0
  247. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/hardswish.py +0 -0
  248. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/host_decode_partial.py +0 -0
  249. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/im2col.py +0 -0
  250. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/index_add.py +0 -0
  251. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/index_put_op.py +0 -0
  252. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/index_select.py +0 -0
  253. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/isfinite.py +0 -0
  254. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/isinf.py +0 -0
  255. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/isnan.py +0 -0
  256. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/launch_keys.py +0 -0
  257. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/launch_observer.py +0 -0
  258. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/layernorm.py +0 -0
  259. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/le.py +0 -0
  260. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/leaky_relu.py +0 -0
  261. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/lerp.py +0 -0
  262. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/linspace_op.py +0 -0
  263. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/log.py +0 -0
  264. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/log_sigmoid.py +0 -0
  265. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/logical_and.py +0 -0
  266. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/logical_not.py +0 -0
  267. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/logical_or.py +0 -0
  268. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/logical_xor.py +0 -0
  269. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/loss_wrappers.py +0 -0
  270. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/lt.py +0 -0
  271. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/masked_fill.py +0 -0
  272. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/matmul.py +0 -0
  273. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/matmul_m8n8k4.py +0 -0
  274. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/max_pool2d.py +0 -0
  275. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/max_pool3d.py +0 -0
  276. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/max_reduce.py +0 -0
  277. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/maximum.py +0 -0
  278. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/mean.py +0 -0
  279. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/min_reduce.py +0 -0
  280. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/minimum.py +0 -0
  281. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/mish.py +0 -0
  282. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/mma_m8n8k4.py +0 -0
  283. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/moe_align.py +0 -0
  284. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/moe_decode_vec.py +0 -0
  285. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/moe_device_residency.py +0 -0
  286. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/moe_fused.py +0 -0
  287. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/moe_multi_device.py +0 -0
  288. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/moe_wrappers.py +0 -0
  289. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/mse_loss.py +0 -0
  290. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/mul.py +0 -0
  291. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/nan_to_num.py +0 -0
  292. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/ne.py +0 -0
  293. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/neg.py +0 -0
  294. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/nllloss.py +0 -0
  295. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/nonzero.py +0 -0
  296. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/nonzero_op.py +0 -0
  297. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/ones_op.py +0 -0
  298. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/oracles/__init__.py +0 -0
  299. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/oracles/attention_fp64.py +0 -0
  300. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/oracles/conv2d_fp64.py +0 -0
  301. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/oracles/fp64.py +0 -0
  302. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/pad_op.py +0 -0
  303. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/paged_decode_attn.py +0 -0
  304. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/pixel_shuffle.py +0 -0
  305. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/pixel_unshuffle.py +0 -0
  306. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/pow.py +0 -0
  307. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/prod.py +0 -0
  308. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/rand_op.py +0 -0
  309. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/random_wrappers.py +0 -0
  310. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/reciprocal.py +0 -0
  311. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/reduction_wrappers.py +0 -0
  312. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/relu.py +0 -0
  313. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/remainder.py +0 -0
  314. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/repeat_interleave.py +0 -0
  315. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/repeat_op.py +0 -0
  316. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/residual_chain.py +0 -0
  317. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/rmsnorm.py +0 -0
  318. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/rope.py +0 -0
  319. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/rsqrt.py +0 -0
  320. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/scaled_softmax.py +0 -0
  321. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/scatter_op.py +0 -0
  322. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/screen_oracle.py +0 -0
  323. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/selu.py +0 -0
  324. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/sigmoid.py +0 -0
  325. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/silu.py +0 -0
  326. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/sin.py +0 -0
  327. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/softmax.py +0 -0
  328. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/softplus.py +0 -0
  329. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/sort_op.py +0 -0
  330. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/sqrt.py +0 -0
  331. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/stack_op.py +0 -0
  332. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/std.py +0 -0
  333. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/strided_copy.py +0 -0
  334. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/sub.py +0 -0
  335. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/sum.py +0 -0
  336. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/tan.py +0 -0
  337. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/tanh.py +0 -0
  338. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/threshold.py +0 -0
  339. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/tiles.py +0 -0
  340. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/tiling.yml +0 -0
  341. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/tiling_policy.py +0 -0
  342. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/tiling_sizes.py +0 -0
  343. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/token_bitmask.py +0 -0
  344. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/token_filters.py +0 -0
  345. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/topk.py +0 -0
  346. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/trace_op.py +0 -0
  347. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/tril.py +0 -0
  348. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/triu.py +0 -0
  349. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/unfold_op.py +0 -0
  350. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/unique_op.py +0 -0
  351. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/upsample_bilinear2d.py +0 -0
  352. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/upsample_nearest2d.py +0 -0
  353. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/upsample_nearest3d.py +0 -0
  354. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/var.py +0 -0
  355. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/vector_norm.py +0 -0
  356. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/weight_norm.py +0 -0
  357. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/where.py +0 -0
  358. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/wrappers.py +0 -0
  359. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/ops/zeros_op.py +0 -0
  360. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/quant/__init__.py +0 -0
  361. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/random/__init__.py +0 -0
  362. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/random/mt_randn.py +0 -0
  363. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/random/rng_pin.py +0 -0
  364. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/random/rng_stream.py +0 -0
  365. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/random/seeded_draw.py +0 -0
  366. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/shape/__init__.py +0 -0
  367. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/src/nbxtensor/terminal.py +0 -0
  368. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/tools/device_key_census.py +0 -0
  369. {nbxtensor-0.1.5 → nbxtensor-0.1.6}/tools/device_key_trace.py +0 -0
@@ -169,7 +169,7 @@ tests/integration/**/__pycache__/
169
169
  tests/nbxtensor_backend_conformance/**/__pycache__/
170
170
  tests/unit/**/*.pyc
171
171
  tests/integration/**/*.pyc
172
- !tests/regression/test_upscale_offtrace.py
172
+ !tests/regression/test_upscale_offbuild.py
173
173
  !tests/regression/pytest.ini
174
174
  # Unit tests — tracked explicitly (same policy as the regression harness).
175
175
  !tests/unit/
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.6] - 2026-11-13
11
+
12
+ ### Fixed
13
+ - A device the runtime refuses to describe is now an error, not a smaller machine: counting the devices answers 0
14
+ only when the host has no GPU runtime or the runtime says it has no device; a driver that fails raises
15
+ `DeviceQueryError` with its code. Choosing the device with the most free memory, and listing the devices, no
16
+ longer skip one that fails silently. Reading a device's free or total memory no longer answers 0, -1 or None for a
17
+ driver that refuses or a device the process does not see: it raises, so a broken card is never planned as an empty
18
+ one.
19
+
20
+ ### Added
21
+ - `nbxtensor.device`: the devices a process sees, the one it works on, the one the next kernel launch runs on, when
22
+ they drain and what each has free (`count`, `current`, `select`, `select_for_launch`, `synchronize`, `drain`,
23
+ `mem_info`, `most_free`).
24
+ - `nbxtensor.memory` answers the allocator's figures and the pool's controls by name (`memory_allocated`,
25
+ `pool_cached_bytes`, `peak_device_bytes`, `empty_cache_pool`, the held-memory windows and others): an application
26
+ no longer calls the allocator class for them.
27
+
10
28
  ## [0.1.5] - 2026-11-12
11
29
 
12
30
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: nbxtensor
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Run AI models without PyTorch: tensors, Triton kernels, planned memory and certified tuning, wherever Triton runs — NVIDIA, AMD, Intel and Apple GPUs.
5
5
  Project-URL: Homepage, https://github.com/NeuroBrix/nbxtensor
6
6
  Project-URL: Source, https://github.com/NeuroBrix/nbxtensor
@@ -326,11 +326,11 @@ assert p.replace(compute="bfloat16").compute == "bfloat16" # a policy
326
326
  An op's output dtype under a half compute dtype, when it computes in float32 inside (`nbxtensor.dtype.outputs`):
327
327
 
328
328
  ```python
329
- from nbxtensor.dtype.outputs import amp_fp32_output_dtype, traced_output_is_complex
329
+ from nbxtensor.dtype.outputs import amp_fp32_output_dtype, built_output_is_complex
330
330
 
331
331
  assert amp_fp32_output_dtype("bfloat16", "bfloat16", safe=False, narrowed=False) == "bfloat16" # follows the graph
332
332
  assert amp_fp32_output_dtype("float16", "float16", safe=False, narrowed=False) == "float32" # no contract: float32
333
- assert traced_output_is_complex({"output_dtypes": ["complex64"]}) # read from the graph's recorded output, never the op's name
333
+ assert built_output_is_complex({"output_dtypes": ["complex64"]}) # read from the graph's recorded output, never the op's name
334
334
  ```
335
335
 
336
336
  ### Array API: type promotion and Python scalars
@@ -303,11 +303,11 @@ assert p.replace(compute="bfloat16").compute == "bfloat16" # a policy
303
303
  An op's output dtype under a half compute dtype, when it computes in float32 inside (`nbxtensor.dtype.outputs`):
304
304
 
305
305
  ```python
306
- from nbxtensor.dtype.outputs import amp_fp32_output_dtype, traced_output_is_complex
306
+ from nbxtensor.dtype.outputs import amp_fp32_output_dtype, built_output_is_complex
307
307
 
308
308
  assert amp_fp32_output_dtype("bfloat16", "bfloat16", safe=False, narrowed=False) == "bfloat16" # follows the graph
309
309
  assert amp_fp32_output_dtype("float16", "float16", safe=False, narrowed=False) == "float32" # no contract: float32
310
- assert traced_output_is_complex({"output_dtypes": ["complex64"]}) # read from the graph's recorded output, never the op's name
310
+ assert built_output_is_complex({"output_dtypes": ["complex64"]}) # read from the graph's recorded output, never the op's name
311
311
  ```
312
312
 
313
313
  ### Array API: type promotion and Python scalars
@@ -115,8 +115,8 @@ def constant_load_dtype(traced: str, compute: str, stores_fp64: bool) -> str #
115
115
 
116
116
  ```python
117
117
  COMPLEX_DTYPE_NAMES = frozenset({"complex32", "complex64", "complex128", "chalf", "cfloat", "cdouble"})
118
- def traced_output_dtype_name(record: dict) -> Optional[str] # output_dtypes[0] at the record's top level, plain name
119
- def traced_output_is_complex(record: dict) -> bool # any recorded output dtype complex (never the op's name or inputs)
118
+ def built_output_dtype_name(record: dict) -> Optional[str] # output_dtypes[0] at the record's top level, plain name
119
+ def built_output_is_complex(record: dict) -> bool # any recorded output dtype complex (never the op's name or inputs)
120
120
  def amp_fp32_output_dtype(compute_dtype, graph_dtype, safe, narrowed, traced=None) -> str
121
121
  # the output of an op computed float32 inside a half forward: bfloat16 follows the graph dtype,
122
122
  # float16 narrows only under `safe` / `narrowed`; a float32 island recorded in the graph only under `narrowed`
@@ -135,6 +135,21 @@ def join_weights(held: dict, loaded: dict) -> dict # memory_pool.joi
135
135
  def pool_enabled() -> bool # pool.parks_freed_blocks
136
136
  def pool_parked_cap_bytes(vendor, architecture, total_bytes) -> int # pool.parked_cap_bytes
137
137
  def pool_fit_slack(vendor, architecture) -> float # pool.fit_slack
138
+ # the allocator's figures and the pool's controls, same arguments as `DeviceAllocator`'s (2026-11-13):
139
+ def memory_allocated(device_idx=None) -> int # live bytes handed out (None: every device)
140
+ def pool_cached_bytes(device_idx=None) -> int # bytes parked in the pool's free blocks
141
+ def blocks_in_use(device_idx=None) -> dict # {address: bytes} of the blocks tensors hold
142
+ def device_free_bytes(device_idx=None) -> int # the driver's free bytes (None: current device)
143
+ def device_total_bytes(device_idx=None) -> int # the device's total memory (refused: DeviceQueryError)
144
+ def free_memory_mb(index: int) -> float # the driver's free memory in MB (refused: DeviceQueryError)
145
+ def peak_device_bytes() -> Optional[int] # the most one device held at once since the start
146
+ def host_pinned_allocated() -> int # live pinned host bytes
147
+ def empty_cache_pool() -> int # the pool's parked blocks given back; bytes freed
148
+ def give_back_cached(dev: int) -> None # a card's cached free memory back to the driver
149
+ def open_window(device_idx: int) -> int # start watching what the process holds; a token
150
+ def window_start(token: int) -> Optional[int] # what was held when the window opened
151
+ def close_window(device_idx: int, token: int) -> Optional[int] # the most held since it opened; the window closed
152
+ def register_idle_reclaimer(reclaim) -> None # `reclaim(dev) -> bytes` when a malloc is refused
138
153
  ```
139
154
 
140
155
  `nbxtensor.memory.allocator`
@@ -3049,6 +3064,28 @@ class Capabilities: # one record per backend, today five dicts (nbx_ten
3049
3064
  nbxtensor.device.synchronize(device) nbxtensor.device.mem_info(device) -> (free: int, total: int)
3050
3065
  ```
3051
3066
 
3067
+ **In the library today (`nbxtensor/device.py`, the application's door; each name answers from
3068
+ `memory.allocator.DeviceAllocator`):**
3069
+
3070
+ ```python
3071
+ def count() -> int # devices this process sees
3072
+ def current() -> int # the runtime's current device
3073
+ def select(index: int) -> None # make `index` current (allocations, copies, synchronizations); refused by name
3074
+ def select_for_launch(index: int) -> None # current for the next kernel launch too (the launcher's context)
3075
+ def synchronize() -> None # the current device finished, through the interceptor in force
3076
+ def drain(index: Optional[int] = None) -> None # every stream of a device drained; the current device restored
3077
+ def mem_info(index: Optional[int] = None) -> Tuple[int, int] # (free, total) bytes, as the runtime reports them
3078
+ def most_free() -> int # the device with the most free memory; the current device restored
3079
+ class DeviceQueryError(RuntimeError) # a device question the runtime refused: the call, the device, its code
3080
+ NoGpuRuntime # (backend.runtime) no GPU runtime on this host: the one refusal meaning no device
3081
+ ```
3082
+
3083
+ No device is a fact, a refusal is an error: `count()` is 0 only on a host with no GPU runtime
3084
+ (`nbxtensor.backend.runtime.NoGpuRuntime`) or when the runtime answers its own "no device" code (the backend table's
3085
+ `no_device_rc`); any other refusal of a device question raises `DeviceQueryError` — the one-device memory reads
3086
+ included (`mem_info`, and `nbxtensor.memory`'s `free_memory_mb`, `device_free_bytes`, `device_total_bytes`: a device
3087
+ the process does not see, a refused selection or read, a failed restore of the current device).
3088
+
3052
3089
  `set_backend_has_fp64` and `declare_backend_capability` (nbx_tensor.py:420,519) mutate module globals
3053
3090
  today. In v1 the record is built once, when the backend is detected. A device's fp64 is a fact the
3054
3091
  backend states (Metal: none). It is not something the engine sets afterwards.
@@ -3152,6 +3189,10 @@ the engine and is passed in.
3152
3189
  `saturate_scalar` in `nbxtensor.dtype.convert`.
3153
3190
  3. **Dependency on the launcher (still open, 2026-11-02).** The `.dtype` change (section 4) needs the launcher to stop
3154
3191
  reading the Triton dtype off the argument (`backend/launcher.py` reads `arg.dtype` to bind and to key).
3192
+ 4. **Two device questions answered through a fallback — done (2026-11-13).** `DeviceAllocator.device_count`
3193
+ answered 0 for any failure of the runtime, and `most_free_device` / `visible_device_memory` skipped a device whose
3194
+ query failed and did not raise a failed restore. They now raise `DeviceQueryError`
3195
+ (nbxtensor/tests/test_a_device_question_the_runtime_refuses_is_raised_by_name.py).
3155
3196
 
3156
3197
  ## 11. The boundary: every host service is generic in the library or goes back to the engine (Hocine Benkelaya 29/10 16:28)
3157
3198
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "nbxtensor"
7
- version = "0.1.5"
7
+ version = "0.1.6"
8
8
  description = "Run AI models without PyTorch: tensors, Triton kernels, planned memory and certified tuning, wherever Triton runs — NVIDIA, AMD, Intel and Apple GPUs."
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
@@ -13,5 +13,5 @@ first publication is 0.0.1, each fix after it increments, the Rust rewrite is
13
13
  """
14
14
 
15
15
  #: the one version number; `pyproject.toml` states the same (tests/test_version.py)
16
- __version__ = "0.1.5"
16
+ __version__ = "0.1.6"
17
17
  __all__: list = []
@@ -66,7 +66,7 @@ _BACKEND_KERNELS_READ_DATA_PTR = {"cuda": True, "hip": True, "xpu": False, "meta
66
66
  # `TRITON_METAL_FP64_UNAVAILABLE`), so a kernel over a float64 buffer reads eight-byte
67
67
  # elements as four-byte ones. Measured 2026-09-28: `from_numpy(float64).to(bf16)` on the
68
68
  # M4 Pro gave 1 139 of 143 360 bits right and 3 255 non-finite values (the Sana 4K sincos
69
- # positional embedding, every off-trace size). A census says "not this time"; the door in
69
+ # positional embedding, every off-build size). A census says "not this time"; the door in
70
70
  # `NBXTensor.to` says "never": a cast from or to such a dtype is refused BY NAME there.
71
71
  #
72
72
  # The answer is the CALLER's to give (`set_backend_has_fp64`), not a table here: it is a fact
@@ -64,7 +64,9 @@ def device_memory_gb(device_idx: int) -> "int | None":
64
64
  if nbytes is None:
65
65
  if idx not in _MEASURED_MEMORY:
66
66
  from nbxtensor.memory.allocator import DeviceAllocator
67
- _MEASURED_MEMORY[idx] = int(DeviceAllocator.device_total_bytes(idx))
67
+ # no card visible at that index (the count is 0 without a runtime): None; a refused read rises
68
+ visible = idx < DeviceAllocator.device_count()
69
+ _MEASURED_MEMORY[idx] = int(DeviceAllocator.device_total_bytes(idx)) if visible else 0
68
70
  nbytes = _MEASURED_MEMORY[idx]
69
71
  return memory_gb(nbytes / (1 << 20)) if nbytes and nbytes > 0 else None
70
72
 
@@ -21,6 +21,7 @@ implement the same four calls behind the same `Driver` interface.
21
21
  """
22
22
  from __future__ import annotations
23
23
 
24
+ import contextlib
24
25
  import ctypes
25
26
  import os
26
27
 
@@ -1107,11 +1108,9 @@ def _forward_debug(kernel, options: Dict[str, Any]) -> None:
1107
1108
  global _DEBUG_KNOB
1108
1109
  if _DEBUG_KNOB is None:
1109
1110
  _DEBUG_KNOB = False
1110
- try:
1111
+ with contextlib.suppress(Exception):
1111
1112
  from triton import knobs
1112
1113
  _DEBUG_KNOB = bool(knobs.runtime.debug)
1113
- except Exception:
1114
- pass
1115
1114
  options["debug"] = bool(getattr(kernel, "debug", False)) or _DEBUG_KNOB
1116
1115
 
1117
1116
 
@@ -1172,7 +1171,7 @@ def prepare(kernel, args, kwargs) -> Tuple[_Prepared, Dict[str, Any]]:
1172
1171
  return prep, bound_args
1173
1172
 
1174
1173
 
1175
- _TRACE = os.environ.get("NBX_LAUNCH_TRACE") # a file: one line per launch, "<kernel>\t<grid>"
1174
+ _BUILD = os.environ.get("NBX_LAUNCH_TRACE") # a file: one line per launch, "<kernel>\t<grid>"
1176
1175
 
1177
1176
 
1178
1177
  # The decode replay (`neurobrix.triton.replay`) records one step's FINAL launches and
@@ -1205,8 +1204,8 @@ def launch(kernel, grid, *args, **kwargs):
1205
1204
  if not callable(grid) and 0 in tuple(int(g) for g in grid):
1206
1205
  return None
1207
1206
  prep, bound_args = prepare(kernel, args, kwargs)
1208
- if _TRACE:
1209
- with open(_TRACE, "a") as fh:
1207
+ if _BUILD:
1208
+ with open(_BUILD, "a") as fh:
1210
1209
  fh.write(f"{kernel.__name__}\t{grid if not callable(grid) else 'callable'}\n")
1211
1210
  if callable(grid):
1212
1211
  grid = grid(bound_args)
@@ -2068,11 +2067,9 @@ def screen_configs(tuner, configs, key, meta=None, record_key=None):
2068
2067
  return _screen_configs(tuner, configs, key, meta=meta,
2069
2068
  record_key=record_key)
2070
2069
  finally:
2071
- try:
2070
+ with contextlib.suppress(Exception): # a sweep must not fail on cleanup
2072
2071
  from nbxtensor.memory.allocator import DeviceAllocator
2073
2072
  DeviceAllocator.empty_cache_pool()
2074
- except Exception: # noqa: BLE001
2075
- pass # a sweep must not fail on cleanup
2076
2073
 
2077
2074
 
2078
2075
  def _screen_configs(tuner, configs, key, meta=None, record_key=None):
@@ -2485,17 +2482,10 @@ def install(force: Optional[bool] = None) -> bool:
2485
2482
 
2486
2483
  def do_bench(fn, warmup=25, rep=100, grad_to_none=None, quantiles=None, return_mode="mean", budget_ms=None,
2487
2484
  size_repetitions_by="repetition", **_):
2488
- """Same contract as `triton.testing.do_bench` (milliseconds; quantiles or
2489
- a mean/min/max), with the L2 flush and the timing done through the
2490
- engine's runtime (`DeviceAllocator`: events on the legacy stream).
2491
-
2492
- `size_repetitions_by`: "repetition" (the default: a run's first tuning of an uncertified key) sizes the count from
2493
- one whole repetition, flush and timing included, so `rep` is the time budget it is upstream; "kernel" sizes it from
2494
- the kernel's own time, the count a certification campaign has always used (offline, done once: its tables stay
2495
- comparable; the Orchestrateur, 2026-11-12)."""
2485
+ """`triton.testing.do_bench`'s contract (ms; quantiles or mean/min/max), flush and timing through the runtime.
2486
+ `size_repetitions_by`: "repetition" (a run's first tuning) or "kernel" (certification's count, kept comparable)."""
2496
2487
  if size_repetitions_by not in ("repetition", "kernel"):
2497
2488
  raise ValueError(f"size_repetitions_by={size_repetitions_by!r}: 'repetition' or 'kernel'")
2498
- import numpy as np
2499
2489
  from nbxtensor.memory.allocator import DeviceAllocator
2500
2490
  from nbxtensor.tensor import NBXTensor
2501
2491
  from nbxtensor.dtype.nbx_dtype import NBXDtype
@@ -2507,55 +2497,42 @@ def do_bench(fn, warmup=25, rep=100, grad_to_none=None, quantiles=None, return_m
2507
2497
  # would measure the swap, and a gate counting a different number from the
2508
2498
  # one actually allocated is a gate about nothing.
2509
2499
  flush = NBXTensor.empty((_BENCH_FLUSH_BYTES // 4,), dtype=NBXDtype.float32, device="cuda")
2510
- # ONE probing launch before the four that finish the estimate. The
2511
- # estimate used to be five blind launches -- so a pathologically slow
2512
- # candidate (2.5 min a launch was measured on a bf16 matmul sweep) cost
2513
- # five launches, >12 minutes, before any number existed. After a single
2514
- # launch its time IS known, and a candidate whose one launch exceeds the
2515
- # budget cannot win the sweep anyway; benching it further buys nothing.
2516
- #
2517
- # For a candidate under budget the arithmetic is unchanged: one launch
2518
- # plus four launches, and t_est is the mean of the five -- the same
2519
- # estimator, split across two event pairs instead of one.
2520
- if budget_ms is None:
2521
- # Triton's `_bench -> self.do_bench(kernel_call, quantiles=...)` chain
2522
- # is not ours to re-sign, so the sweep wrapper PUBLISHES the budget and
2523
- # this end consults it -- explicit coupling, documented at both ends.
2524
- try:
2525
- from nbxtensor.ops.autotune_refusals import current_budget_ms
2526
- budget_ms = current_budget_ms()
2527
- except Exception: # noqa: BLE001
2528
- budget_ms = None
2500
+ t_est = (_probe_within_budget(fn, budget_ms) + 4.0 * _time_ms(fn, 4)) / 5.0
2501
+ for _i in range(max(1, int(warmup / max(t_est, 1e-3)))):
2502
+ fn()
2503
+ times = np.asarray(_timed_repetitions(fn, lambda: DeviceAllocator.memset_cuda(flush.data_ptr(), 0, flush._nbytes),
2504
+ rep, t_est, size_repetitions_by), dtype=np.float64)
2505
+ if quantiles is not None:
2506
+ return [float(q) for q in np.quantile(times, quantiles)]
2507
+ return float(getattr(np, return_mode)(times)) if return_mode in ("mean", "min", "max", "median") else float(times.mean())
2508
+
2509
+
2510
+ def _probe_within_budget(fn, budget_ms):
2511
+ """ONE probing launch (ms) before the four that finish the estimate: five blind ones cost >12 min on a 2.5-min bf16
2512
+ candidate. The budget is the sweep wrapper's, PUBLISHED (Triton's `_bench` chain is not ours to re-sign)."""
2513
+ from nbxtensor.ops import autotune_refusals as refusals
2514
+ with contextlib.suppress(Exception):
2515
+ budget_ms = refusals.current_budget_ms() if budget_ms is None else budget_ms
2529
2516
  t_probe = _time_ms(fn, 1)
2530
2517
  if budget_ms is not None and t_probe > budget_ms:
2531
2518
  raise CandidateOverTimeBudget(t_probe, budget_ms)
2532
- try:
2533
- from nbxtensor.ops.autotune_refusals import note_candidate_time
2534
- note_candidate_time(t_probe)
2535
- except Exception: # noqa: BLE001
2536
- pass
2537
- t_est = (t_probe + 4.0 * _time_ms(fn, 4)) / 5.0
2538
- n_warmup = max(1, int(warmup / max(t_est, 1e-3)))
2539
- for _i in range(n_warmup):
2540
- fn()
2541
- # The repetitions are sized from what ONE costs, the flush and the timing included, so `rep` stays the time
2542
- # budget it is upstream. Sized from the kernel's time alone, a 0.01 ms kernel got 10 000 repetitions, each behind
2543
- # a 256 MB clear: a new user's first long request on Metal ran past 10 minutes (trial M of 0.6.13, 2026-11-12),
2544
- # once the launch stopped inflating that time.
2545
- import time as _wall
2546
- began = _wall.perf_counter()
2547
- DeviceAllocator.memset_cuda(flush.data_ptr(), 0, flush._nbytes)
2519
+ with contextlib.suppress(Exception):
2520
+ refusals.note_candidate_time(t_probe)
2521
+ return t_probe
2522
+
2523
+
2524
+ def _timed_repetitions(fn, clear, rep, t_est, by):
2525
+ """The timed repetitions behind the flush: by="repetition" sized from one whole repetition (`rep` a time budget; by
2526
+ the kernel alone, 10 000 x 256 MB clears: trial M of 0.6.13 > 10 min), by="kernel" certification's count."""
2527
+ import time
2528
+ began = time.perf_counter()
2529
+ clear()
2548
2530
  times = [_time_ms(fn, 1)]
2549
- one_ms = 1000.0 * (_wall.perf_counter() - began)
2550
- per = one_ms if size_repetitions_by == "repetition" else 0.0
2551
- n_repeat = max(1, int(rep / max(per, t_est, 1e-3)))
2552
- for _i in range(n_repeat - 1):
2553
- DeviceAllocator.memset_cuda(flush.data_ptr(), 0, flush._nbytes)
2531
+ per = 1000.0 * (time.perf_counter() - began) if by == "repetition" else 0.0
2532
+ for _i in range(max(1, int(rep / max(per, t_est, 1e-3))) - 1):
2533
+ clear()
2554
2534
  times.append(_time_ms(fn, 1))
2555
- times = np.asarray(times, dtype=np.float64)
2556
- if quantiles is not None:
2557
- return [float(q) for q in np.quantile(times, quantiles)]
2558
- return float(getattr(np, return_mode)(times)) if return_mode in ("mean", "min", "max", "median") else float(times.mean())
2535
+ return times
2559
2536
 
2560
2537
 
2561
2538
  class CandidateOverTimeBudget(Exception):
@@ -1177,14 +1177,16 @@ def runtime() -> MetalRuntime:
1177
1177
  (shapes, dtypes, block sizes, all data), and must touch no device; a
1178
1178
  path that reaches for the real Metal device inside a shadow is one the
1179
1179
  census does not cover, and it fails LOUDLY here rather than succeeding in
1180
- silence on the one card an Apple host always has. `device_count()` reads
1181
- 0 through this (its own except path), so the census gate passes; the
1180
+ silence on the one card an Apple host always has. The refusal is
1181
+ `NoGpuRuntime` (this process has, by declaration, no device), so
1182
+ `device_count()` reads 0 and the census gate passes; the
1182
1183
  backend NAME still resolves via NBX_GPU_BACKEND=metal, which needs no
1183
1184
  device (`_pin_triton_backend`).
1184
1185
  """
1185
1186
  import os as _os_c
1186
1187
  if _os_c.environ.get("NBX_CENSUS") == "1":
1187
- raise RuntimeError(
1188
+ from nbxtensor.backend.runtime import NoGpuRuntime
1189
+ raise NoGpuRuntime(
1188
1190
  "census shadow: the Metal device is deliberately unreachable "
1189
1191
  "(NBX_CENSUS=1). Key formation is pure data and needs no device; "
1190
1192
  "a path that opened the Metal runtime here is uncovered by the "
@@ -67,6 +67,7 @@ _GPU_BACKENDS = {
67
67
  "set_device": "cudaSetDevice",
68
68
  "get_last_error": "cudaGetLastError", "get_device": "cudaGetDevice",
69
69
  "device_count": "cudaGetDeviceCount",
70
+ "no_device_rc": 100, # cudaErrorNoDevice: the runtime is there, no device is (a fact, not a failure)
70
71
  "mem_get_info": "cudaMemGetInfo",
71
72
  "sync": "cudaDeviceSynchronize",
72
73
  "malloc_host": "cudaMallocHost", "free_host": "cudaFreeHost",
@@ -120,6 +121,7 @@ _GPU_BACKENDS = {
120
121
  "set_device": "hipSetDevice",
121
122
  "get_last_error": "hipGetLastError", "get_device": "hipGetDevice",
122
123
  "device_count": "hipGetDeviceCount",
124
+ "no_device_rc": 100, # hipErrorNoDevice: the runtime is there, no device is (a fact, not a failure)
123
125
  "mem_get_info": "hipMemGetInfo",
124
126
  "sync": "hipDeviceSynchronize",
125
127
  "malloc_host": "hipHostMalloc", "free_host": "hipHostFree",
@@ -282,6 +284,11 @@ def _pin_triton_backend(name: str) -> str:
282
284
  return name
283
285
 
284
286
 
287
+ class NoGpuRuntime(RuntimeError):
288
+ """No GPU runtime on this host: no vendor runtime library loads and no device probe answers. A fact (the host has no
289
+ GPU to work on), told apart from a runtime that is there and refuses a question."""
290
+
291
+
285
292
  @functools.lru_cache(maxsize=1)
286
293
  def gpu_backend() -> str:
287
294
  """Detect GPU backend: 'cuda', 'hip' or 'metal' — from the vendor runtime
@@ -350,7 +357,7 @@ def gpu_backend() -> str:
350
357
  if getattr(importlib.import_module(module), function)():
351
358
  return _pin_triton_backend(name)
352
359
  from nbxtensor.backend.install_help import no_runtime_message
353
- raise RuntimeError(no_runtime_message())
360
+ raise NoGpuRuntime(no_runtime_message())
354
361
 
355
362
 
356
363
  def device_label(tensor) -> str:
@@ -441,7 +448,7 @@ def gpu_runtime():
441
448
  return ctypes.cdll.LoadLibrary(lib)
442
449
  except OSError:
443
450
  continue
444
- raise RuntimeError(f"GPU runtime not found for {name}")
451
+ raise NoGpuRuntime(f"GPU runtime not found for {name}")
445
452
 
446
453
 
447
454
  def device_memory():
@@ -0,0 +1,79 @@
1
+ """The devices: how many the process sees, the one it works on, the one the next launch runs on, when they drain, and
2
+ what each has free (docs/API.md section 5). The application's door to them: each name answers from the module that
3
+ holds the mechanism (`memory.allocator.DeviceAllocator` and the runtime table it reads), so an application never
4
+ reaches into the allocator for a device question.
5
+
6
+ Indexes are the runtime's ordinals (0, 1, ...). A refusal of the runtime is raised with its own message, never
7
+ replaced by a default.
8
+ """
9
+ from typing import Optional, Tuple
10
+
11
+ __all__ = ["count", "current", "select", "select_for_launch", "synchronize", "drain", "mem_info", "most_free",
12
+ "DeviceQueryError", "NoGpuRuntime"]
13
+
14
+
15
+ def __getattr__(name):
16
+ """`DeviceQueryError` (the refusal a device question raises) and `NoGpuRuntime` (no GPU runtime on this host),
17
+ read from their modules only when asked: importing the door loads no device runtime."""
18
+ if name == "DeviceQueryError":
19
+ from nbxtensor.memory.allocator import DeviceQueryError
20
+ return DeviceQueryError
21
+ if name == "NoGpuRuntime": # a host with no GPU runtime: the one refusal that means "no device"
22
+ from nbxtensor.backend.runtime import NoGpuRuntime
23
+ return NoGpuRuntime
24
+ raise AttributeError(f"module 'nbxtensor.device' has no attribute {name!r}")
25
+
26
+
27
+ def _allocator():
28
+ from nbxtensor.memory.allocator import DeviceAllocator
29
+ return DeviceAllocator
30
+
31
+
32
+ def count() -> int:
33
+ """How many devices this process can see (`DeviceAllocator.device_count`): 0 on a host with no GPU runtime or when
34
+ the runtime says it has no device; any other refusal of the runtime raises `DeviceQueryError` with its code."""
35
+ return _allocator().device_count()
36
+
37
+
38
+ def current() -> int:
39
+ """The device the runtime works on now (`DeviceAllocator.get_device`)."""
40
+ return _allocator().get_device()
41
+
42
+
43
+ def select(index: int) -> None:
44
+ """Make `index` the runtime's current device for what follows: allocations, copies, synchronizations. An ordinal
45
+ the process cannot see is refused by name (`DeviceAllocator.set_device`). The kernel launcher's own context is
46
+ not touched: `select_for_launch` does that."""
47
+ _allocator().set_device(index)
48
+
49
+
50
+ def select_for_launch(index: int) -> None:
51
+ """Make `index` current for the next kernel launch too (the runtime and the launcher's context; a no-op when it
52
+ already is: `DeviceAllocator.ensure_triton_device`)."""
53
+ _allocator().ensure_triton_device(index)
54
+
55
+
56
+ def synchronize() -> None:
57
+ """Wait until the current device has finished all it was given, through the interceptor in force if one is
58
+ installed (`DeviceAllocator.sync_device`); a device's earlier failure surfaces here, raised."""
59
+ _allocator().sync_device()
60
+
61
+
62
+ def drain(index: Optional[int] = None) -> None:
63
+ """Wait until every stream of device `index` (None: the current one) has drained; the current device is restored
64
+ after (`DeviceAllocator.device_synchronize`)."""
65
+ _allocator().device_synchronize(index)
66
+
67
+
68
+ def mem_info(index: Optional[int] = None) -> Tuple[int, int]:
69
+ """(free, total) bytes of device `index` (None: the current one), as the runtime reports them
70
+ (`DeviceAllocator.mem_get_info`). On Metal, total is the recommended working set: never read total - free as
71
+ the process's footprint."""
72
+ return _allocator().mem_get_info(index)
73
+
74
+
75
+ def most_free() -> int:
76
+ """The device with the most free memory as the runtime reports it; the current device is restored after
77
+ (`DeviceAllocator.most_free_device`). A device the runtime refuses to describe, or a failed restore, raises
78
+ `DeviceQueryError` naming it."""
79
+ return _allocator().most_free_device()
@@ -5,7 +5,7 @@ engine branches read it here.
5
5
 
6
6
  Torch-free and numpy-free, at import and at execution.
7
7
 
8
- A dtype is named as the code passes it today: a name ("float16"), a torch spelling ("torch.float16", as a traced
8
+ A dtype is named as the code passes it today: a name ("float16"), a torch spelling ("torch.float16", as a built
9
9
  graph writes some — read as text, torch is never imported), or an enum member read by its NAME (NBXDtype is an IntEnum,
10
10
  and `str()` of one is its bare number on Python 3.11+ — never parsed). A name the table does not carry is refused by
11
11
  name, never given a width.
@@ -146,13 +146,13 @@ def matrix_unit_split_scale(unit: dict) -> tuple:
146
146
  return int(fi.maxexp) - 2, int(fi.nmant) + 1
147
147
 
148
148
 
149
- def constant_load_dtype(traced: str, compute: str, stores_fp64: bool) -> str:
149
+ def constant_load_dtype(built: str, compute: str, stores_fp64: bool) -> str:
150
150
  """The dtype (a name) an embedded graph constant is bound in by the Triton engines
151
151
  (`GraphExecutor._load_constant_triton`): a bfloat16 constant is decoded to the compute dtype
152
152
  when that is half (fp16 bits from bf16 on hardware computing fp16, the bf16 bits kept under
153
153
  bf16), to float32 otherwise; float64 / complex128 are held as the branch holds them
154
- (`dtype.itemsize.storage_dtype`); every other dtype is kept as traced. The loader and Prism's width
154
+ (`dtype.itemsize.storage_dtype`); every other dtype is kept as built. The loader and Prism's width
155
155
  pass both ask it."""
156
- if traced == "bfloat16":
156
+ if built == "bfloat16":
157
157
  return compute if compute in ("float16", "bfloat16") else "float32"
158
- return _itemsize.storage_dtype(traced, stores_fp64)
158
+ return _itemsize.storage_dtype(built, stores_fp64)
@@ -1,4 +1,4 @@
1
- """The output dtype of an op (DESIGN rule 12: the mechanism in the library): read from the op's traced record, or
1
+ """The output dtype of an op (DESIGN rule 12: the mechanism in the library): read from the op's built record, or
2
2
  decided by the cast-back rule of an op computed in float32 inside a half forward. Pure functions of dtype names and of
3
3
  a plain dict; the one definition every engine imports (an engine holding torch dtypes, NBXDtype or strings reads the
4
4
  same answer: only the last dotted segment of a dtype's name is read).
@@ -7,7 +7,7 @@ from __future__ import annotations
7
7
 
8
8
  from typing import Any, Dict, FrozenSet, Optional
9
9
 
10
- __all__ = ["COMPLEX_DTYPE_NAMES", "traced_output_dtype_name", "traced_output_is_complex", "amp_fp32_output_dtype"]
10
+ __all__ = ["COMPLEX_DTYPE_NAMES", "built_output_dtype_name", "built_output_is_complex", "amp_fp32_output_dtype"]
11
11
 
12
12
  COMPLEX_DTYPE_NAMES: FrozenSet[str] = frozenset({"complex32", "complex64", "complex128", "chalf", "cfloat", "cdouble"})
13
13
  _GRAPH_FLOAT_NAMES: FrozenSet[str] = frozenset({"float16", "bfloat16", "float32", "float64"})
@@ -18,8 +18,8 @@ def _name(dtype) -> str:
18
18
  return str(dtype).rsplit(".", 1)[-1]
19
19
 
20
20
 
21
- def traced_output_dtype_name(record: Optional[Dict[str, Any]]) -> Optional[str]:
22
- """The plain name of the op's first traced output dtype (`output_dtypes[0]` at the record's TOP level), or None
21
+ def built_output_dtype_name(record: Optional[Dict[str, Any]]) -> Optional[str]:
22
+ """The plain name of the op's first built output dtype (`output_dtypes[0]` at the record's TOP level), or None
23
23
  when the record states none."""
24
24
  if not isinstance(record, dict):
25
25
  return None
@@ -27,10 +27,10 @@ def traced_output_dtype_name(record: Optional[Dict[str, Any]]) -> Optional[str]:
27
27
  return _name(dts[0]) if dts else None
28
28
 
29
29
 
30
- def traced_output_is_complex(record: Optional[Dict[str, Any]]) -> bool:
31
- """True when the op's traced record types an output complex.
30
+ def built_output_is_complex(record: Optional[Dict[str, Any]]) -> bool:
31
+ """True when the op's built record types an output complex.
32
32
 
33
- The traced OUTPUT dtype is the only signal: an op's name cannot answer (a plain `mul` by the scalar `1j` produces
33
+ The built OUTPUT dtype is the only signal: an op's name cannot answer (a plain `mul` by the scalar `1j` produces
34
34
  complex), nor can its inputs (that scalar is no input tensor). It matters because a half input at a
35
35
  complex-producing op yields complex32, which `exp`, `angle` and the inverse real FFT have no kernel for. Only
36
36
  `output_dtypes` at the record's TOP level is read: a nested `attributes` dict reads as "not complex"."""
@@ -40,15 +40,15 @@ def traced_output_is_complex(record: Optional[Dict[str, Any]]) -> bool:
40
40
 
41
41
 
42
42
  def amp_fp32_output_dtype(compute_dtype: str, graph_dtype: Optional[str], safe: bool,
43
- narrowed: bool, traced: Optional[str] = None) -> str:
43
+ narrowed: bool, built: Optional[str] = None) -> str:
44
44
  """The OUTPUT dtype (a name) of an op computed in float32 inside under the half compute dtype `compute_dtype`.
45
45
 
46
- * bfloat16 on a bfloat16 graph (`graph_dtype`, the dtype the model was traced in): bfloat16 — a float32 result
46
+ * bfloat16 on a bfloat16 graph (`graph_dtype`, the dtype the model was built in): bfloat16 — a float32 result
47
47
  always fits bfloat16's range, and the model's own forward returns its input's dtype there.
48
48
  * bfloat16 on a graph of another floating dtype (a float32 model computed in bfloat16): float32, the dtype the
49
49
  model's forward returned. A graph dtype that is no floating dtype is refused by name.
50
50
  * float16: float16 only under the precision contract — `safe` (narrows every such op) or `narrowed` (this op is
51
- in the narrowed set); float32 otherwise. An op `traced` in float32 inside a half graph is the model's own
51
+ in the narrowed set); float32 otherwise. An op `built` in float32 inside a half graph is the model's own
52
52
  float32 island: only `narrowed` brings it to float16, never `safe`."""
53
53
  if compute_dtype == "bfloat16":
54
54
  if graph_dtype not in _GRAPH_FLOAT_NAMES:
@@ -57,7 +57,7 @@ def amp_fp32_output_dtype(compute_dtype: str, graph_dtype: Optional[str], safe:
57
57
  f"{graph_dtype!r} is none of {sorted(_GRAPH_FLOAT_NAMES)} — the container's graph must state it")
58
58
  return "bfloat16" if graph_dtype == "bfloat16" else "float32"
59
59
  if compute_dtype == "float16":
60
- if traced == "float32" and graph_dtype in _HALF_GRAPH_NAMES:
60
+ if built == "float32" and graph_dtype in _HALF_GRAPH_NAMES:
61
61
  return "float16" if narrowed else "float32"
62
62
  return "float16" if (safe or narrowed) else "float32"
63
63
  raise ValueError(f"amp_fp32_output_dtype: compute dtype {compute_dtype!r} is not a half dtype — the cast-back "
@@ -1,6 +1,6 @@
1
1
  # The default precision policy's op classes (nbxtensor.dtype.policy, DESIGN rule 12): which ops compute in float32
2
2
  # whatever the policy's compute dtype, which ones compute in it, which ones take the widest of their inputs. An op in
3
- # no class keeps its inputs' dtypes (promoted among them). Op names are ATen's base names, the spelling a traced graph
3
+ # no class keeps its inputs' dtypes (promoted among them). Op names are ATen's base names, the spelling a built graph
4
4
  # carries.
5
5
  #
6
6
  # Source: PyTorch's autocast tables (aten/src/ATen/autocast_mode.h: AT_FORALL_FP32, AT_FORALL_FP32_SET_OPT_DTYPE,
@@ -1,6 +1,6 @@
1
1
  """A graph constant's stored bytes as the host array a tensor is built from — no tensor library opens them.
2
2
 
3
- A traced graph embeds its small constants (a rotary table, a window, a frequency grid) as the archive `torch.save`
3
+ A built graph embeds its small constants (a rotary table, a window, a frequency grid) as the archive `torch.save`
4
4
  writes: a ZIP whose `archive/data/<n>` members are the raw storages. `archived_storage` reads the first storage out of
5
5
  it; `constant_array` turns stored bytes into the array the device receives, in the dtype the engine binds the
6
6
  constant in (`dtype.operands.constant_load_dtype`).