nx_tensor.nx
buildroot/runtime/nx_tensor.nx
about
dependencies 2 imports · 119 importers
diagram shows first 10 each side; +0 more imports, +109 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_activation_steer.nxnx_actor_role_llm.nxnx_actor_role_llm_test.nxnx_actor_role_llm_v2_real_test.nxnx_attention.nxnx_attention_test.nxnx_attn_window.nxnx_attribution.nxnx_bench_v1_vs_v2_test.nxnx_blas_i64.nxnx_coder_swap_gate.nxnx_companion_compose_test.nxnx_compute_node.nxnx_compute_runner.nxnx_compute_runner_test.nxnx_conv2d.nxnx_dispatcher.nxnx_dual_companion_compose_test.nxnx_embedding.nxnx_flash_attention.nxnx_flash_attention_test.nxnx_gelu.nxnx_gguf_dequant_kat_gate.nxnx_gguf_load.nxnx_gguf_load_block.nxnx_gguf_load_block_test.nxnx_gguf_load_lazy.nxnx_gguf_load_lazy_test.nxnx_gguf_load_model.nxnx_gguf_load_model_test.nxnx_gguf_load_q4k_test.nxnx_gguf_load_test.nxnx_gguf_type_census_gate.nxnx_gpu_export.nxnx_gpu_serve_gate.nxnx_groupnorm.nxnx_layernorm.nxnx_live_fire_gguf.nxnx_live_fire_gguf_test.nxnx_llm_capcheck.nxnx_llm_loopb_gate.nxnx_llm_ppl_bench_gate.nxnx_llm_run.nxnx_llm_run_v2.nxnx_llm_run_v2_test.nxnx_nofloat_arch_config_gate.nxnx_nofloat_arch_moe_gate.nxnx_nofloat_llm.nxnx_nofloat_moe_real_gate.nxnx_nofloat_olmoe_forward_gate.nxnx_nofloat_olmoe_gate.nxnx_nofloat_q6k_gate.nxnx_nofloat_qwen_bias_probe.nxnx_nofloat_qwen_decode_gate.nxnx_nofloat_qwen_diag_gate.nxnx_nofloat_qwen_dqprobe_gate.nxnx_nofloat_qwen_encode_gate.nxnx_nofloat_qwen_encode_prep_gate.nxnx_nofloat_qwen_fastgen_gate.nxnx_nofloat_qwen_fastgen_i32_gate.nxnx_nofloat_qwen_fastgen_i8_gate.nxnx_nofloat_qwen_fidelity_gate.nxnx_nofloat_qwen_forward_gate.nxnx_nofloat_qwen_gen_gate.nxnx_nofloat_qwen_kvgen_gate.nxnx_nofloat_qwen_rope_h2h_gate.nxnx_nofloat_qwen_stack_gate.nxnx_nofloat_qwen_text_gate.nxnx_nofloat_qwen_tok_gate.nxnx_nofloat_qwen_wload_gate.nxnx_nofloat_serve_core.nxnx_nofloat_tok.nxnx_numeric_oracle.nxnx_numeric_oracle_test.nxnx_olmoe_recon2_gate.nxnx_olmoe_recon_gate.nxnx_placement.nxnx_placement_test.nxnx_q4k_dot_simd.nxnx_q4k_gemm_mt.nxnx_q4k_linear.nxnx_q4k_linear_hp.nxnx_q4k_real_gemm.nxnx_q4k_speed_bench.nxnx_q5k_dot_simd.nxnx_quad_companion_compose_test.nxnx_quant_block.nxnx_quant_block_q8.nxnx_quant_block_test.nxnx_quant_q4k.nxnx_quant_q4k_test.nxnx_qwen_blk0_types.nxnx_qwen_hybrid_attn.nxnx_qwen_hybrid_ffn.nxnx_qwen_hybrid_qkv.nxnx_real_gguf_test.nxnx_rmsnorm.nxnx_sampler.nxnx_silu.nxnx_sparse_tensor.nx +19 more (shown cap 100 declared)
structs
| 101 | struct NxTensor |
consts
| 48 | const NX_DT_I64: nx_int = 0 // 8 bytes per element |
| 49 | const NX_DT_I32: nx_int = 1 // 4 |
| 50 | const NX_DT_I16: nx_int = 2 // 2 |
| 51 | const NX_DT_I8: nx_int = 3 // 1 |
| 52 | const NX_DT_F32: nx_int = 4 // 4 (compiler-gated) |
| 53 | const NX_DT_F16: nx_int = 5 // 2 |
| 54 | const NX_DT_BF16: nx_int = 6 // 2 |
| 55 | const NX_DT_F64: nx_int = 7 // 8 |
| 56 | const NX_DT_Q4_0: nx_int = 8 // packed 4-bit + 1 fp scale per block |
| 57 | const NX_DT_Q4_K: nx_int = 9 |
| 58 | const NX_DT_Q5_K: nx_int = 10 |
| 59 | const NX_DT_Q8_0: nx_int = 11 |
| 60 | const NX_DT_N_KINDS: nx_int = 12 |
| 99 | const NX_T_MAX_NDIM: nx_int = 8 |
| 115 | const NX_T_BYTES: nx_int = 64 // 8 fields * 8 |
| 116 | const NX_T_SHAPE_BYTES: nx_int = 64 // NX_T_MAX_NDIM * 8 |
| 123 | const NX_T_OK: nx_int = 0 |
| 124 | const NX_T_ERR_BAD_DTYPE: nx_int = 1 // unknown or out-of-range dtype |
| 125 | const NX_T_ERR_DTYPE_GATED: nx_int = 2 // dtype known but compiler/codec not yet supports it |
| 126 | const NX_T_ERR_BAD_NDIM: nx_int = 3 // ndim < 0 or > NX_T_MAX_NDIM |
| 127 | const NX_T_ERR_BAD_SHAPE: nx_int = 4 // any shape[i] <= 0 |
| 128 | const NX_T_ERR_OVERFLOW: nx_int = 5 // numel overflow i64 |
| 129 | const NX_T_ERR_N_VERDICTS: nx_int = 6 |
functions
| 62 | func nx_dt_is_valid(d: nx_int) -> nx_int |
| 72 | func nx_dt_element_bytes(d: nx_int) -> nx_int |
| 88 | func nx_dt_is_implemented(d: nx_int) -> nx_int |
| 131 | func nx_t_verdict_is_valid(v: nx_int) -> nx_int called by 1: main |
| 142 | func nx_t_compute_strides_rowmajor(shape: *i64, ndim: nx_int, stride_out: *i64) -> nx_int |
| 159 | func nx_t_alloc(dtype: nx_int, shape_in: *i64, ndim: nx_int, |
| 229 | func nx_t_fill_zero(t: *NxTensor) -> nx_int |
| 243 | func nx_t_flat_offset(t: *NxTensor, idx: *i64) -> nx_int |
| 254 | func nx_t_get_i64(t: *NxTensor, idx: *i64) -> nx_int |
| 262 | func nx_t_set_i64(t: *NxTensor, idx: *i64, v: nx_int) -> nx_int |
| 275 | func nx_t_is_contiguous(t: *NxTensor) -> nx_int |
| 293 | func nx_t_reshape(t: *NxTensor, new_shape: *i64, new_ndim: nx_int) -> nx_int |
| 334 | func nx_t_permute(t: *NxTensor, permute_axes: *i64) -> *NxTensor |