nbxtensor 0.1.8__tar.gz → 0.1.9__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.9/.gitignore +2 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/CHANGELOG.md +22 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/PKG-INFO +19 -1
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/README.md +18 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/THIRD_PARTY_NOTICES.md +24 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/API.md +131 -0
- nbxtensor-0.1.9/docs/history/ENGINE_SLIM.md +734 -0
- nbxtensor-0.1.9/docs/history/engine_slim_list.tsv +5 -0
- nbxtensor-0.1.9/docs/kernels_provenance.md +124 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/pyproject.toml +1 -1
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/__init__.py +1 -1
- nbxtensor-0.1.9/src/nbxtensor/backend/cuda_launch.py +78 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/frozen_plan.py +39 -6
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/launcher.py +23 -49
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/metal_dispatch.py +59 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/triton_ext_driver.py +45 -27
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/itemsize.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/io/safetensors.py +199 -1
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/deferred_frees.py +10 -1
- nbxtensor-0.1.9/src/nbxtensor/memory/fixed_state.py +270 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/paged_kv.py +8 -2
- nbxtensor-0.1.9/src/nbxtensor/ops/_causal_conv1d.py +47 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/_common.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/_cost.py +72 -3
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/addcdiv.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/addcmul.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/addmv_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/addr.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/all_reduce.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/any_reduce.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/arange_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/argmax.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/argmin.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/avg_pool2d.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/baddbmm_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/batch_norm.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/bitwise_and.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/bitwise_left_shift.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/bitwise_not.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/bitwise_or.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/bitwise_right_shift.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/cat_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/celu.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/conv2d.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/conv2d_m8n8k4.py +1 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/conv_wrappers.py +20 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/copy_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/count_nonzero.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/cross_entropy.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/cummax.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/cummin.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/cumsum.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/dispatch.py +14 -3
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/dot_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/embedding.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/exp2.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/flash_attention.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/flash_attention_m8n8k4.py +1 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/flip_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/fused_moe_m8n8k4.py +1 -0
- nbxtensor-0.1.9/src/nbxtensor/ops/gated_delta_rule.py +263 -0
- nbxtensor-0.1.9/src/nbxtensor/ops/gated_delta_rule_census.json +151 -0
- nbxtensor-0.1.9/src/nbxtensor/ops/gated_delta_rule_chunked.py +435 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/gather_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/gemv_vec.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/glu.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/index_select.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/isfinite.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/isinf.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/isnan.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/launch_keys.py +61 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/layernorm.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/le.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/lerp.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/linalg_wrappers.py +24 -7
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/linspace_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/log_sigmoid.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/logical_and.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/logical_not.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/logical_or.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/logical_xor.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/matmul_m8n8k4.py +1 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/max_pool2d.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/max_pool3d.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/max_reduce.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/min_reduce.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/mma_m8n8k4.py +1 -0
- nbxtensor-0.1.9/src/nbxtensor/ops/moe_route.py +249 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/mse_loss.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/nan_to_num.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/nllloss.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/nonzero_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/oracles/fp64.py +155 -1
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/pad_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/prod.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/repeat_interleave.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/rmsnorm.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/rope.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/scaled_softmax.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/scatter_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/softmax.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/softplus.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/sort_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/stack_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/std.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/tan.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/threshold.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/topk.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/trace_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/tril.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/triu.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/unique_op.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/upsample_nearest2d.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/var.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/vector_norm.py +3 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/weight_norm.py +3 -0
- nbxtensor-0.1.9/tests/_chunked_interpreter_run.py +91 -0
- nbxtensor-0.1.9/tests/_delta_rule_draw.py +17 -0
- nbxtensor-0.1.9/tests/_moe_route_compare.py +64 -0
- nbxtensor-0.1.9/tests/_moe_route_draw.py +13 -0
- nbxtensor-0.1.9/tests/_no_device.py +139 -0
- nbxtensor-0.1.9/tests/test_a_benchmark_spends_its_time_budget_not_more.py +62 -0
- nbxtensor-0.1.9/tests/test_a_cards_expert_table_keeps_the_layers_length.py +22 -0
- nbxtensor-0.1.9/tests/test_a_causal_convolution_carries_its_last_taps_minus_one_columns.py +204 -0
- nbxtensor-0.1.9/tests/test_a_certification_harness_draws_measures_and_sweeps.py +152 -0
- nbxtensor-0.1.9/tests/test_a_device_name_is_read_once_for_every_backend.py +50 -0
- nbxtensor-0.1.9/tests/test_a_device_naming_that_moves_nothing_is_counted.py +56 -0
- nbxtensor-0.1.9/tests/test_a_device_question_the_runtime_refuses_is_raised_by_name.py +178 -0
- nbxtensor-0.1.9/tests/test_a_device_speed_is_what_it_moves_over_its_time.py +74 -0
- nbxtensor-0.1.9/tests/test_a_dropped_tensor_is_freed_after_the_work_that_reads_it.py +131 -0
- nbxtensor-0.1.9/tests/test_a_dtype_the_key_carries_is_never_dropped.py +86 -0
- nbxtensor-0.1.9/tests/test_a_failed_driver_call_refuses_the_peer_grant.py +90 -0
- nbxtensor-0.1.9/tests/test_a_fixed_state_is_allocated_zero_written_reordered_copied_and_forgotten.py +256 -0
- nbxtensor-0.1.9/tests/test_a_fixed_state_on_a_card_keeps_its_bytes_through_every_verb.py +82 -0
- nbxtensor-0.1.9/tests/test_a_frozen_plan_replays_its_launches_pre_bound.py +126 -0
- nbxtensor-0.1.9/tests/test_a_graph_constant_is_read_without_a_tensor_library.py +55 -0
- nbxtensor-0.1.9/tests/test_a_kernel_file_carries_the_header_of_its_provenance_class.py +58 -0
- nbxtensor-0.1.9/tests/test_a_kernel_time_session_ranks_launches_and_changes_no_byte.py +166 -0
- nbxtensor-0.1.9/tests/test_a_key_carrying_an_integer_dtype_is_synthesised_as_that_dtype.py +55 -0
- nbxtensor-0.1.9/tests/test_a_key_the_card_has_not_certified_is_refused_by_name_never_swept_for_the_moe_route.py +33 -0
- nbxtensor-0.1.9/tests/test_a_kv_page_goes_to_the_host_and_back_bit_exact.py +82 -0
- nbxtensor-0.1.9/tests/test_a_layer_on_several_devices_is_the_sum_of_their_shares.py +118 -0
- nbxtensor-0.1.9/tests/test_a_mapped_shard_gives_back_the_pages_of_a_copied_view.py +68 -0
- nbxtensor-0.1.9/tests/test_a_metal_fence_frees_only_the_pages_past_it.py +39 -0
- nbxtensor-0.1.9/tests/test_a_metal_kernel_runs_on_nbxtensors_own_stream.py +285 -0
- nbxtensor-0.1.9/tests/test_a_one_element_sentinel_is_saturated_to_a_half_range.py +39 -0
- nbxtensor-0.1.9/tests/test_a_probe_leaves_no_context_on_a_card_nobody_selected.py +43 -0
- nbxtensor-0.1.9/tests/test_a_promoted_slab_crosses_once_and_its_table_is_never_cached.py +87 -0
- nbxtensor-0.1.9/tests/test_a_refused_allocation_names_who_holds_the_memory.py +54 -0
- nbxtensor-0.1.9/tests/test_a_replayed_launch_binds_by_the_extents_it_was_launched_with.py +83 -0
- nbxtensor-0.1.9/tests/test_a_replayed_view_output_keeps_its_values.py +44 -0
- nbxtensor-0.1.9/tests/test_a_run_s_end_synchronises_only_where_a_mid_run_release_would.py +41 -0
- nbxtensor-0.1.9/tests/test_a_sampler_s_filters_keep_what_transformers_keeps.py +71 -0
- nbxtensor-0.1.9/tests/test_a_sequence_decodes_past_the_card_s_pages.py +221 -0
- nbxtensor-0.1.9/tests/test_a_setting_not_served_says_why.py +32 -0
- nbxtensor-0.1.9/tests/test_a_shadow_installs_where_the_runtime_has_no_driver.py +65 -0
- nbxtensor-0.1.9/tests/test_a_shadow_never_reads_a_host_copy_of_a_shadow_value.py +30 -0
- nbxtensor-0.1.9/tests/test_a_shadow_value_read_keys_off_the_dtype_name.py +45 -0
- nbxtensor-0.1.9/tests/test_a_single_card_plan_replays_as_one_graph.py +46 -0
- nbxtensor-0.1.9/tests/test_a_slot_store_ends_its_request_and_is_released_by_the_library.py +59 -0
- nbxtensor-0.1.9/tests/test_a_small_tensor_never_pins_a_large_block.py +52 -0
- nbxtensor-0.1.9/tests/test_a_spilled_sequence_attends_as_one.py +115 -0
- nbxtensor-0.1.9/tests/test_a_stack_of_stored_tensors_is_built_one_source_at_a_time.py +115 -0
- nbxtensor-0.1.9/tests/test_a_step_stabilizer_measures_once_then_serves_one_recycled_slab.py +86 -0
- nbxtensor-0.1.9/tests/test_a_stored_bf16_weight_is_measured_from_its_bytes.py +34 -0
- nbxtensor-0.1.9/tests/test_a_sweep_refused_everywhere_says_so.py +35 -0
- nbxtensor-0.1.9/tests/test_a_table_pin_holder_holds_one_pin_per_set_of_wraps.py +36 -0
- nbxtensor-0.1.9/tests/test_a_tensor_is_compared_bit_for_bit_and_knows_its_allocation.py +70 -0
- nbxtensor-0.1.9/tests/test_a_token_bitmask_leaves_only_the_allowed_logits.py +85 -0
- nbxtensor-0.1.9/tests/test_a_triton_kernel_compiles_for_amd_and_launches_through_hip.py +115 -0
- nbxtensor-0.1.9/tests/test_a_tuner_imported_late_gets_its_stored_settings.py +51 -0
- nbxtensor-0.1.9/tests/test_a_view_of_freed_memory_is_copied_out_first.py +44 -0
- nbxtensor-0.1.9/tests/test_a_weight_block_uploads_on_its_copy_stream.py +113 -0
- nbxtensor-0.1.9/tests/test_a_weight_set_is_released_after_its_devices_drain.py +96 -0
- nbxtensor-0.1.9/tests/test_a_weight_sets_memory_is_counted_then_held_by_the_library.py +75 -0
- nbxtensor-0.1.9/tests/test_allocator_interceptor.py +159 -0
- nbxtensor-0.1.9/tests/test_an_arena_counts_what_it_holds.py +25 -0
- nbxtensor-0.1.9/tests/test_an_array_enters_at_a_dtype_the_backend_has.py +52 -0
- nbxtensor-0.1.9/tests/test_an_array_is_placed_on_the_device_it_names.py +84 -0
- nbxtensor-0.1.9/tests/test_an_array_is_taken_in_through_dlpack.py +94 -0
- nbxtensor-0.1.9/tests/test_an_attention_returns_its_rows_log_sum_exp.py +91 -0
- nbxtensor-0.1.9/tests/test_an_axis_is_read_and_written_a_slice_at_a_time.py +66 -0
- nbxtensor-0.1.9/tests/test_an_embedding_is_pooled_as_its_model_declares.py +41 -0
- nbxtensor-0.1.9/tests/test_an_expert_table_keeps_its_experts_alive.py +42 -0
- nbxtensor-0.1.9/tests/test_an_inspection_reads_every_value_once_on_the_host.py +80 -0
- nbxtensor-0.1.9/tests/test_array_api_promotion.py +70 -0
- nbxtensor-0.1.9/tests/test_blas_on_macos_14_runs_without_thread_control.py +76 -0
- nbxtensor-0.1.9/tests/test_cpu_pool.py +85 -0
- nbxtensor-0.1.9/tests/test_device_facts.py +55 -0
- nbxtensor-0.1.9/tests/test_device_files.py +25 -0
- nbxtensor-0.1.9/tests/test_device_memory.py +63 -0
- nbxtensor-0.1.9/tests/test_dtype_convert.py +58 -0
- nbxtensor-0.1.9/tests/test_dtype_outputs.py +63 -0
- nbxtensor-0.1.9/tests/test_dtype_promotion.py +60 -0
- nbxtensor-0.1.9/tests/test_gathered_kv_pages_are_the_per_layer_copies_bits.py +118 -0
- nbxtensor-0.1.9/tests/test_host.py +50 -0
- nbxtensor-0.1.9/tests/test_install_metal_fetches_only_what_it_names.py +186 -0
- nbxtensor-0.1.9/tests/test_io_bf16_split.py +20 -0
- nbxtensor-0.1.9/tests/test_io_read_rate.py +85 -0
- nbxtensor-0.1.9/tests/test_it_installs_on_a_mac.py +23 -0
- nbxtensor-0.1.9/tests/test_keys_are_read_in_the_queries_order_and_one_head_per_group.py +52 -0
- nbxtensor-0.1.9/tests/test_level_zero_states_an_integrated_gpu.py +130 -0
- nbxtensor-0.1.9/tests/test_nbx_dtype.py +37 -0
- nbxtensor-0.1.9/tests/test_no_environment_switch_changes_a_kernel.py +29 -0
- nbxtensor-0.1.9/tests/test_one_token_of_the_gated_delta_rule_on_a_device_is_its_oracle.py +97 -0
- nbxtensor-0.1.9/tests/test_one_token_of_the_moe_route_on_a_device_is_its_oracle.py +132 -0
- nbxtensor-0.1.9/tests/test_ops_cost.py +63 -0
- nbxtensor-0.1.9/tests/test_policy.py +55 -0
- nbxtensor-0.1.9/tests/test_readme.py +39 -0
- nbxtensor-0.1.9/tests/test_shape.py +56 -0
- nbxtensor-0.1.9/tests/test_the_allocator_peak_is_read_and_restarted_through_the_memory_api.py +18 -0
- nbxtensor-0.1.9/tests/test_the_allocator_states_its_pool_and_its_blocks.py +45 -0
- nbxtensor-0.1.9/tests/test_the_attention_reference_is_softmax_qk_v_in_float64.py +34 -0
- nbxtensor-0.1.9/tests/test_the_backend_is_the_card_on_the_machine.py +19 -0
- nbxtensor-0.1.9/tests/test_the_chunked_gated_delta_rule_costs_its_workspace.py +83 -0
- nbxtensor-0.1.9/tests/test_the_chunked_gated_delta_rule_is_its_oracle_on_the_interpreter.py +74 -0
- nbxtensor-0.1.9/tests/test_the_chunked_gated_delta_rule_on_a_device_is_its_oracle.py +136 -0
- nbxtensor-0.1.9/tests/test_the_compile_target_and_the_pool_s_counters_are_read_through_the_doors.py +47 -0
- nbxtensor-0.1.9/tests/test_the_compiler_key_is_prewarmed.py +23 -0
- nbxtensor-0.1.9/tests/test_the_delta_rule_oracle_is_the_recurrence_the_vendor_computes.py +95 -0
- nbxtensor-0.1.9/tests/test_the_device_door_answers_from_the_allocator.py +70 -0
- nbxtensor-0.1.9/tests/test_the_device_door_installs_a_shadow_and_declares_a_target.py +100 -0
- nbxtensor-0.1.9/tests/test_the_expert_slots_copy_with_the_measured_launch.py +39 -0
- nbxtensor-0.1.9/tests/test_the_expert_slots_hold_what_the_host_copied.py +205 -0
- nbxtensor-0.1.9/tests/test_the_expert_slots_live_in_one_allocation.py +126 -0
- nbxtensor-0.1.9/tests/test_the_fp16_range_scan_names_the_first_weight_outside_the_range.py +71 -0
- nbxtensor-0.1.9/tests/test_the_fused_moe_op_refuses_before_any_device.py +89 -0
- nbxtensor-0.1.9/tests/test_the_gated_delta_rule_is_an_op_of_the_library.py +101 -0
- nbxtensor-0.1.9/tests/test_the_gated_delta_rule_op_runs_the_form_its_census_certifies.py +159 -0
- nbxtensor-0.1.9/tests/test_the_gated_delta_rule_over_a_length_on_a_device_is_its_oracle.py +138 -0
- nbxtensor-0.1.9/tests/test_the_gated_delta_rule_runs_over_a_symbolic_length.py +201 -0
- nbxtensor-0.1.9/tests/test_the_hip_driver_keeps_the_launch_contract.py +174 -0
- nbxtensor-0.1.9/tests/test_the_host_sees_slots_a_replayed_step_moved.py +71 -0
- nbxtensor-0.1.9/tests/test_the_int4_moe_decode_band_matches_the_oracle.py +384 -0
- nbxtensor-0.1.9/tests/test_the_kv_host_tier_keeps_whole_pages_by_prefix.py +85 -0
- nbxtensor-0.1.9/tests/test_the_launcher_refuses_a_backend_it_has_no_driver_for.py +42 -0
- nbxtensor-0.1.9/tests/test_the_level_zero_backend_keeps_its_contracts.py +423 -0
- nbxtensor-0.1.9/tests/test_the_level_zero_driver_issues_the_recorded_ze_calls.py +229 -0
- nbxtensor-0.1.9/tests/test_the_malloc_trace_names_the_wrapper.py +25 -0
- nbxtensor-0.1.9/tests/test_the_matmul_oracle_is_windowed_by_rows_above_the_cap.py +51 -0
- nbxtensor-0.1.9/tests/test_the_metal_dispatch_facts_are_declared_or_refused.py +31 -0
- nbxtensor-0.1.9/tests/test_the_moe_route_device_comparison_goes_red_on_a_wrong_set_or_weights.py +73 -0
- nbxtensor-0.1.9/tests/test_the_moe_route_oracle_is_the_routing_written_by_hand.py +93 -0
- nbxtensor-0.1.9/tests/test_the_moe_table_refuses_experts_of_two_layouts.py +37 -0
- nbxtensor-0.1.9/tests/test_the_oracle_reads_only_its_windows_off_the_device.py +85 -0
- nbxtensor-0.1.9/tests/test_the_pool_states_its_rules_for_a_device.py +52 -0
- nbxtensor-0.1.9/tests/test_the_routing_of_a_mixture_of_experts_is_an_op_of_the_library.py +112 -0
- nbxtensor-0.1.9/tests/test_the_shadow_device_answers_without_a_driver.py +82 -0
- nbxtensor-0.1.9/tests/test_the_shadow_reads_a_dtype_by_name_not_by_str.py +49 -0
- nbxtensor-0.1.9/tests/test_the_sync_counter_names_each_metal_kernel.py +18 -0
- nbxtensor-0.1.9/tests/test_third_party_notices.py +81 -0
- nbxtensor-0.1.9/tests/test_tiles_are_cut_padded_and_crossfaded.py +50 -0
- nbxtensor-0.1.9/tests/test_two_views_of_one_layout_are_the_same_memory.py +35 -0
- nbxtensor-0.1.9/tests/test_version.py +23 -0
- nbxtensor-0.1.9/tools/kernels_provenance_audit.py +99 -0
- nbxtensor-0.1.9/tools/measure_the_chunked_gated_delta_rule.py +292 -0
- nbxtensor-0.1.8/.gitignore +0 -311
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/.github/PULL_REQUEST_TEMPLATE/certificate.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/.github/workflows/cla.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/CONTRIBUTING.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/LICENSE +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/NOTICE +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/assets/logo.png +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/BACKENDS.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/api_undocumented.txt +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/certified-autotune-method.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/design/ALLOCATOR.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/design/COST.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/design/DESIGN.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/device_file_template.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/device_keys.txt +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/history/INVENTORY.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/history/MIGRATION.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/history/migration_list.tsv +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/replay-recording-in-a-one-shot-request.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/tensor-cores-through-linear-layouts.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/docs/triton_cpu_install.md +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/__main__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/capabilities.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/cpu/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/cpu/blas.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/cpu/pool.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/cpu_backend.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/device_facts.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/device_files.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/device_measure.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/device_names.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/amd/cdna.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/amd/cdna2.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/amd/cdna3.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/amd/cdna4.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/amd/rdna3.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/amd/rdna4.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m1.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m1_max.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m1_pro.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m1_ultra.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m2.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m2_max.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m2_pro.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m2_ultra.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m3.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m3_max.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m3_pro.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m3_ultra.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m4.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m4_max.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m4_pro.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m5.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m5_max.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m5_pro.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m5_ultra.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_m6.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/apple/apple_silicon.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/arl_h.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/arl_s.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/bmg.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/dg2.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/lnl.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/mtl.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/ptl_h.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/ptl_u.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/pvc.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/wcl.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/intel/xe_lp.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/nvidia/ampere.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/nvidia/hopper.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/devices/nvidia/volta.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/faults.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/host_memory.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/install_help.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/install_metal.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/install_steps.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/launcher_contract.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/level_zero.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/level_zero_driver.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/libnames.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/metal_backend.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/metal_device.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/metal_profile.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/process_memory.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/replay_graph.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/backend/runtime.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/device.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/convert.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/dtypes.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/nbx_dtype.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/operands.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/outputs.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/policy.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/policy.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/dtype/promotion.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/host.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/inspection.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/interop/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/interop/dlpack.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/interop/handoff.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/io/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/io/constants.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/io/mapped_shards.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/io/read_rate.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/allocator.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/arena.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/block_upload.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/device_memory.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/device_transfer.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/expert_slots.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/host_spill.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/kv_host_pages.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/kv_host_tier.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/kv_session.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/layout.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/memory_pool.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/metal.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/oom_advice.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/pages.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/pointer_tables.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/pool.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/shadow.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/slab.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/slot_stores.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/step_stabilizer.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/to_device_census.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/trace_replay.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/traces/sana-video-2b-720p.16g.2026-11-02.tsv +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/memory/vmm.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/_autotune_policy.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/_configs.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/abs.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/adaptive_avg_pool2d.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/add.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/amax.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/atan2.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/attention_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/autotune_bucket.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/autotune_cache.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/autotune_certified.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/autotune_harness.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/autotune_refusals.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/autotune_settings.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/axis_slices.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/binary_strided.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/bucketize.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/certified_index.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/clamp.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/clamp_min.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/conv_depthwise2d.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/conv_transpose2d.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/copy.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/cos.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/decode_attn_vec.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/depthwise_conv2d.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/dequant_gemv.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/dft.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/div.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/dropout.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/dtype_convert.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/elementwise_launch.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/elementwise_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/elu.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/embedding_pool.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/eq.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/erf.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/exp.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/fft_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/fill_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/flash_decode.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/floor.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/full_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/fused_moe.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/fused_upsample_conv.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/ge.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/gelu.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/grid_sampler.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/group_norm_tiled.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/groupnorm.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/gt.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/hardsigmoid.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/hardswish.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/host_decode_partial.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/im2col.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/index_add.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/index_put_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/index_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/launch_observer.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/leaky_relu.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/log.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/loss_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/lt.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/masked_fill.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/matmul.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/maximum.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/mean.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/minimum.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/mish.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/moe_align.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/moe_decode_vec.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/moe_device_residency.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/moe_fused.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/moe_multi_device.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/moe_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/mul.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/ne.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/neg.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/nonzero.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/norm_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/ones_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/oracles/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/oracles/attention_fp64.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/oracles/conv2d_fp64.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/paged_decode_attn.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/pixel_shuffle.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/pixel_unshuffle.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/pow.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/rand_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/random_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/reciprocal.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/reduction_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/relu.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/remainder.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/repeat_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/residual_chain.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/rsqrt.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/screen_oracle.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/selu.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/shape_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/sigmoid.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/silu.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/sin.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/spectral_wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/sqrt.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/strided_copy.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/sub.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/sum.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/tanh.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/tiles.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/tiling.yml +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/tiling_policy.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/tiling_sizes.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/token_bitmask.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/token_filters.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/unfold_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/upsample_bilinear2d.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/upsample_nearest3d.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/where.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/wrappers.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/ops/zeros_op.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/profile.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/quant/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/quant/quantized_tensor.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/random/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/random/mt_randn.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/random/rng_pin.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/random/rng_stream.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/random/seeded_draw.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/shape/__init__.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/tensor.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/src/nbxtensor/terminal.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/tests/conftest.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/tools/device_key_census.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/tools/device_key_trace.py +0 -0
- {nbxtensor-0.1.8 → nbxtensor-0.1.9}/tools/scatter_scan.py +0 -0
|
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.9] - 2026-11-17
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- The gated delta rule over a sequence has a chunked form beside its serial scan
|
|
14
|
+
(`nbxtensor.ops.gated_delta_rule_chunked.gated_delta_rule_chunked_wrapper`, ported from flash-linear-attention, MIT):
|
|
15
|
+
64 tokens solved at a time with matrix products, every product and the state float32, the state handed to and from
|
|
16
|
+
the serial scan unchanged. Its cost is `nbxtensor.ops._cost.gated_delta_rule_chunked` (the float32 workspace by name),
|
|
17
|
+
its launch keys `launch_keys.gated_delta_rule_chunked_launches`.
|
|
18
|
+
- The op `gated_delta_rule` runs the form the census beside the kernel (`ops/gated_delta_rule_census.json`) certifies
|
|
19
|
+
for the call's dimensions: one token always runs the serial scan; a call whose dimensions are in no cell is refused
|
|
20
|
+
by name. Every cell ships uncertified (the serial scan runs, the output bytes unchanged) until
|
|
21
|
+
`tools/measure_the_chunked_gated_delta_rule.py` measures it on a card against the serial scan and flash-linear-
|
|
22
|
+
attention's chunk form.
|
|
23
|
+
- `nbxtensor.io.safetensors.stack_shards` / `concat_shards` (`ShardRef`, `ShardConcat`, `ShardStack`): one parameter
|
|
24
|
+
built from several stored tensors, in the stored dtype, peak memory the result plus one source; disagreements raise
|
|
25
|
+
`ShardsRefused` naming the sources.
|
|
26
|
+
- `nbxtensor.ops.moe_route.moe_route`: the routing of a mixture-of-experts layer for one token as one kernel (the
|
|
27
|
+
float32 router product, sigmoid or softmax scores, an optional choice bias, grouped or ungrouped top-k, the
|
|
28
|
+
renormalised and scaled weights), refused by name outside its shapes, dtypes and attributes; its launch key
|
|
29
|
+
`launch_keys.moe_route_launches`, its float64 reference `oracles.fp64.moe_route_oracle`. It stays outside the
|
|
30
|
+
dispatch table and reaches `fused_moe` through its precomputed-routing entry.
|
|
31
|
+
|
|
10
32
|
## [0.1.8] - 2026-11-15
|
|
11
33
|
|
|
12
34
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: nbxtensor
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
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
|
|
@@ -504,6 +504,24 @@ CUDA (NVIDIA), HIP (AMD), Level Zero (Intel) and Apple Metal through triton-ext;
|
|
|
504
504
|
`backend_table()` its entry points, `device_memory()` its memory primitives, and `set_device(tensor)` binds the
|
|
505
505
|
driver to a tensor's device before a launch.
|
|
506
506
|
|
|
507
|
+
## Kernels
|
|
508
|
+
|
|
509
|
+
Whose kernels these are, file by file, is written in [`docs/kernels_provenance.md`](docs/kernels_provenance.md); the
|
|
510
|
+
licence texts are in [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md).
|
|
511
|
+
|
|
512
|
+
- **NeuroBrix's own** (Copyright NeuroBrix, Apache-2.0): the m8n8k4 family (`mma_m8n8k4`, `flash_attention_m8n8k4`,
|
|
513
|
+
`conv2d_m8n8k4`, `matmul_m8n8k4`, `fused_moe_m8n8k4`) and the card measurement tool. No upstream source exists for them.
|
|
514
|
+
- **Rewritten by NeuroBrix** from [FlagGems](https://github.com/FlagOpen/FlagGems) (Apache-2.0),
|
|
515
|
+
[attorch](https://github.com/BobMcDear/attorch) (MIT), [Liger-Kernel](https://github.com/linkedin/Liger-Kernel)
|
|
516
|
+
(BSD-2-Clause) and [flash-attention](https://github.com/Dao-AILab/flash-attention) (BSD-3-Clause): each such file says
|
|
517
|
+
so in its header, states what was rewritten, and keeps the original provenance statement. The chunked gated delta rule
|
|
518
|
+
is rewritten from [flash-linear-attention](https://github.com/fla-org/flash-linear-attention) (MIT) and is classed
|
|
519
|
+
once its rewrite lands.
|
|
520
|
+
- **Copied unchanged**: none; a file copied unchanged would carry the original notice alone.
|
|
521
|
+
- A file the audit could not class with evidence is listed `UNSURE` in the table and its header is left as it is.
|
|
522
|
+
|
|
523
|
+
Original notices are kept everywhere; none is removed or shortened.
|
|
524
|
+
|
|
507
525
|
## Exchange with other libraries: DLPack
|
|
508
526
|
|
|
509
527
|
nbxtensor speaks DLPack and nothing else: `Tensor.__dlpack__` / `__dlpack_device__` and `nbxtensor.from_dlpack(x)`
|
|
@@ -481,6 +481,24 @@ CUDA (NVIDIA), HIP (AMD), Level Zero (Intel) and Apple Metal through triton-ext;
|
|
|
481
481
|
`backend_table()` its entry points, `device_memory()` its memory primitives, and `set_device(tensor)` binds the
|
|
482
482
|
driver to a tensor's device before a launch.
|
|
483
483
|
|
|
484
|
+
## Kernels
|
|
485
|
+
|
|
486
|
+
Whose kernels these are, file by file, is written in [`docs/kernels_provenance.md`](docs/kernels_provenance.md); the
|
|
487
|
+
licence texts are in [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md).
|
|
488
|
+
|
|
489
|
+
- **NeuroBrix's own** (Copyright NeuroBrix, Apache-2.0): the m8n8k4 family (`mma_m8n8k4`, `flash_attention_m8n8k4`,
|
|
490
|
+
`conv2d_m8n8k4`, `matmul_m8n8k4`, `fused_moe_m8n8k4`) and the card measurement tool. No upstream source exists for them.
|
|
491
|
+
- **Rewritten by NeuroBrix** from [FlagGems](https://github.com/FlagOpen/FlagGems) (Apache-2.0),
|
|
492
|
+
[attorch](https://github.com/BobMcDear/attorch) (MIT), [Liger-Kernel](https://github.com/linkedin/Liger-Kernel)
|
|
493
|
+
(BSD-2-Clause) and [flash-attention](https://github.com/Dao-AILab/flash-attention) (BSD-3-Clause): each such file says
|
|
494
|
+
so in its header, states what was rewritten, and keeps the original provenance statement. The chunked gated delta rule
|
|
495
|
+
is rewritten from [flash-linear-attention](https://github.com/fla-org/flash-linear-attention) (MIT) and is classed
|
|
496
|
+
once its rewrite lands.
|
|
497
|
+
- **Copied unchanged**: none; a file copied unchanged would carry the original notice alone.
|
|
498
|
+
- A file the audit could not class with evidence is listed `UNSURE` in the table and its header is left as it is.
|
|
499
|
+
|
|
500
|
+
Original notices are kept everywhere; none is removed or shortened.
|
|
501
|
+
|
|
484
502
|
## Exchange with other libraries: DLPack
|
|
485
503
|
|
|
486
504
|
nbxtensor speaks DLPack and nothing else: `Tensor.__dlpack__` / `__dlpack_device__` and `nbxtensor.from_dlpack(x)`
|
|
@@ -14,6 +14,7 @@ carried when the code was taken).
|
|
|
14
14
|
| [BobMcDear/attorch](https://github.com/BobMcDear/attorch) | MIT | `ops/_common.py`, `ops/conv2d.py`, `ops/conv_wrappers.py`, `ops/cross_entropy.py`, `ops/glu.py`, `ops/layernorm.py`, `ops/rmsnorm.py`, `ops/softmax.py` |
|
|
15
15
|
| [linkedin/Liger-Kernel](https://github.com/linkedin/Liger-Kernel) | BSD-2-Clause | `ops/rope.py` |
|
|
16
16
|
| [Dao-AILab/flash-attention](https://github.com/Dao-AILab/flash-attention) | BSD-3-Clause | `ops/flash_attention.py` (from the upstream flash_attn_triton.py), `ops/elementwise_wrappers.py` (its wrapper) |
|
|
17
|
+
| [fla-org/flash-linear-attention](https://github.com/fla-org/flash-linear-attention) | MIT | `ops/gated_delta_rule_chunked.py` (its chunked gated delta rule forward, re-written; **pinned**: the PyPI release fla-core 0.6.0, its source files named by their sha256 in the file's header) |
|
|
17
18
|
|
|
18
19
|
FlagGems publishes no NOTICE file; its Apache-2.0 license is reproduced below, and the changes are stated in each
|
|
19
20
|
file's header.
|
|
@@ -285,3 +286,26 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
285
286
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
286
287
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
287
288
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
289
|
+
|
|
290
|
+
### fla-org/flash-linear-attention — MIT
|
|
291
|
+
MIT License
|
|
292
|
+
|
|
293
|
+
Copyright (c) 2023-2026 Songlin Yang, Yu Zhang, Zhiyuan Li
|
|
294
|
+
|
|
295
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
296
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
297
|
+
in the Software without restriction, including without limitation the rights
|
|
298
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
299
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
300
|
+
furnished to do so, subject to the following conditions:
|
|
301
|
+
|
|
302
|
+
The above copyright notice and this permission notice shall be included in all
|
|
303
|
+
copies or substantial portions of the Software.
|
|
304
|
+
|
|
305
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
306
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
307
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
308
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
309
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
310
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
311
|
+
SOFTWARE.
|
|
@@ -189,6 +189,21 @@ class MetalStateFence
|
|
|
189
189
|
# the Metal kernels' release fence (record, completed, drain(pool)) over the Apple backend handed in; one without fence() / completed_fence() refused by name
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
+
`nbxtensor.memory.fixed_state` — a session's fixed-size state: the kinds whose bytes do not grow with the tokens
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
STATE_KINDS # ("recurrent", "conv"); "kv" is the paged KV cache's and is refused by name here
|
|
196
|
+
class StateDeclaration(kind, shape, dtype, ops)
|
|
197
|
+
# recurrent: shape ["batch", heads, k_dim, v_dim], float32 always; conv: ["batch", channels, taps-1], a floating
|
|
198
|
+
# dtype (the op's); `ops` the ordered op ids it serves, one buffer each; shape(batch), nbytes(batch) (exact, every op)
|
|
199
|
+
class FixedState(declaration, batch, devices, fence=None)
|
|
200
|
+
# allocated at zero, each op's buffer on its device (one index, or one per op), fixed addresses until forget:
|
|
201
|
+
# tensor(op_id) (the buffer a kernel writes in place), write(op_id, src), zero(), reorder(index) (an index gather
|
|
202
|
+
# of the batch rows, in place), copy() / restore() / release_copy() (the one kept copy: refused while one is kept),
|
|
203
|
+
# forget(); held_bytes(), copy_bytes(), has_copy, forgotten; host rewrites inside `fence` (drain before, record
|
|
204
|
+
# after); every other use refused by name
|
|
205
|
+
```
|
|
206
|
+
|
|
192
207
|
`nbxtensor.memory.kv_session` — a serving session's cache between turns (pure bookkeeping)
|
|
193
208
|
|
|
194
209
|
```python
|
|
@@ -901,6 +916,8 @@ def conv2d_wrapper(x, weight, bias=None, stride=1, padding=0, dilation=1, transp
|
|
|
901
916
|
# Convolution forward.
|
|
902
917
|
def conv1d_wrapper(x, weight, bias=None, stride=1, padding=0, dilation=1, groups=1)
|
|
903
918
|
# Conv1D via conv2d with unsqueeze.
|
|
919
|
+
def causal_conv1d_wrapper(x, weight, bias=None, state=None)
|
|
920
|
+
# The causal depthwise convolution over the sequence, with its state: (y, state_out); state = the last taps-1 input columns [B, C, K-1] at x's dtype.
|
|
904
921
|
def conv_transpose1d_wrapper(x, weight, bias=None, stride=1, padding=0, output_padding=0, groups=1, dilation=1)
|
|
905
922
|
# aten::conv_transpose1d — 1D transposed convolution.
|
|
906
923
|
def avg_pool2d_wrapper(x, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True, divisor_override=None)
|
|
@@ -1061,6 +1078,14 @@ def matmul_launches(a_shape, b_shape, a: NBXDtype, b: NBXDtype, native_bf16: boo
|
|
|
1061
1078
|
# `matmul_wrapper` (and `linear_wrapper`, which calls it with the transposed weight)
|
|
1062
1079
|
def lstm_launches(B: int, T: int, I: int, H: int, num_layers: int, bidirectional: bool, x: NBXDtype, native_bf16: bool)
|
|
1063
1080
|
# `lstm_wrapper` -> `_lstm_run_direction`, per layer and direction
|
|
1081
|
+
def gated_delta_rule_launches(dk: int, dv: int, q: NBXDtype, k: NBXDtype, v: NBXDtype, g: NBXDtype, beta: NBXDtype)
|
|
1082
|
+
# `gated_delta_rule_wrapper`: one launch of the serial scan at any length and batch (the length is never in the key)
|
|
1083
|
+
def gated_delta_rule_chunked_launches(dk: int, dv: int, q: NBXDtype, k: NBXDtype, v: NBXDtype, g: NBXDtype, beta: NBXDtype)
|
|
1084
|
+
# `gated_delta_rule_chunked_wrapper`: its three launches (prepare, state, output) at any length and batch, keyed by dk, dv and dtype tags
|
|
1085
|
+
def gated_delta_rule_op_launches(B: int, L: int, Hk: int, Hv: int, dk: int, dv: int, q: NBXDtype, k: NBXDtype, v: NBXDtype, g: NBXDtype, beta: NBXDtype)
|
|
1086
|
+
# `gated_delta_rule_op`: the launches of the form `gated_delta_rule_path` answers (refused by name where it refuses)
|
|
1087
|
+
def moe_route_launches(E: int, H: int, top_k: int, hidden: NBXDtype, router_weight: NBXDtype)
|
|
1088
|
+
# `moe_route`: one launch, one program per token row; key (E, H, top_k) and the five operands' dtype tags (n_group never in the key)
|
|
1064
1089
|
def dft_r2c_launches(M: int, N: int, onesided: bool, native_bf16: bool)
|
|
1065
1090
|
# `fft_r2c_wrapper` on a length that is not a power of two
|
|
1066
1091
|
def dft_c2r_launches(M: int, bins: int, N: int, native_bf16: bool)
|
|
@@ -1126,6 +1151,8 @@ def tiled_conv2d_launches(N: int, in_c: int, IH: int, IW: int, out_c: int, kh: i
|
|
|
1126
1151
|
# The launches of an op-level tiled conv
|
|
1127
1152
|
def conv_launches(x_shape, w_shape, stride, padding, dilation, transposed: bool, groups: int, x: NBXDtype, w: NBXDtype, compute: Optional[NBXDtype], band_bytes: int, depthwise_enabled: bool=True)
|
|
1128
1153
|
# `conv2d_wrapper` by the weight's rank
|
|
1154
|
+
def causal_conv1d_launches(x_shape, w_shape, x: NBXDtype, w: NBXDtype, compute: Optional[NBXDtype], band_bytes: int, depthwise_enabled: bool=True)
|
|
1155
|
+
# `causal_conv1d_wrapper`: the state joined (no key), then one depthwise conv1d over [B, C, K-1+L]
|
|
1129
1156
|
def softmax_feat_bucket(feat: int)
|
|
1130
1157
|
# The row length's class in a softmax key
|
|
1131
1158
|
def softmax_launches(rows: int, feat: int, log: bool, x: NBXDtype, out: NBXDtype)
|
|
@@ -1758,6 +1785,59 @@ def gather_kernel(inp, index, out, N, inp_dim_stride, idx_stride_outer, idx_stri
|
|
|
1758
1785
|
# Gather kernel — works for any tensor rank via pre-computed strides.
|
|
1759
1786
|
```
|
|
1760
1787
|
|
|
1788
|
+
`nbxtensor.ops.gated_delta_rule`
|
|
1789
|
+
|
|
1790
|
+
```python
|
|
1791
|
+
GATED_DELTA_RULE_INPUT_DTYPES = (float16, bfloat16, float32) # the dtypes q, k, v, beta may arrive in
|
|
1792
|
+
GATED_DELTA_RULE_COMPUTE_DTYPES = (float32,) # the compute dtype this release runs in
|
|
1793
|
+
GATED_DELTA_RULE_MIN_LENGTH = 1 # one token; L is symbolic above it (no token: refused by name)
|
|
1794
|
+
def gated_delta_rule_scan_kernel(q_ptr, k_ptr, v_ptr, g_ptr, beta_ptr, s_in_ptr, o_ptr, ...)
|
|
1795
|
+
# serial scan, grid (B, Hv, cdiv(dv, BV)); a dk x BV float32 state tile stays on chip; BV and warps are certified candidates
|
|
1796
|
+
def gated_delta_rule_shapes(q, k, v, g, beta, state=None) -> tuple
|
|
1797
|
+
def gated_delta_rule_dtypes(q, k, v, g, beta, state, compute_dtype) -> NBXDtype # on the operands' NBXDtypes (state None: zeros)
|
|
1798
|
+
def gated_delta_rule_wrapper(q, k, v, g, beta, state=None, *, qk_l2norm: bool, eps: float, scale: float, compute_dtype)
|
|
1799
|
+
# The gated delta rule over q, k [B, L, Hk, dk], v [B, L, Hv, dv], g, beta [B, L, Hv] from state [B, Hv, dk, dv]
|
|
1800
|
+
# float32 (None: zeros) -> (o [B, L, Hv, dv] at v's dtype, state_out float32), at any length L >= 1: the state
|
|
1801
|
+
# handed back is the next call's start (a prompt in two calls, or then one token at a time, is one recurrence).
|
|
1802
|
+
# Refuses by name: compute dtype not float32, g or state not float32, inputs not float16/bfloat16/float32, bad
|
|
1803
|
+
# shapes, Hv % Hk != 0, L < 1. No chunk size anywhere: not an argument, not in the launch key.
|
|
1804
|
+
GATED_DELTA_RULE_CENSUS # Path of gated_delta_rule_census.json beside the module: every call of the op, by its dimensions
|
|
1805
|
+
GATED_DELTA_RULE_CENSUS_FORMAT = "nbx-gated-delta-rule-census/1"
|
|
1806
|
+
GATED_DELTA_RULE_PATHS = ("serial", "chunked")
|
|
1807
|
+
def gated_delta_rule_census() -> dict
|
|
1808
|
+
# the census read and checked (format; every cell's B, Hk, Hv, dk, dv, dtype and chunked_from_length: null or a
|
|
1809
|
+
# length above one token); a file that does not hold is refused by name (RuntimeError)
|
|
1810
|
+
def gated_delta_rule_path(B: int, L: int, Hk: int, Hv: int, dk: int, dv: int, dtype: NBXDtype) -> str
|
|
1811
|
+
# "serial" for one token; otherwise the call's cell: "chunked" when its chunked_from_length is a length <= L,
|
|
1812
|
+
# "serial" when null or longer; dimensions in no cell: ValueError naming them and the measurement tool
|
|
1813
|
+
def gated_delta_rule_op(q, k, v, g, beta, state=None, *, qk_l2norm: bool, eps: float, scale: float, compute_dtype)
|
|
1814
|
+
# the serial scan or the chunked form, as gated_delta_rule_path answers; the same contract and state either way.
|
|
1815
|
+
# Dispatch name: "gated_delta_rule".
|
|
1816
|
+
```
|
|
1817
|
+
|
|
1818
|
+
`nbxtensor.ops.gated_delta_rule_chunked` (ported from flash-linear-attention, MIT; `THIRD_PARTY_NOTICES.md`)
|
|
1819
|
+
|
|
1820
|
+
```python
|
|
1821
|
+
GATED_DELTA_RULE_SUB_BLOCK = 16 # the sub-block of the fused triangular solve
|
|
1822
|
+
GATED_DELTA_RULE_CHUNK = 64 # 4 sub-blocks: the tokens solved together
|
|
1823
|
+
def gated_delta_rule_chunk_prepare_kernel(...) # grid (chunks, B * Hv): gc, W, U of each chunk
|
|
1824
|
+
def gated_delta_rule_chunk_state_kernel(...) # grid (cdiv(dv, BV), B * Hv): the serial loop over chunks, V' and the states
|
|
1825
|
+
def gated_delta_rule_chunk_output_kernel(...) # grid (cdiv(dv, BV), chunks, B * Hv): the output
|
|
1826
|
+
def gated_delta_rule_chunked_workspace(B: int, L: int, Hv: int, dk: int, dv: int) -> Dict[str, Tuple[int, ...]]
|
|
1827
|
+
# the float32 workspace by name: w [B, L, Hv, dk], u [B, L, Hv, dv], gc [B, L, Hv], states [B, cdiv(L, 64), Hv, dk, dv]
|
|
1828
|
+
def gated_delta_rule_chunked_launch(q, k, v, g, beta, state, out, state_out, ws, *, qk_l2norm: bool, eps: float, scale: float) -> None
|
|
1829
|
+
# the three launches over buffers already formed (the workspace by name)
|
|
1830
|
+
def gated_delta_rule_chunked_wrapper(q, k, v, g, beta, state=None, *, qk_l2norm: bool, eps: float, scale: float, compute_dtype)
|
|
1831
|
+
# the contract of gated_delta_rule_wrapper (shapes, dtypes, refusals, the state in and out float32), chunked
|
|
1832
|
+
```
|
|
1833
|
+
|
|
1834
|
+
Its cost: `nbxtensor.ops._cost.gated_delta_rule(q, k, v, g, beta, state, *, qk_l2norm, compute_dtype) -> Cost` on
|
|
1835
|
+
`_cost.Spec`s, refused where the wrapper refuses: the output and the state out (both returned, no workspace), every
|
|
1836
|
+
operand read once, both outputs written once, the recurrence's flops at L tokens.
|
|
1837
|
+
The chunked form's: `nbxtensor.ops._cost.gated_delta_rule_chunked(q, k, v, g, beta, state, *, qk_l2norm,
|
|
1838
|
+
compute_dtype) -> Cost`, the same refusals: the output and the state out (returned), then the float32 workspace
|
|
1839
|
+
`gated_delta_rule_chunked_workspace` names; the bytes of its three launches; its products' flops per 64-token chunk.
|
|
1840
|
+
|
|
1761
1841
|
`nbxtensor.ops.ge`
|
|
1762
1842
|
|
|
1763
1843
|
```python
|
|
@@ -2151,6 +2231,28 @@ def fused_moe_across_devices(hidden_states, flat_indices, flat_scores, tables, t
|
|
|
2151
2231
|
# The routed SwiGLU sum of a layer whose experts sit on several devices, [M, K] on `act_dev`: for each device of `tables.device_experts`, the pairs routed to its experts are aligned there and mapped back to their flat positions, the three grouped passes run against the device's own table, and its per-token share crosses back and is added. `tables`: the layer's `PtrTables`; `n_gate`: the experts' intermediate width; `block_m`: the alignment's block (`moe_wrappers.MOE_BLOCK_M`)
|
|
2152
2232
|
```
|
|
2153
2233
|
|
|
2234
|
+
`nbxtensor.ops.moe_route`
|
|
2235
|
+
|
|
2236
|
+
```python
|
|
2237
|
+
MOE_ROUTE_INPUT_DTYPES = (float16, bfloat16, float32) # the dtypes hidden and router_weight may arrive in
|
|
2238
|
+
MOE_ROUTE_SCORE_FNS = ("sigmoid", "softmax")
|
|
2239
|
+
MOE_ROUTE_GROUP_SCORES = ("top2_sum", "max")
|
|
2240
|
+
MOE_ROUTE_MAX_EXPERTS = 256 # one row of experts per program
|
|
2241
|
+
MOE_ROUTE_TOKENS = (1,) # the token step; more tokens are refused by name
|
|
2242
|
+
def moe_route_kernel(x_ptr, w_ptr, bias_ptr, idx_ptr, wt_ptr, E, H, TOP_K, N_GROUP, TOPK_GROUP, ...)
|
|
2243
|
+
# one program per token row: the fp32 router product over BLOCK_H tiles, scores, bias, groups, two selections, gather, renorm, scale in registers; BLOCK_H and warps are certified candidates
|
|
2244
|
+
def moe_route_shapes(hidden, router_weight, choice_bias) -> tuple # (T, H, E)
|
|
2245
|
+
def moe_route_dtypes(hidden, router_weight, choice_bias) -> None
|
|
2246
|
+
def moe_route_attributes(E, *, score_fn, top_k, n_group, topk_group, group_score, fill, renorm_eps, scale) -> None
|
|
2247
|
+
def moe_route(hidden, router_weight, *, choice_bias, score_fn, top_k, n_group, topk_group, group_score, fill, renorm_eps, scale)
|
|
2248
|
+
# The routing of hidden [T, H] over router_weight [E, H] (+ choice_bias [E] float32 or None) -> (indices [T, top_k]
|
|
2249
|
+
# int64, weights [T, top_k] float32): s = sigmoid|softmax(fp32 product), choice c = s + bias, the topk_group best of
|
|
2250
|
+
# n_group groups by top2_sum|max of c (the others at `fill`), top_k of c, weights = s at the chosen ids, then
|
|
2251
|
+
# / (sum + renorm_eps) when renorm_eps is not None, then * scale. n_group 1 = the ungrouped routing. Slots largest
|
|
2252
|
+
# first, the slot order not part of the contract. No attribute has a default. Refuses by name: bad shapes or dtypes,
|
|
2253
|
+
# E > 256, T != 1, groups that do not cut E, topk_group or top_k out of range, fill NaN or +inf, bad renorm_eps.
|
|
2254
|
+
```
|
|
2255
|
+
|
|
2154
2256
|
`nbxtensor.ops.mse_loss`
|
|
2155
2257
|
|
|
2156
2258
|
```python
|
|
@@ -2733,8 +2835,10 @@ STATE.site_of(filename) -> bool # the caller's predicate: which stack frame na
|
|
|
2733
2835
|
install_seams() -> None # once: Triton's launch property, the allocator interceptor, NBXTensor.item's guard
|
|
2734
2836
|
arm_launch_recorder(on: bool) -> None
|
|
2735
2837
|
KERNEL, MEMCPY, MEMSET, SETDEV, SYNC, H2D # the action tags
|
|
2838
|
+
BOUND # a KERNEL action the driver resolved once (`prepare_launch`): the direct replay's, never recorded
|
|
2736
2839
|
class FrozenPlan(records, slab, arena_list, input_slots, scan_limit=None, extra_scan=(), scan_slots=None)
|
|
2737
2840
|
.replay(arena) -> None # rebound inputs copied in, the actions run (graphs or direct), arena restored, outputs fresh
|
|
2841
|
+
# (the direct replay runs each launch as the driver resolved it once, where it can)
|
|
2738
2842
|
.crosses_cards() -> bool
|
|
2739
2843
|
plan_of(state) / drop_plan(plans, sig) # a plan's resources, and their release (slabs retired, graph destroyed)
|
|
2740
2844
|
heap_copy(t) -> NBXTensor ; copy_into(frozen, new) -> None # the copies by logical values (views kept in order)
|
|
@@ -2789,6 +2893,11 @@ def rownorm_oracle(x, w, b, layer) # layer norm (eps 1e-5) or RMS norm
|
|
|
2789
2893
|
def row_reduce_oracle(x, red) # "mean" / "sum" / "amax" over rows
|
|
2790
2894
|
def groupnorm_oracle(x, w, b) # one channel per group, eps 1e-5
|
|
2791
2895
|
def conv_oracle(x, wt, stride, padding, dilation, groups)
|
|
2896
|
+
def head_windows(batch: int, heads: int, per_head: int) -> Optional[List[(batch row, h0, h1)]] # None when whole; a head is never cut
|
|
2897
|
+
class HeadWindowedOracle(blocks, head_axis, batch, heads) # windows over batch rows x independent heads, whole length kept
|
|
2898
|
+
def delta_rule_oracle(q, k, v, g, beta, state=None, *, qk_l2norm, eps, scale) # (out, state) float64 of the gated delta rule
|
|
2899
|
+
def causal_conv1d_oracle(x, weight, bias=None, state=None) -> (y, state_out) # the state joined, one shifted product a tap
|
|
2900
|
+
def moe_route_oracle(hidden, router_weight, choice_bias, *, score_fn, top_k, n_group, topk_group, group_score, fill, renorm_eps, scale) # (indices, weights, choice values, group scores) float64 of the routing op
|
|
2792
2901
|
def host_values(t) -> np.ndarray # a kernel's output as numbers (bf16 decoded)
|
|
2793
2902
|
def materialise(piece) # a device cut made contiguous before it crosses
|
|
2794
2903
|
def deviation_against(out_tensor, oracle) -> float # read off the device only where the oracle measures
|
|
@@ -2831,6 +2940,16 @@ def stored_config(d) # a recorded configuration back as
|
|
|
2831
2940
|
def config_dict(cfg) -> dict # a Triton config as a certified directory records it
|
|
2832
2941
|
```
|
|
2833
2942
|
|
|
2943
|
+
### `nbxtensor.backend.cuda_launch` — a CUDA launch's refusals, dimensions and argument cells
|
|
2944
|
+
|
|
2945
|
+
```python
|
|
2946
|
+
def refuse(param_counts, function, params, names, trailing) -> None # the live launch's refusals, by name
|
|
2947
|
+
def dims(grid, block) -> Optional[tuple] # (gx, gy, gz, bx, by, bz); None for an empty grid
|
|
2948
|
+
def cells(kinds) -> (storage, pointer_array) # one C cell per parameter kind, the array over them
|
|
2949
|
+
class BoundCudaLaunch # .run(stream): one cuLaunchKernel over its own cells
|
|
2950
|
+
def prepare(launch, check, param_counts, function, grid, block, shared, params, trailing) -> Optional[BoundCudaLaunch]
|
|
2951
|
+
```
|
|
2952
|
+
|
|
2834
2953
|
### `nbxtensor.backend.launcher_contract` — the contract a launch driver meets (BACKENDS.md section 1)
|
|
2835
2954
|
|
|
2836
2955
|
`nbxtensor.backend.launcher_contract`
|
|
@@ -2882,6 +3001,11 @@ def raise_failed_asserts() -> None
|
|
|
2882
3001
|
# After a flush: raise for the first launch whose assert failed.
|
|
2883
3002
|
def dispatch(pipe, stream, pointers, scalars, trailing, grid, block, exposes=False, reads=False, shared=0, barrier=False)
|
|
2884
3003
|
# Encode one launch on the stream's serial compute encoder.
|
|
3004
|
+
def bind(pipe, pointers, scalars, grid, block, exposes=False, reads=False, shared=0, barrier=False) -> BoundLaunch
|
|
3005
|
+
# A launch with no trailing buffer resolved once (the checks, each pointer's allocation), refused by name as
|
|
3006
|
+
# bind_pointer refuses.
|
|
3007
|
+
class BoundLaunch
|
|
3008
|
+
# .run(stream): encode the resolved launch only (a frozen plan's replay: its addresses never move)
|
|
2885
3009
|
```
|
|
2886
3010
|
|
|
2887
3011
|
`nbxtensor.backend.metal_device`
|
|
@@ -3007,6 +3131,11 @@ def load_to_pinned_host(raw: bytes, shape: tuple, source_dtype: NBXDtype, target
|
|
|
3007
3131
|
def place_in_arena(raw, shape: tuple, nbx_dtype: NBXDtype, np_dtype, target_dtype: NBXDtype, krsc: bool,
|
|
3008
3132
|
arena: ComponentArena, target_dev: int, io) -> NBXTensor
|
|
3009
3133
|
# one safetensors tensor's raw bytes placed in a component's device arena at its target dtype
|
|
3134
|
+
def stack_shards(sources: Sequence[ShardRef | ShardConcat | ShardStack], axis: int, out_dtype=None) -> NBXTensor
|
|
3135
|
+
def concat_shards(sources, axis: int, out_dtype=None) -> NBXTensor
|
|
3136
|
+
# ONE host tensor from stored tensors (ShardRef(path, name)), bit-equal to NBXTensor.stack / cat; peak memory =
|
|
3137
|
+
# result + one source; a source may itself be a ShardConcat / ShardStack (concat per expert, then stack, no
|
|
3138
|
+
# intermediate); dtype kept (out_dtype other than the stored one, mixed dtypes or shapes: ShardsRefused by name)
|
|
3010
3139
|
def half_in_place(ptr: int, count: int, device_idx: int)
|
|
3011
3140
|
# the loader's raw bf16 buffer at `ptr` rewritten in place as float16 by the library's one device conversion
|
|
3012
3141
|
# (ops.wrappers.bf16_to_fp16_gpu with `out=` the same buffer)
|
|
@@ -3339,6 +3468,8 @@ class Driver # what a backend implements: load a binary, launc
|
|
|
3339
3468
|
class ModuleDriver(Driver) # the base of the drivers that load a vendor binary as a module (CUDA, HIP, Level Zero)
|
|
3340
3469
|
def ctypes_slot(kind: str) # the C cell one launch parameter of this kind lives in
|
|
3341
3470
|
class CudaDriver(Driver) # libcuda through ctypes
|
|
3471
|
+
# .prepare_launch(function, grid, block, shared, params, ...) -> a launch resolved once (one cuLaunchKernel at
|
|
3472
|
+
# replay) or None where .launch would refuse; the Metal driver's prepare_launch answers the same (BoundLaunch)
|
|
3342
3473
|
class HipDriver(Driver) # the HIP runtime's module API (hsaco code objects; proven against a stand-in, no AMD card has run it)
|
|
3343
3474
|
class CudaCompiledKernel # the result of compiling once, launched many times (contract object)
|
|
3344
3475
|
def register_driver(driver: Optional[Driver]) -> None # install the driver this process launches through
|