nbxtensor 0.1.6__tar.gz → 0.1.7__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.
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/CHANGELOG.md +101 -83
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/PKG-INFO +1 -1
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/API.md +47 -3
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/pyproject.toml +1 -1
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/__init__.py +1 -1
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/outputs.py +10 -3
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/inspection.py +8 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/interop/__init__.py +2 -1
- nbxtensor-0.1.7/src/nbxtensor/interop/handoff.py +24 -0
- nbxtensor-0.1.7/src/nbxtensor/io/mapped_shards.py +65 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/io/safetensors.py +9 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/__init__.py +15 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/allocator.py +13 -6
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/host_spill.py +6 -1
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/kv_host_pages.py +4 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/kv_host_tier.py +7 -5
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/memory_pool.py +38 -0
- nbxtensor-0.1.7/src/nbxtensor/memory/slot_stores.py +35 -0
- nbxtensor-0.1.7/src/nbxtensor/memory/step_stabilizer.py +87 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/.github/PULL_REQUEST_TEMPLATE/certificate.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/.github/workflows/cla.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/.gitignore +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/CONTRIBUTING.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/LICENSE +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/NOTICE +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/README.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/THIRD_PARTY_NOTICES.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/assets/logo.png +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/BACKENDS.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/api_undocumented.txt +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/certified-autotune-method.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/design/ALLOCATOR.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/design/COST.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/design/DESIGN.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/device_file_template.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/device_keys.txt +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/history/INVENTORY.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/history/MIGRATION.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/history/migration_list.tsv +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/replay-recording-in-a-one-shot-request.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/tensor-cores-through-linear-layouts.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/docs/triton_cpu_install.md +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/__main__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/capabilities.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/cpu/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/cpu/blas.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/cpu/pool.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/cpu_backend.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/device_facts.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/device_files.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/device_measure.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/device_names.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/amd/cdna.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/amd/cdna2.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/amd/cdna3.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/amd/cdna4.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/amd/rdna3.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/amd/rdna4.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m1.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m1_max.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m1_pro.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m1_ultra.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m2.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m2_max.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m2_pro.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m2_ultra.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m3.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m3_max.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m3_pro.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m3_ultra.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m4.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m4_max.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m4_pro.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m5.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m5_max.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m5_pro.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m5_ultra.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_m6.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/apple/apple_silicon.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/arl_h.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/arl_s.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/bmg.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/dg2.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/lnl.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/mtl.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/ptl_h.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/ptl_u.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/pvc.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/wcl.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/intel/xe_lp.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/nvidia/ampere.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/nvidia/hopper.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/devices/nvidia/volta.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/faults.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/frozen_plan.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/host_memory.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/install_help.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/install_metal.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/install_steps.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/launcher.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/launcher_contract.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/level_zero.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/level_zero_driver.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/libnames.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/metal_backend.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/metal_device.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/metal_dispatch.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/process_memory.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/replay_graph.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/runtime.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/backend/triton_ext_driver.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/device.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/convert.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/dtypes.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/itemsize.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/nbx_dtype.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/operands.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/policy.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/policy.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/dtype/promotion.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/host.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/interop/dlpack.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/io/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/io/constants.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/io/read_rate.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/arena.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/block_upload.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/deferred_frees.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/device_memory.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/device_transfer.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/expert_slots.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/kv_session.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/layout.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/metal.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/oom_advice.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/paged_kv.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/pages.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/pointer_tables.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/pool.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/shadow.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/slab.py +2 -2
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/to_device_census.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/trace_replay.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/traces/sana-video-2b-720p.16g.2026-11-02.tsv +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/memory/vmm.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/_autotune_policy.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/_common.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/_configs.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/_cost.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/abs.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/adaptive_avg_pool2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/add.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/addcdiv.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/addcmul.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/addmv_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/addr.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/all_reduce.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/amax.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/any_reduce.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/arange_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/argmax.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/argmin.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/atan2.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/attention_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/autotune_bucket.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/autotune_cache.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/autotune_certified.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/autotune_harness.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/autotune_refusals.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/autotune_settings.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/avg_pool2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/axis_slices.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/baddbmm_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/batch_norm.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/binary_strided.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/bitwise_and.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/bitwise_left_shift.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/bitwise_not.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/bitwise_or.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/bitwise_right_shift.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/bucketize.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/cat_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/celu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/certified_index.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/clamp.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/clamp_min.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/conv2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/conv2d_m8n8k4.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/conv_depthwise2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/conv_transpose2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/conv_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/copy.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/copy_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/cos.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/count_nonzero.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/cross_entropy.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/cummax.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/cummin.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/cumsum.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/decode_attn_vec.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/depthwise_conv2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/dequant_gemv.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/dft.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/dispatch.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/div.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/dot_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/dropout.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/dtype_convert.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/elementwise_launch.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/elementwise_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/elu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/embedding.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/embedding_pool.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/eq.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/erf.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/exp.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/exp2.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/fft_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/fill_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/flash_attention.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/flash_attention_m8n8k4.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/flash_decode.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/flip_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/floor.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/full_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/fused_moe.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/fused_moe_m8n8k4.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/fused_upsample_conv.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/gather_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/ge.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/gelu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/gemv_vec.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/glu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/grid_sampler.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/group_norm_tiled.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/groupnorm.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/gt.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/hardsigmoid.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/hardswish.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/host_decode_partial.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/im2col.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/index_add.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/index_put_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/index_select.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/index_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/isfinite.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/isinf.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/isnan.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/launch_keys.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/launch_observer.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/layernorm.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/le.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/leaky_relu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/lerp.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/linalg_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/linspace_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/log.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/log_sigmoid.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/logical_and.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/logical_not.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/logical_or.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/logical_xor.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/loss_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/lt.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/masked_fill.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/matmul.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/matmul_m8n8k4.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/max_pool2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/max_pool3d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/max_reduce.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/maximum.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/mean.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/min_reduce.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/minimum.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/mish.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/mma_m8n8k4.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/moe_align.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/moe_decode_vec.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/moe_device_residency.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/moe_fused.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/moe_multi_device.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/moe_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/mse_loss.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/mul.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/nan_to_num.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/ne.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/neg.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/nllloss.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/nonzero.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/nonzero_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/norm_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/ones_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/oracles/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/oracles/attention_fp64.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/oracles/conv2d_fp64.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/oracles/fp64.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/pad_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/paged_decode_attn.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/pixel_shuffle.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/pixel_unshuffle.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/pow.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/prod.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/rand_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/random_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/reciprocal.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/reduction_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/relu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/remainder.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/repeat_interleave.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/repeat_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/residual_chain.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/rmsnorm.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/rope.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/rsqrt.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/scaled_softmax.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/scatter_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/screen_oracle.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/selu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/shape_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/sigmoid.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/silu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/sin.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/softmax.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/softplus.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/sort_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/spectral_wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/sqrt.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/stack_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/std.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/strided_copy.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/sub.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/sum.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/tan.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/tanh.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/threshold.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/tiles.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/tiling.yml +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/tiling_policy.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/tiling_sizes.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/token_bitmask.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/token_filters.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/topk.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/trace_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/tril.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/triu.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/unfold_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/unique_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/upsample_bilinear2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/upsample_nearest2d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/upsample_nearest3d.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/var.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/vector_norm.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/weight_norm.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/where.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/wrappers.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/ops/zeros_op.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/quant/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/quant/quantized_tensor.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/random/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/random/mt_randn.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/random/rng_pin.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/random/rng_stream.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/random/seeded_draw.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/shape/__init__.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/tensor.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/src/nbxtensor/terminal.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/tools/device_key_census.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/tools/device_key_trace.py +0 -0
- {nbxtensor-0.1.6 → nbxtensor-0.1.7}/tools/scatter_scan.py +0 -0
|
@@ -7,15 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.7] - 2026-11-13
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- `nbxtensor.dtype.outputs.amp_fp32_output_dtype`: under float16 compute on a graph built wider than half (float32,
|
|
14
|
+
float64), an op computed in float32 inside stores float32 unless the record narrows it; the range contract (`safe`)
|
|
15
|
+
narrows half graphs only, as the bfloat16 rule already keeps a float32 model's float32 outputs.
|
|
16
|
+
- `nbxtensor.memory.kv_host_tier.host_tier_pages(budget_bytes, num_layers, k_page_bytes, v_page_bytes)` takes a
|
|
17
|
+
page's parts and sizes the page itself.
|
|
18
|
+
- A decode step that stabilizes its allocations serves them from one recycled `StepSlab` from its first stabilized run.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- `nbxtensor.memory.weight_arenas()`: a weight set's memory, counted per device and in page-locked host memory,
|
|
22
|
+
allocated once and pinned once its host weights are written.
|
|
23
|
+
- `nbxtensor.io.safetensors.mapped_view`: a host tensor over a weight's bytes inside a read-only mapped file, no byte
|
|
24
|
+
copied.
|
|
25
|
+
- `nbxtensor.io.mapped_shards`: weight files mapped once each, the spans host views are built over, and the pages of a
|
|
26
|
+
view's span given back once its bytes are copied to the device (`ShardMaps`, `drop_pages`).
|
|
27
|
+
- `nbxtensor.memory.slot_store`, `end_store_request`, `release_store`: a compiled sequence's slot memory and its
|
|
28
|
+
request and unload lifecycle, with `store_held_bytes` and `store_contents` for diagnostics.
|
|
29
|
+
- `nbxtensor.memory.step_stabilizer.StepStabilizer`: a decoding sequence's step slab over its first runs (pass through,
|
|
30
|
+
measure, then carve from one recycled slab), ticked once per run.
|
|
31
|
+
- `nbxtensor.memory.host_spill.spill_bytes_per_position`: the host bytes one spilled KV position costs, for a server
|
|
32
|
+
that sizes its reach before any spill exists; `HostPages.nbytes()`: the host bytes its slices hold.
|
|
33
|
+
- `nbxtensor.inspection.label`: a tensor as a diagnostic line names it (shape, dtype, device and the object's id).
|
|
34
|
+
- `nbxtensor.interop.copy_to_address` and `host_bytes`: a tensor's values handed to another array library, into its
|
|
35
|
+
own device buffer or as host bytes in C order.
|
|
36
|
+
|
|
10
37
|
## [0.1.6] - 2026-11-13
|
|
11
38
|
|
|
12
|
-
|
|
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.
|
|
39
|
+
A device and memory API that names every answer of the GPU runtime, refusals included.
|
|
19
40
|
|
|
20
41
|
### Added
|
|
21
42
|
- `nbxtensor.device`: the devices a process sees, the one it works on, the one the next kernel launch runs on, when
|
|
@@ -23,28 +44,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
23
44
|
`mem_info`, `most_free`).
|
|
24
45
|
- `nbxtensor.memory` answers the allocator's figures and the pool's controls by name (`memory_allocated`,
|
|
25
46
|
`pool_cached_bytes`, `peak_device_bytes`, `empty_cache_pool`, the held-memory windows and others): an application
|
|
26
|
-
|
|
47
|
+
calls these names, not the allocator class.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- Every device answer is exact or a named error. Counting the devices answers 0 only when the host has no GPU runtime
|
|
51
|
+
or the runtime reports no device; a driver error raises `DeviceQueryError` with its code. Choosing the device with
|
|
52
|
+
the most free memory and listing the devices consider every device. A device's free and total memory are its
|
|
53
|
+
measured figures, or `DeviceQueryError` when the driver refuses or the process does not see the device, so a plan is
|
|
54
|
+
always made from what the card really has.
|
|
27
55
|
|
|
28
56
|
## [0.1.5] - 2026-11-12
|
|
29
57
|
|
|
58
|
+
Triton models on Apple GPUs several times faster, and the NeuroBrix engine's remaining tensor work as library calls.
|
|
59
|
+
|
|
30
60
|
### Changed
|
|
31
61
|
- Triton models on Apple GPUs run several times faster: nbxtensor now runs each compiled kernel on its own Metal stream,
|
|
32
62
|
in order, and waits for the GPU only where a result is read, instead of after every kernel. Measured on an M4 Pro,
|
|
33
63
|
outputs byte-identical: TinyLlama 1.1B, 256 tokens, 46.2 s -> 8.1 s; granite-3.1-1b-a400m (mixture of experts),
|
|
34
64
|
128 tokens, 22.5 s -> 4.7 s.
|
|
35
|
-
- A
|
|
36
|
-
launch.
|
|
65
|
+
- A device assert raised in a kernel surfaces at the next read of a result (or the next launch).
|
|
37
66
|
- `NBX_SYNC_TIMING=1` on Apple now counts launches and the time spent issuing them, per kernel; there is no per-launch
|
|
38
67
|
wait left to time.
|
|
39
68
|
- The library's documentation lives in its own `docs/` (the API reference, the backends' contract, the device keys;
|
|
40
69
|
`docs/design/` the allocator, cost and design notes; `docs/history/` the inventory and the migration record) and
|
|
41
70
|
the three tensor reference pages (tensor cores through linear layouts, the certified-autotune method, recording a
|
|
42
71
|
replay in a one-shot request) with the Triton CPU install page. The README links them in this repository.
|
|
43
|
-
- The int4 MoE decode band's tiles, warps and stages
|
|
44
|
-
_WARPS, _BND, _WARPS_D
|
|
72
|
+
- The int4 MoE decode band's tiles, warps and stages are the defaults the environment variables NBX_MOEV_BN, _BK,
|
|
73
|
+
_WARPS, _BND, _WARPS_D and _STAGES gave them; the band reads no environment variable.
|
|
45
74
|
- `memory.deferred_frees`: `DeferredFrees`, `Drain`, `sync_devices_of` — the tensors a run drops, released in batches
|
|
46
75
|
at a bytes cliff, a count or (pool off) a free-memory reserve, every owning device synchronised first, and the
|
|
47
76
|
allocator's out-of-memory reclaimer while the batch lives. The engine's two hot loops held this queue themselves.
|
|
77
|
+
- `NBXTensor.item()` on a bfloat16 element returns its value, read as the high half of a float32.
|
|
48
78
|
|
|
49
79
|
### Added
|
|
50
80
|
- `memory.block_upload` (`open_copy_stream`, `upload_block`, `wait_for_upload`, `drop_upload_events`,
|
|
@@ -52,17 +82,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
52
82
|
ordering-only readiness event the compute stream waits on (synchronous, with no event, given no stream), and the
|
|
53
83
|
stream's and events' release. Moved from the NeuroBrix engine's zero3 strategy, which keeps which block moves, when,
|
|
54
84
|
and how much stays resident.
|
|
55
|
-
- `memory.shadow.install_shadow(devices)`, `shadow_launch`, `shadow_device`, `DevicesVisible`: the whole shadow device —
|
|
56
|
-
allocator's direct operations, streams, events and device queries answered without a driver, every launch skipped,
|
|
57
|
-
a value read answering a host-born value or a benign one — refused while a device is visible. Moved from the
|
|
58
|
-
|
|
59
|
-
|
|
85
|
+
- `memory.shadow.install_shadow(devices)`, `shadow_launch`, `shadow_device`, `DevicesVisible`: the whole shadow device —
|
|
86
|
+
the allocator's direct operations, streams, events and device queries answered without a driver, every launch skipped,
|
|
87
|
+
a value read answering a host-born value or a benign one — refused while a device is visible. Moved from the NeuroBrix
|
|
88
|
+
engine's census, which keeps which keys are recorded and its own seams; `from_numpy`'s stand-in now takes every
|
|
89
|
+
argument `from_numpy` takes.
|
|
60
90
|
- `nbxtensor.interop.from_dlpack(obj, device=None)`: take in another library's array through DLPack (a torch tensor,
|
|
61
91
|
a numpy array): host memory is copied in the order it shows, strided views and bfloat16 included; this backend's own
|
|
62
92
|
device memory is used in place (a strided one is first made contiguous on the device); another vendor's device
|
|
63
93
|
memory is refused with its name.
|
|
64
94
|
- `backend.triton_ext_driver.kernel_name(kernel)`: the name a Metal kernel was loaded under. The sync counter
|
|
65
|
-
(`NBX_SYNC_TIMING=1`)
|
|
95
|
+
(`NBX_SYNC_TIMING=1`) ranks Metal kernels by their own names.
|
|
66
96
|
- `ops.moe_fused.fused_moe(gate_scores, hidden_states, gate_weights, up_weights, down_weights, top_k, num_experts,
|
|
67
97
|
...)`: a whole mixture-of-experts layer in one call — the routing (top-k and renormalisation, or a blended routing
|
|
68
98
|
taken as given), host experts promoted for the call, the experts' pointer tables, and the path the call's shape and
|
|
@@ -107,11 +137,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
107
137
|
stored bytes. Moved from the engine's float16-safety scan.
|
|
108
138
|
- `DeviceAllocator.pool_cached_bytes`, `pool_enabled`, `pool_stats`, `blocks_in_use` and `Arena.bytes_on`: the
|
|
109
139
|
allocator's and an arena's figures for an application's memory lines, forensic dumps and per-key states. The engine
|
|
110
|
-
read the allocator's private tables (`_cuda_live_bytes`, `_POOL`, `_cuda_ptr_size`, `_pool_enabled`) in a dozen
|
|
140
|
+
read the allocator's private tables (`_cuda_live_bytes`, `_POOL`, `_cuda_ptr_size`, `_pool_enabled`) in a dozen
|
|
141
|
+
places.
|
|
111
142
|
- `memory.oom_advice.held_memory_report(named, big, bucket)` and `Arena.census(large)`: after a refused allocation,
|
|
112
143
|
who holds the device's memory (blocks in use by size, the tensors alive on the large ones named or ORPHAN with their
|
|
113
144
|
referrers, autotuners still holding tensors) and what an arena holds by region. The engine's NBX_LIVE_DUMP_ON_OOM
|
|
114
|
-
dump walked the allocator's tables and
|
|
145
|
+
dump walked the allocator's tables and Python's gc module itself.
|
|
115
146
|
- `memory.memory_pool.release_weights`, `join_weights` and `Arena.release`: a loaded weight set released after
|
|
116
147
|
every device holding it synchronised (the library's bias and pointer-table caches dropped, the pool emptied), a
|
|
117
148
|
second load's arenas joined to the first's, an arena cleared after its devices drain. The engine did each itself
|
|
@@ -137,9 +168,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
137
168
|
held the same arithmetic six times (its Triton sampler, the encoder-decoder, dual-AR and TTS flows, and the
|
|
138
169
|
compiled twins of the last two); every copy draws the same tokens through these.
|
|
139
170
|
|
|
140
|
-
### Fixed
|
|
141
|
-
- `NBXTensor.item()` on a bfloat16 element returns its value (the high half of a float32); it returned 0.0.
|
|
142
|
-
|
|
143
171
|
## [0.1.4] - 2026-11-12
|
|
144
172
|
|
|
145
173
|
### Added
|
|
@@ -151,8 +179,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
151
179
|
`FrozenPlan`, `install_seams`, `arm_launch_recorder`, the action tags. Moved from the NeuroBrix engine, which
|
|
152
180
|
keeps only when a step is recorded, verified and replayed.
|
|
153
181
|
- `frozen_plan.measure`, `room_for`, `slabs`, `record`, `retire`, `head_values`, `FrozenPlan.hand_out_outputs`,
|
|
154
|
-
`STATE.open_measurement`, `values_sha256`, `carved_from`: a step's slab measured, made room for, allocated and
|
|
155
|
-
released — the mechanism of the replay's state machine, whose decisions stay the
|
|
182
|
+
`STATE.open_measurement`, `values_sha256`, `carved_from`: a step's slab measured, made room for, allocated and
|
|
183
|
+
recorded into, a rejected plan released — the mechanism of the replay's state machine, whose decisions stay the
|
|
184
|
+
caller's.
|
|
156
185
|
- `DeviceAllocator.give_back_cached(dev)`: a card's cached free memory (the expandable range's chunks, the pool's
|
|
157
186
|
blocks) back to the driver after its work ends.
|
|
158
187
|
- `StepSlab.for_carved`, `DeviceAllocator.register_idle_reclaimer`: a decode step's slab sized in the library; an
|
|
@@ -170,8 +199,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
170
199
|
call them instead of their own device-to-host copies.
|
|
171
200
|
- `memory.memory_pool.break_aliases(tensors, freed)`: before the tensors at `freed` (keys of a list or a dict) are
|
|
172
201
|
freed, every other entry viewing one of their allocations is replaced by its `contiguous()`. The engine's weight
|
|
173
|
-
eviction called its own two copies of it.
|
|
174
|
-
|
|
202
|
+
eviction called its own two copies of it. An entry that is already contiguous is its own `contiguous()` and stays a
|
|
203
|
+
view of that allocation, as in those copies.
|
|
175
204
|
- `NBXTensor.saturated(dtype)`: a one-element float32 or float64 tensor holding a finite value beyond a half dtype's
|
|
176
205
|
range comes back as a new tensor (same dtype, shape and card) holding the clamped value (`saturate_scalar`);
|
|
177
206
|
anything else is itself. The engine's `where` wrap called its own copy, which uploaded to the current card.
|
|
@@ -201,18 +230,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
201
230
|
carried this op, with its device-to-host and card-to-card copies; it now hands over the tables its placement built.
|
|
202
231
|
|
|
203
232
|
### Changed
|
|
204
|
-
- The multi-device routed layer
|
|
233
|
+
- The multi-device routed layer keeps the routing scores on the device.
|
|
205
234
|
- The slot store reads the card's clock at the size of the word it reads into, no byte count written in the code.
|
|
206
|
-
|
|
207
|
-
### Fixed
|
|
208
235
|
- `autotune_cache.seed_late(tuner)`, called at a tuner's first launch: a kernel module imported after the process's
|
|
209
|
-
first autotuned launch gets the machine's stored settings too (the certified directory first), once
|
|
210
|
-
|
|
236
|
+
first autotuned launch gets the machine's stored settings too (the certified directory first), once, so every new
|
|
237
|
+
process reuses the settings measured for the modules it imports late.
|
|
211
238
|
- **A driver error while a card's expandable pool asks which cards reach it is refused by name.** `memory.vmm.Vmm`
|
|
212
239
|
builds the access grant of its chunks from the driver's answers (`cuDeviceGetCount`, `cuDeviceGet`,
|
|
213
|
-
`cuDeviceCanAccessPeer`);
|
|
214
|
-
|
|
215
|
-
the error. A driver that answers "not a peer" is unchanged.
|
|
240
|
+
`cuDeviceCanAccessPeer`); an error in one of those calls raises at once, naming the call, its device and its status. A
|
|
241
|
+
driver that answers "not a peer" gives a grant naming the owning card, as before.
|
|
216
242
|
|
|
217
243
|
## [0.1.3] - 2026-11-11
|
|
218
244
|
|
|
@@ -223,20 +249,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
223
249
|
- `PagedTritonKVCache.replay_host_mark()`: the cache's host length, for a replay that mirrors what its recorded run
|
|
224
250
|
moved (the engine's replayed layer-streamed pieces).
|
|
225
251
|
|
|
226
|
-
### Fixed
|
|
227
|
-
- **A tensor of a card's expandable pool can be handed to another card.** The pool grows by mapping chunks into one
|
|
228
|
-
virtual range; a mapped chunk is readable only from the devices its access grant names, and the grant named the
|
|
229
|
-
owning card alone. Any card-to-card copy of a tensor living in the range failed (`cudaMemcpy failed rc=1 (kind=3)`);
|
|
230
|
-
only small tensors, held in ordinary blocks, crossed. Each chunk is now granted to its card and to every card that
|
|
231
|
-
can reach it as a peer. One card: nothing changes.
|
|
232
|
-
- **A routed layer whose experts sit on two cards is read at the right experts.** `memory.pointer_tables.build_ptr_tables`
|
|
233
|
-
gave each card a table of its own experts alone, packed, while the grouped GEMM reads a table at the expert's number
|
|
234
|
-
in the layer: on a card that does not hold experts 0..n-1 it read another expert's weights, or past the table's end.
|
|
235
|
-
A card's table now keeps the layer's length, each of its experts at its own number (0 where another card holds the
|
|
236
|
-
expert); the launch's key, which carries that length, is the layer's again. A layer held by one card is unchanged.
|
|
237
|
-
|
|
238
252
|
### Changed
|
|
239
253
|
|
|
254
|
+
- **A tensor of a card's expandable pool can be handed to another card.** The pool grows by mapping chunks into one
|
|
255
|
+
virtual range; a mapped chunk is readable from the devices its access grant names, and each chunk is granted to its
|
|
256
|
+
card and to every card that can reach it as a peer, so a tensor of any size living in the range is copied card to
|
|
257
|
+
card. One card: nothing changes.
|
|
258
|
+
- **A routed layer whose experts sit on two cards is read at the right experts.**
|
|
259
|
+
`memory.pointer_tables.build_ptr_tables` gives each card a table of the layer's length, each of its experts at its own
|
|
260
|
+
number (0 where another card holds the expert), as the grouped GEMM reads a table at the expert's number in the layer;
|
|
261
|
+
the launch's key, which carries that length, is the layer's. A layer held by one card is unchanged.
|
|
240
262
|
- **The library's messages speak of records and graphs.** Seven error texts reworded ("allocation record", "the
|
|
241
263
|
container's graph"). No behaviour changes.
|
|
242
264
|
|
|
@@ -248,20 +270,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
248
270
|
handed by the launcher; Level Zero no — its kernels load no address from memory). What a launch over a table of
|
|
249
271
|
`data_ptr()` values stands on; a backend without a row is refused by name.
|
|
250
272
|
|
|
251
|
-
###
|
|
252
|
-
- **Apple: an address read through a pinned table is answered from a wrap that covers it.** The Metal driver
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
pinned address out of two million was answered past its wrap and every expert's address resolved to an
|
|
262
|
-
allocation of its own. The expert-store plan itself was not run on Apple hardware (its models are 31 GB). The
|
|
263
|
-
wraps are now kept under their extent (base and size), and `pinned_gpu_address` refuses by name an address beyond
|
|
264
|
-
the wrap it resolved. CUDA and Level Zero are not concerned: they have no such wraps.
|
|
273
|
+
### Changed
|
|
274
|
+
- **Apple: an address read through a pinned table is answered from a wrap that covers it.** The Metal driver keeps its
|
|
275
|
+
pinned whole-allocation wraps under their extent (base and size), so a view inside any block of a pool segment — a
|
|
276
|
+
slot of the Triton expert store's arena — resolves to the wrap that holds it, and `pinned_gpu_address` refuses by name
|
|
277
|
+
an address beyond the wrap it resolved. Proven by a test that builds the copying expert store (the one with an arena)
|
|
278
|
+
directly and runs it after nine earlier mixture-of-experts runs in one process. On Apple the engine builds a unified
|
|
279
|
+
device's store, which binds its experts in place, where they lie in the container's files; with the published 0.6.6
|
|
280
|
+
through `neurobrix serve`, on the two plans the mixture-of-experts model that fits a 24 GB Mac takes (resident, and
|
|
281
|
+
streamed layer by layer), all two million pinned addresses observed resolved inside their wrap, and every expert's
|
|
282
|
+
address to an allocation of its own. CUDA and Level Zero have no such wraps.
|
|
265
283
|
|
|
266
284
|
## [0.1.1] - 2026-11-11
|
|
267
285
|
|
|
@@ -286,38 +304,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
286
304
|
merged in a fixed order. The host partial (`HostSpill.partial`) stays the decode step's one row: for a chunk's
|
|
287
305
|
32 x 128 query rows over 14 336 positions it cost 85-122 ms a layer on a Xeon Gold 6230 (40 threads), about half of
|
|
288
306
|
each spilled chunk of a 79 931-token turn (2026-11-10).
|
|
289
|
-
- **A Level Zero
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
307
|
+
- **A Level Zero refusal is typed**: `backend.level_zero.IntelDeviceError` (a RuntimeError) carries the call, the
|
|
308
|
+
`ze_result_t` by name and the module's build log, raised by the runtime, the launch driver and a SPIR-V module that
|
|
309
|
+
does not build. The Intel backend is experimental — not yet validated on hardware by the NeuroBrix lab — and an
|
|
310
|
+
application decides on this type what a refusal means.
|
|
293
311
|
- **The Intel launch driver goes through its runtime's contract** (no behaviour change; the backend stays
|
|
294
312
|
experimental, not yet validated on hardware): `backend/level_zero.py` is the only module that knows a Level Zero
|
|
295
313
|
struct, constant or entry point of a module's life — `LevelZeroRuntime.build_module` (answers `ModuleBuilt`: the
|
|
296
|
-
result, the module, the build log;
|
|
314
|
+
result, the module, the build log; an error is answered, the retry is the driver's decision), `create_kernel`,
|
|
297
315
|
`kernel_properties`, `destroy_kernel`, `destroy_module`, `set_argument`, `set_group_size`, `append_launch`,
|
|
298
316
|
`current_device`. `backend/level_zero_driver.py` imported 14 private names and issued 12 raw `ze*` calls; it now
|
|
299
317
|
imports none and issues none, and holds the one decision that is a driver's (the 256-register rebuild, its two
|
|
300
318
|
constants beside it). `backend/launcher.py` names publicly what a driver in another file uses: `ModuleDriver`,
|
|
301
319
|
`ctypes_slot`. Proven without a card: the exact ze calls of ten load and launch paths, recorded before the move,
|
|
302
320
|
reproduced by it.
|
|
303
|
-
- **The library's uploads name their device in the call** (the spilled prefill chunk's blocks, masks and merged
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
was observed; on a cache whose layers live on two cards it was one reordering away.
|
|
321
|
+
- **The library's uploads name their device in the call** (the spilled prefill chunk's blocks, masks and merged result,
|
|
322
|
+
the paged decode's host partial, the MoE residency probe): `NBXTensor.from_numpy(x, device=...)` places each one on
|
|
323
|
+
the device it names, whichever device is current, so a cache whose layers live on two cards gets each upload on its
|
|
324
|
+
own card.
|
|
308
325
|
- `NBXTensor.to` reads its positional argument in a named function (`_positional_target`); the method is 40 code
|
|
309
326
|
lines (49), same answers.
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
`mem_get_info`, `device_total_bytes` and the other probes "restored the previous device" after reading; in a process
|
|
314
|
-
that had selected none, that selected device 0 and made the runtime create a context there. A previous device is
|
|
315
|
-
restored only when the process had selected it (`DeviceAllocator.restore_device`).
|
|
327
|
+
- **Reading a device's memory leaves no context on another device**: `DeviceAllocator.free_memory_mb`, `mem_get_info`,
|
|
328
|
+
`device_total_bytes` and the other probes restore a previous device after reading only when the process had selected
|
|
329
|
+
one (`DeviceAllocator.restore_device`), so a process that selected none creates no context on device 0.
|
|
316
330
|
|
|
317
331
|
## [0.1.0] - 2026-11-10
|
|
318
332
|
### Changed
|
|
319
|
-
- **Contributions are made under the NeuroBrix Contributor Assignment Agreement** (docs/legal/ of the neurobrix
|
|
320
|
-
|
|
333
|
+
- **Contributions are made under the NeuroBrix Contributor Assignment Agreement** (docs/legal/ of the neurobrix
|
|
334
|
+
repository, an individual and an entity version): signed once by a comment on the first pull request, for every
|
|
335
|
+
NeuroBrix project; the `NeuroBrix CLA` check on every pull request says who has yet to sign. CONTRIBUTING.md explains
|
|
336
|
+
it.
|
|
337
|
+
- **The authors' contact address is contact@neurobrix.org** (the package metadata), the project's address being
|
|
338
|
+
neurobrix.org.
|
|
321
339
|
|
|
322
340
|
### Added
|
|
323
341
|
- **A decoding sequence may outgrow the card's KV pages**: past `card_pages`, `PagedTritonKVCache` moves its oldest
|
|
@@ -336,10 +354,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
336
354
|
-inf before the sampler; the mask on the logits' own device, the element-wise launch's certified tile; a mask of
|
|
337
355
|
another shape or allowing no token refused by name. Torch-free.
|
|
338
356
|
- **A KV cache host tier**: `memory.kv_host_tier` (the prefix index of whole pages, the host page pool, the pages a
|
|
339
|
-
sequence holds), `memory.kv_host_pages` (host pages laid out [page][layer][K, V], pinned or pageable; per-layer
|
|
340
|
-
and `offload_gathered` / `restore_scattered`: every layer's page gathered on the device by one kernel per K
|
|
341
|
-
one copy per page and run of layers — 43 MB in 21 / 8 ms against 184 / 210 ms per layer on a V100), and
|
|
342
|
-
cache's `tier_*` protocol (layout, length, offload, restore in place, resume).
|
|
357
|
+
sequence holds), `memory.kv_host_pages` (host pages laid out [page][layer][K, V], pinned or pageable; per-layer
|
|
358
|
+
copies, and `offload_gathered` / `restore_scattered`: every layer's page gathered on the device by one kernel per K
|
|
359
|
+
and V, then one copy per page and run of layers — 43 MB in 21 / 8 ms against 184 / 210 ms per layer on a V100), and
|
|
360
|
+
the paged cache's `tier_*` protocol (layout, length, offload, restore in place, resume).
|
|
343
361
|
- **`nbxtensor.ops.embedding_pool`**: an embedding model's pooling on the host (`pool_hidden`: mean over the kept
|
|
344
362
|
positions, cls, or each sequence's last kept position whatever the padding side; `l2_normalize`), numpy and
|
|
345
363
|
torch-free; refusals by name.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: nbxtensor
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
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
|
|
@@ -150,6 +150,14 @@ def open_window(device_idx: int) -> int # start watching
|
|
|
150
150
|
def window_start(token: int) -> Optional[int] # what was held when the window opened
|
|
151
151
|
def close_window(device_idx: int, token: int) -> Optional[int] # the most held since it opened; the window closed
|
|
152
152
|
def register_idle_reclaimer(reclaim) -> None # `reclaim(dev) -> bytes` when a malloc is refused
|
|
153
|
+
def weight_arenas() -> WeightArenas # a weight set's memory to count, allocate and pin
|
|
154
|
+
# a compiled sequence's slot memory and its lifecycle (`memory.slot_stores`, 2026-11-13):
|
|
155
|
+
SlotStore # the slot store ([weights | inputs | intermediates])
|
|
156
|
+
def slot_store(size, num_weights=0, num_inputs=0) -> SlotStore # the store a sequence takes at compile
|
|
157
|
+
def end_store_request(store) -> None # a request ended: inputs and intermediates dropped
|
|
158
|
+
def release_store(store) -> None # an unload: devices synchronised, then every slot dropped
|
|
159
|
+
def store_held_bytes(store, device_idx) -> tuple # (weights, the rest) bytes it holds on a device
|
|
160
|
+
def store_contents(store, large: int) -> dict # what it holds by region, its large intermediates
|
|
153
161
|
```
|
|
154
162
|
|
|
155
163
|
`nbxtensor.memory.allocator`
|
|
@@ -199,8 +207,9 @@ DEVICE, HOST
|
|
|
199
207
|
class HostPagePool
|
|
200
208
|
# `capacity` host pages, each one page index of every layer's K and V contiguous: take, give, free_pages; grow(n),
|
|
201
209
|
# shrink(n) (the last n pages, when all are free) as the host memory grows or frees a slice
|
|
202
|
-
def host_tier_pages(budget_bytes,
|
|
203
|
-
# the whole host pages a budget holds; 0 (the tier off)
|
|
210
|
+
def host_tier_pages(budget_bytes, num_layers, k_page_bytes, v_page_bytes) -> int
|
|
211
|
+
# the whole host pages a budget holds, a page being one page index of every layer's K and V; 0 (the tier off)
|
|
212
|
+
# below one page
|
|
204
213
|
def sequence_pages(tables, batch) -> List[int]
|
|
205
214
|
# a serving cache's one sequence's device pages in position order (refused for a batch > 1)
|
|
206
215
|
class PrefixIndex
|
|
@@ -213,7 +222,7 @@ class PrefixIndex
|
|
|
213
222
|
```python
|
|
214
223
|
class HostPages
|
|
215
224
|
# host pages, each [layer][K page, V page] contiguous, allocated in slices of `slice_pages` up to `max_pages` (the
|
|
216
|
-
# budget a ceiling): grow, shrink, capacity, contiguous(a, b) (one slice), page_view, address(host_page, layer,
|
|
225
|
+
# budget a ceiling): grow, shrink, capacity, nbytes() (the bytes its slices hold), contiguous(a, b) (one slice), page_view, address(host_page, layer,
|
|
217
226
|
# which), close; fixed(capacity, ...) one slice at once; page-locked when asked, pageable otherwise (unified memory)
|
|
218
227
|
def offload(k_pools, v_pools, pages, host, host_pages) -> None
|
|
219
228
|
# each device page (every layer's K and V, `pool[page]`) copied to its host page, after the device's queued work
|
|
@@ -250,6 +259,8 @@ def one_head_per_group(t, kv_heads, group)
|
|
|
250
259
|
`nbxtensor.memory.host_spill` — the positions a decoding sequence spilled from the card's pages to host memory
|
|
251
260
|
|
|
252
261
|
```python
|
|
262
|
+
def spill_bytes_per_position(num_layers, kv_heads, k_dim, v_dim) -> int
|
|
263
|
+
# host bytes one spilled position costs across every layer (float32 K and V); a server sizes its reach by it
|
|
253
264
|
class HostSpill(num_layers, kv_heads, k_dim, v_dim, budget_bytes)
|
|
254
265
|
# per layer K / V float32 [H_kv, positions, D], written once per spilled page (append(layer, k_pages, v_pages)),
|
|
255
266
|
# grown by doubling up to the budget (refused by name past it: reach(), position_bytes()); partial(layer, q,
|
|
@@ -334,6 +345,9 @@ def join_weights(held: dict, loaded: dict) -> dict
|
|
|
334
345
|
# `loaded` with its arenas merged into `held`'s (a second arena on a device under a distinct key), to update `held`
|
|
335
346
|
def break_aliases(tensors, freed) -> int
|
|
336
347
|
# Before the entries of `tensors` (list or dict) at `freed` are freed: every other entry viewing one of their allocations replaced by its contiguous(); the count.
|
|
348
|
+
class WeightArenas
|
|
349
|
+
# One weight set's memory: reserve(device, nbytes) / reserve_host(nbytes) at the arenas' alignment, allocate() (one
|
|
350
|
+
# ComponentArena per device, one HostPinnedArena), pin_host() once the host weights are written; .devices, .host.
|
|
337
351
|
class ComponentArena
|
|
338
352
|
# Single contiguous GPU memory block for one component's weights.
|
|
339
353
|
class HostPinnedArena
|
|
@@ -500,6 +514,16 @@ class SlabInterceptor(AllocatorInterceptor)
|
|
|
500
514
|
# The allocator's interceptor for slab-served runs.
|
|
501
515
|
```
|
|
502
516
|
|
|
517
|
+
`nbxtensor.memory.step_stabilizer` — a decoding sequence's step slab, stabilized over its first runs
|
|
518
|
+
|
|
519
|
+
```python
|
|
520
|
+
class StepStabilizer(state, label)
|
|
521
|
+
# one per sequence on the slab interceptor `state`; tick(dev_idx) at each run's start: runs 1-2 pass through,
|
|
522
|
+
# run 3 measures the bytes the step carves (banked at the next tick of any sequence), runs 4+ carve from its
|
|
523
|
+
# recycled StepSlab (StepSlab.for_carved), put in force as state.stab_slab; runs, total, slab
|
|
524
|
+
SAY_AT_RUN # the run whose carve sequence is compared with the previous one, once, at debug level
|
|
525
|
+
```
|
|
526
|
+
|
|
503
527
|
### `nbxtensor.ops.tiling_sizes` — the sizes the tiled and chunked paths cut by (the tiling table in force: `ops.tiling_policy`)
|
|
504
528
|
|
|
505
529
|
Every figure is read from the tiling table in force (`set_tiling` / `tiling_table`), never written in the code.
|
|
@@ -627,6 +651,8 @@ def digest(t, algorithm: str, nbytes: int | None = None, **params) -> str
|
|
|
627
651
|
# hashlib.new(algorithm, bytes, **params).hexdigest() over the elements in row-major order, the first nbytes
|
|
628
652
|
def values_at(t, positions) -> list[float]
|
|
629
653
|
# the values at row-major flat positions, each element read alone after a device synchronisation
|
|
654
|
+
def label(t) -> str
|
|
655
|
+
# shape, dtype, device and the object's id, for a diagnostic line ("-" for None): never the tensor's address
|
|
630
656
|
```
|
|
631
657
|
|
|
632
658
|
### `nbxtensor.ops.fused_upsample_conv` — a convolution streamed in bands of output rows
|
|
@@ -2825,6 +2851,10 @@ def verify_driver_contract(driver, jit_fn, signature, constexprs, make_buffer, r
|
|
|
2825
2851
|
def from_dlpack(obj, device=None) -> NBXTensor
|
|
2826
2852
|
# The elements `obj` exports through DLPack: host memory copied in the order it shows (strides, bfloat16), this
|
|
2827
2853
|
# backend's own device memory wrapped in place, another vendor's device memory refused by name.
|
|
2854
|
+
def copy_to_address(tensor, address: int) -> None
|
|
2855
|
+
# The values, in C order, copied into a buffer another library owns on the same device heap (`interop.handoff`).
|
|
2856
|
+
def host_bytes(tensor) -> bytearray
|
|
2857
|
+
# The values, in C order, as host bytes for another library to type itself (`interop.handoff`).
|
|
2828
2858
|
|
|
2829
2859
|
### `nbxtensor.backend.metal_dispatch` — Triton's compiled Metal kernels, run on nbxtensor's own stream
|
|
2830
2860
|
|
|
@@ -2911,9 +2941,23 @@ The cache is evicted before each trial and bypassed during it (macOS `msync(MS_I
|
|
|
2911
2941
|
`posix_fadvise(DONTNEED)`): the rate is the storage path's, never the page cache's. A measure whose first and last
|
|
2912
2942
|
one-worker trials disagree is not steady and is not to be recorded.
|
|
2913
2943
|
|
|
2944
|
+
### `nbxtensor.io.mapped_shards` — weight files mapped once, the views' spans in them, their pages given back
|
|
2945
|
+
|
|
2946
|
+
```python
|
|
2947
|
+
class ShardMaps(access=mmap.ACCESS_COPY)
|
|
2948
|
+
# map(shard) -> the shard's one mapping (ACCESS_COPY: views a framework may wrap; ACCESS_READ: pages the GPU
|
|
2949
|
+
# reads in place); note(view, shard, offset, nbytes): the span a host view is over; give_back(view) -> (start,
|
|
2950
|
+
# length): that span's pages given back after a copy, found by the view's address (refused by name for a
|
|
2951
|
+
# tensor over no noted span); len()
|
|
2952
|
+
def drop_pages(mapping, offset, nbytes) -> (start, length)
|
|
2953
|
+
# the page-aligned range given back to the kernel (madvise MADV_DONTNEED); refused by name where mmap cannot advise
|
|
2954
|
+
```
|
|
2955
|
+
|
|
2914
2956
|
### `nbxtensor.io.safetensors` — the host conversions of a loaded weight, split across the loader's workers
|
|
2915
2957
|
|
|
2916
2958
|
```python
|
|
2959
|
+
def mapped_view(mapping, offset: int, shape: tuple, sf_dtype: str) -> NBXTensor
|
|
2960
|
+
# A host tensor over one weight's stored bytes inside a read-only mapped shard, no byte copied, the mapping its base.
|
|
2917
2961
|
def to_bf16_bits(arr: np.ndarray, io) -> np.ndarray # float32 / float16 -> bfloat16 patterns (uint16), the
|
|
2918
2962
|
# bytes of one f32_to_bf16_bits call, one span per worker
|
|
2919
2963
|
def read_bytes(fd: int, offset: int, nbytes: int, io) -> np.ndarray
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nbxtensor"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.7"
|
|
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" }
|
|
@@ -47,9 +47,14 @@ def amp_fp32_output_dtype(compute_dtype: str, graph_dtype: Optional[str], safe:
|
|
|
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
|
-
* float16: float16 only under the precision contract — `safe` (narrows every such op) or
|
|
51
|
-
in the narrowed set); float32 otherwise. An op `built` in float32 inside a half graph is
|
|
52
|
-
float32 island: only `narrowed` brings it to float16, never `safe`.
|
|
50
|
+
* float16 on a half graph: float16 only under the precision contract — `safe` (narrows every such op) or
|
|
51
|
+
`narrowed` (this op is in the narrowed set); float32 otherwise. An op `built` in float32 inside a half graph is
|
|
52
|
+
the model's own float32 island: only `narrowed` brings it to float16, never `safe`.
|
|
53
|
+
* float16 on a WIDER graph (a float32 model computed in float16): float32 unless `narrowed`, as under bfloat16 —
|
|
54
|
+
the model's forward returned float32 there. `safe` is a RANGE fact (every value fits float16); it says nothing
|
|
55
|
+
of the precision a float32 model needs: Kokoro-82M's harmonic source is a running phase (a cumulative sum
|
|
56
|
+
reaching thousands of radians) that float16 stores to a few radians, and the voice became noise (the owner's
|
|
57
|
+
ears, 2026-11-13). Only an op the record narrows (its precision measured) comes down."""
|
|
53
58
|
if compute_dtype == "bfloat16":
|
|
54
59
|
if graph_dtype not in _GRAPH_FLOAT_NAMES:
|
|
55
60
|
raise ValueError(
|
|
@@ -59,6 +64,8 @@ def amp_fp32_output_dtype(compute_dtype: str, graph_dtype: Optional[str], safe:
|
|
|
59
64
|
if compute_dtype == "float16":
|
|
60
65
|
if built == "float32" and graph_dtype in _HALF_GRAPH_NAMES:
|
|
61
66
|
return "float16" if narrowed else "float32"
|
|
67
|
+
if graph_dtype in _GRAPH_FLOAT_NAMES and graph_dtype not in _HALF_GRAPH_NAMES:
|
|
68
|
+
return "float16" if narrowed else "float32"
|
|
62
69
|
return "float16" if (safe or narrowed) else "float32"
|
|
63
70
|
raise ValueError(f"amp_fp32_output_dtype: compute dtype {compute_dtype!r} is not a half dtype — the cast-back "
|
|
64
71
|
f"rule exists for bfloat16 and float16 only")
|
|
@@ -104,3 +104,11 @@ def values_at(t, positions) -> list:
|
|
|
104
104
|
v = v.select(0, i)
|
|
105
105
|
out.append(float(v.item()))
|
|
106
106
|
return out
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def label(t) -> str:
|
|
110
|
+
"""A tensor as a diagnostic line names it: shape, dtype, device and this object's id (stable while it lives),
|
|
111
|
+
never its address ("-" for an empty slot)."""
|
|
112
|
+
if t is None:
|
|
113
|
+
return "-"
|
|
114
|
+
return f"{tuple(t.shape)} {t.nbx_dtype.name} {'cpu' if t.is_cpu else 'device'}:{t.device_idx} id={id(t):#x}"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Exchange with other array libraries: DLPack, the one protocol nbxtensor speaks (never torch, never a producer's
|
|
2
2
|
own API)."""
|
|
3
3
|
from nbxtensor.interop.dlpack import from_dlpack
|
|
4
|
+
from nbxtensor.interop.handoff import copy_to_address, host_bytes
|
|
4
5
|
|
|
5
|
-
__all__ = ["from_dlpack"]
|
|
6
|
+
__all__ = ["from_dlpack", "copy_to_address", "host_bytes"]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""A tensor's values handed out to another array library without that library's API: copied into a buffer it owns on
|
|
2
|
+
the same device heap, or as host bytes in C order (the reader types them itself). The engine's torch hand-off used
|
|
3
|
+
raw copies and `ctypes.string_at` for both until 2026-11-13."""
|
|
4
|
+
import ctypes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def copy_to_address(tensor, address: int) -> None:
|
|
8
|
+
"""The tensor's values, in C order, copied into device memory at `address`, a buffer another library allocated
|
|
9
|
+
on the same heap and device with room for them (a strided view is made contiguous first)."""
|
|
10
|
+
from nbxtensor.memory.allocator import DeviceAllocator
|
|
11
|
+
if tensor.nbytes() == 0:
|
|
12
|
+
return
|
|
13
|
+
src = tensor.contiguous()
|
|
14
|
+
DeviceAllocator.memcpy(int(address), src.data_ptr(), src.numel() * src.element_size())
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def host_bytes(tensor) -> bytearray:
|
|
18
|
+
"""The tensor's values, in C order, as host bytes (read through the host when the tensor is on a device)."""
|
|
19
|
+
if tensor.nbytes() == 0:
|
|
20
|
+
return bytearray()
|
|
21
|
+
host = tensor.contiguous()
|
|
22
|
+
if not host.is_cpu:
|
|
23
|
+
host = host.to_cpu()
|
|
24
|
+
return bytearray(ctypes.string_at(host.data_ptr(), host.numel() * host.element_size()))
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""Weight files mapped once each, the host views over spans inside them, and the pages a view's span gives back.
|
|
2
|
+
|
|
3
|
+
A server that keeps some weights in their files (routed experts on a unified device) maps each shard once and builds
|
|
4
|
+
host views over the stored bytes; nothing is read until a copy touches the pages. Once a view's bytes sit in a device
|
|
5
|
+
slot, its span's pages are given back to the kernel (`madvise(MADV_DONTNEED)` over the page-aligned range): a private,
|
|
6
|
+
never written mapping re-reads the file on the next touch, and the copy's pages no longer count against the machine
|
|
7
|
+
(the Mac, 2026-10-14, a 30B mixture of experts with 55 GB of mapped experts: the process flat at 8.6 GB while free
|
|
8
|
+
memory fell and swap grew 7 GB, until the pages were given back).
|
|
9
|
+
|
|
10
|
+
A view is found by the address of its first byte: whoever copies it may hand back the same bytes through another
|
|
11
|
+
tensor object, never other bytes.
|
|
12
|
+
"""
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import mmap
|
|
16
|
+
from typing import Dict, Tuple
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def drop_pages(m: mmap.mmap, offset: int, nbytes: int) -> Tuple[int, int]:
|
|
20
|
+
"""The page-aligned range around `nbytes` at `offset` in the mapping given back to the kernel; returns (start,
|
|
21
|
+
length). A platform whose mmap cannot advise is refused by name, never left to swap."""
|
|
22
|
+
if not hasattr(m, "madvise") or not hasattr(mmap, "MADV_DONTNEED"):
|
|
23
|
+
raise RuntimeError("ZERO FALLBACK: this platform's mmap carries no madvise/MADV_DONTNEED — a mapped weight's "
|
|
24
|
+
"pages cannot be given back after a copy")
|
|
25
|
+
start = offset - offset % mmap.PAGESIZE
|
|
26
|
+
length = (offset + nbytes) - start
|
|
27
|
+
m.madvise(mmap.MADV_DONTNEED, start, length)
|
|
28
|
+
return start, length
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ShardMaps:
|
|
32
|
+
"""Each shard mapped once for the views' lifetime, and the spans its views were built over."""
|
|
33
|
+
|
|
34
|
+
def __init__(self, access: int = mmap.ACCESS_COPY):
|
|
35
|
+
# ACCESS_COPY (private, copy-on-write, never written) where the views must be writable objects (a torch
|
|
36
|
+
# tensor over the buffer); ACCESS_READ (shared, read-only) where the GPU reads the pages in place: a no-copy
|
|
37
|
+
# Metal buffer over a PRIVATE mapping made copy-on-write copies of every page it bound (8 GB bound in 5.5 MB
|
|
38
|
+
# pieces: the compressor 0.3 -> 11.7 GB; the same over a read-only mapping: flat, the Mac 2026-10-20)
|
|
39
|
+
self._maps: Dict[str, mmap.mmap] = {}
|
|
40
|
+
self._access = access
|
|
41
|
+
self._spans: Dict[int, Tuple[mmap.mmap, int, int]] = {}
|
|
42
|
+
|
|
43
|
+
def map(self, shard: str) -> mmap.mmap:
|
|
44
|
+
m = self._maps.get(shard)
|
|
45
|
+
if m is None:
|
|
46
|
+
with open(shard, "rb") as f:
|
|
47
|
+
m = mmap.mmap(f.fileno(), 0, access=self._access)
|
|
48
|
+
self._maps[shard] = m
|
|
49
|
+
return m
|
|
50
|
+
|
|
51
|
+
def __len__(self) -> int:
|
|
52
|
+
return len(self._maps)
|
|
53
|
+
|
|
54
|
+
def note(self, view, shard: str, offset: int, nbytes: int) -> None:
|
|
55
|
+
"""`view` (any tensor with `data_ptr()`) is over `nbytes` at `offset` in `shard`: its pages can be given back."""
|
|
56
|
+
self._spans[int(view.data_ptr())] = (self.map(shard), int(offset), int(nbytes))
|
|
57
|
+
|
|
58
|
+
def give_back(self, view) -> Tuple[int, int]:
|
|
59
|
+
"""The pages of the span `view` was noted over, given back (`drop_pages`). A tensor over no noted span is
|
|
60
|
+
refused by name: nothing to give back, and nothing should have been copied from it."""
|
|
61
|
+
span = self._spans.get(int(view.data_ptr()))
|
|
62
|
+
if span is None:
|
|
63
|
+
raise RuntimeError("ZERO FALLBACK: a copied host tensor is no view of a mapped weight file — nothing to "
|
|
64
|
+
"give back, and nothing should have been copied from it")
|
|
65
|
+
return drop_pages(*span)
|