bitsandbytes-cpu-fork 0.50.2.dev10__tar.gz → 0.50.2.dev11__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.
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/MANIFEST.in +19 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10/bitsandbytes_cpu_fork.egg-info → bitsandbytes_cpu_fork-0.50.2.dev11}/PKG-INFO +11 -9
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/README.md +10 -8
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/__init__.py +1 -1
- bitsandbytes_cpu_fork-0.50.2.dev11/bitsandbytes/libbitsandbytes_cpu.dll +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11/bitsandbytes_cpu_fork.egg-info}/PKG-INFO +11 -9
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/cpu_cache.h +160 -15
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/cpu_ops.cpp +69 -13
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/test_cpu_cache.cpp +1 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/API_REFERENCE.md +1 -1
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/API_REFERENCE_EN.md +1 -1
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/MOTION_BOUNDARY.md +3 -3
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/MOTION_BOUNDARY_EN.md +3 -3
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/QUICKSTART.md +34 -20
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/QUICKSTART_EN.md +38 -20
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/TECHNICAL_GUIDE.md +17 -15
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/TECHNICAL_GUIDE_EN.md +17 -15
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/TECH_REPORT.md +28 -8
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/TECH_REPORT_EN.md +33 -8
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/check_docs.py +29 -6
- bitsandbytes_cpu_fork-0.50.2.dev10/bitsandbytes/libbitsandbytes_cpu.dll +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/LICENSE +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/__main__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/_cpu_caps.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/_ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/autograd/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/autograd/_functions.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/cpu/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/cpu/ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/cuda/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/cuda/ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/default/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/default/ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/hpu/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/hpu/ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/mps/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/mps/ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/triton/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/triton/kernels_4bit.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/triton/kernels_8bit_quant.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/triton/kernels_optim.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/triton/ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/utils.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/xpu/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/backends/xpu/ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/cextension.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/cli.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/consts.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/cuda_specs.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/detect_cpu.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/diagnostics/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/diagnostics/cuda.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/diagnostics/main.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/diagnostics/utils.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/disk_balancer.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/efst.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/functional.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/fused/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/fused/_native.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/fused/_ref.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/gdn_cpu.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/nn/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/nn/modules.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/nn/parametrize.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/__init__.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/adagrad.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/adam.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/adamw.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/adamw4bit.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/ademamix.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/lamb.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/lars.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/lion.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/optimizer.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/rmsprop.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/optim/sgd.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/py.typed +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/q3bit.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/torch_cpu_kit.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/utils.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes/vcomp140.dll +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes_cpu_cli.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes_cpu_fork.egg-info/SOURCES.txt +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes_cpu_fork.egg-info/dependency_links.txt +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes_cpu_fork.egg-info/entry_points.txt +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes_cpu_fork.egg-info/requires.txt +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/bitsandbytes_cpu_fork.egg-info/top_level.txt +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/build_linux.sh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/build_manual/build_manual.bat +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/build_manual/export.def +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/build_manual/export_avx512.def +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/build_manual/export_generic.def +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/build_manual/selftest_win.bat +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/build_termux.sh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/avx2_gemv_4bit.h +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/common.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/common.h +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/compat.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/compat_device.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/cpu_features.h +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/cpu_gdn.cpp +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/cpu_ops.h +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit.cu +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit_common.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit_mma.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit_simt.cu +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit_simt.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit_sm75.cu +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit_sm75.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit_sm80.cu +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/gemm_4bit_sm80.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/kernels.cu +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/kernels.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/ops.cu +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/ops.cuh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/pythonInterface.cpp +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/test_avx2_gemv_4bit.cpp +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/xpu_kernels.cpp +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/xpu_kernels.h +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/xpu_ops.cpp +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/xpu_ops.h +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/EPYC_VALIDATION.md +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/ISA_MATRIX.md +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/WHEEL_PLATFORM_NOTES.md +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/examples/compile_inference.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/examples/cpu/cpu_training.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/examples/int8_inference_huggingface.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/examples/xpu/benchmark_paged_memory.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/examples/xpu/paged_xpu_training.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/pyproject.toml +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/selftest_cpu.c +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/setup.cfg +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/setup.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_autograd.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_cpu_e2e.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_cuda_setup_evaluator.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_functional.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_generation.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_linear4bit.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_linear8bitlt.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_modules.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_ops.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_optim.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_parametrize.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tests/test_rmsnorm_fwd_cpu.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/carve_selftest.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/create_github_release.ps1 +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/dump_signatures.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/gen_api_reference.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/mft_recover.c +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/mft_recover_gui.c +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/mft_recover_gui.manifest +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/mft_selftest.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/mftcore.h +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/patch_dev9.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/publish.ps1 +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/recovery_pipeline_selftest.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/sector_carve.c +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/sector_carve_gui.c +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/sector_mirror.c +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/sector_mirror_gui.c +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/train_llm_sft.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/verify_help_examples.py +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/verify_linux_cli.sh +0 -0
- {bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/tools/verify_train_release.py +0 -0
|
@@ -28,6 +28,25 @@ graft tools
|
|
|
28
28
|
# three. Their .c sources stay in the sdist and in the repository.
|
|
29
29
|
global-exclude *.exe
|
|
30
30
|
global-exclude *.exe.manifest
|
|
31
|
+
# Not shipping byte-code: a stale __pycache__ inside csrc/ or tools/ can otherwise end up in the
|
|
32
|
+
# sdist, and a .pyc built by a different interpreter is worse than useless to the recipient
|
|
33
|
+
# (it is silently ignored, or it shadows nothing). The source is always there.
|
|
34
|
+
global-exclude *.pyc
|
|
35
|
+
global-exclude *.pyo
|
|
36
|
+
prune tools/__pycache__
|
|
37
|
+
# Build outputs are not sources. The tools/ directory holds compiled .obj files next to the .c
|
|
38
|
+
# they came from, and a local Linux build leaves libbitsandbytes_*.so in bitsandbytes/. A sdist
|
|
39
|
+
# built from such a tree carried 5.5 MB of them (a 4.1 MB AVX-512 .so among them) on every
|
|
40
|
+
# platform, because an egg-info SOURCES.txt written by that earlier build kept them listed.
|
|
41
|
+
# The Windows DLL stays: it is the prebuilt kernel this fork ships.
|
|
42
|
+
global-exclude *.obj
|
|
43
|
+
global-exclude *.pdb
|
|
44
|
+
global-exclude *.o
|
|
45
|
+
global-exclude *.a
|
|
46
|
+
global-exclude *.lib
|
|
47
|
+
global-exclude *.exp
|
|
48
|
+
global-exclude *.so
|
|
49
|
+
global-exclude *.dylib
|
|
31
50
|
include build_linux.sh
|
|
32
51
|
include build_termux.sh
|
|
33
52
|
include selftest_cpu.c
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bitsandbytes-cpu-fork
|
|
3
|
-
Version: 0.50.2.
|
|
3
|
+
Version: 0.50.2.dev11
|
|
4
4
|
Summary: bitsandbytes with a pure-CPU training backend (AVX2 / NEON): 8-bit optimizers, fused GDN, gemm_8bit, disk balancer. No GPU required.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: repository, https://github.com/Ganyvnanoaa09-0906/bitsandbytes-CPU
|
|
@@ -36,12 +36,12 @@ Dynamic: license-file
|
|
|
36
36
|
> toolkit and no driver** — just an AVX2 x86-64 CPU (or ARM64 NEON), the CPU build of PyTorch,
|
|
37
37
|
> and 12–16 GB of RAM.
|
|
38
38
|
|
|
39
|
-
**Version: `0.50.2.
|
|
39
|
+
**Version: `0.50.2.dev11`** · import name is unchanged (`import bitsandbytes as bnb`) · MIT.
|
|
40
40
|
|
|
41
41
|
What the CPU backend provides: 8-bit blockwise optimizers (≈2.3 bytes of state per parameter
|
|
42
42
|
instead of 8; the 4-bit optimizer ≈1.03), 4/8-bit layers that run on CPU tensors, the fused
|
|
43
43
|
Gated DeltaNet kernel for Qwen3-Next / Qwen3.5 linear attention, fused `gemm_8bit`, fused
|
|
44
|
-
RMSNorm/SwiGLU, an SSD cold-memory balancer, and a CPU training/concurrency toolbox.
|
|
44
|
+
RMSNorm/SwiGLU (with NT-store fast paths for large outputs), an SSD cold-memory balancer, and a CPU training/concurrency toolbox.
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -365,12 +365,12 @@ the zig manylinux_2_17 portable build and the devtoolset-8 manylinux_2_17 **Open
|
|
|
365
365
|
```bash
|
|
366
366
|
bash build_linux.sh --selftest # C kernels: 9 checks (quantize/gemm_8bit/gemv_4bit/
|
|
367
367
|
# AdamW8bit/vector-vs-scalar/2-3bit dequant/fused GEMM)
|
|
368
|
-
python test_efst_regressions.py # EFST: nested blocks, 3-D tensor experts, routing usage
|
|
369
|
-
python test_q3bit_kernels.py # 2/3-bit research prototype (old DLL-based tests)
|
|
370
|
-
python test_q3bit_api.py # public q3bit API: pack/dequant/gemm, QuantLinear3bit, fallback
|
|
371
|
-
python test_adamw4bit.py # restored 4-bit optimizer: state bytes, native vs torch, fp32 tracking
|
|
372
|
-
python test_concurrency_plan.py # planner / memory estimate / tune_threads / launcher
|
|
373
|
-
python test_disk_balancer_safety.py # data-safety rules for the disk balancer
|
|
368
|
+
python scripts/test/test_efst_regressions.py # EFST: nested blocks, 3-D tensor experts, routing usage
|
|
369
|
+
python scripts/test/test_q3bit_kernels.py # 2/3-bit research prototype (old DLL-based tests)
|
|
370
|
+
python scripts/test/test_q3bit_api.py # public q3bit API: pack/dequant/gemm, QuantLinear3bit, fallback
|
|
371
|
+
python scripts/test/test_adamw4bit.py # restored 4-bit optimizer: state bytes, native vs torch, fp32 tracking
|
|
372
|
+
python scripts/test/test_concurrency_plan.py # planner / memory estimate / tune_threads / launcher
|
|
373
|
+
python scripts/test/test_disk_balancer_safety.py # data-safety rules for the disk balancer
|
|
374
374
|
```
|
|
375
375
|
|
|
376
376
|
## Documentation
|
|
@@ -397,6 +397,8 @@ The long-form docs live in the repository (`bitsandbytes/docs_cpu/`, Chinese and
|
|
|
397
397
|
| `0.50.2.dev7` | documentation release: README rewritten for the CPU fork (install/wheels/platform matrix, feature table, measured performance, limitations, tests, full dev1→dev7 changelog, EFST/disk-balancer/toolbox examples) |
|
|
398
398
|
| `0.50.2.dev8` | **restored `AdamW4bit`** (the kernel was dropped when dev4 vendored upstream; now scalar C kernel + torch fallback, 1.031 B/param); **new `bitsandbytes.q3bit` API** — `quantize_3bit`/`dequantize_3bit`/`gemm_3bit`/`gemm_3bit_transposed`, `QuantLinear3bit` (frozen 3-bit base + LoRA), `convert_linears_3bit`, native kernels on Linux with identical pure-torch fallback; CLI reference now includes 4bitopt/q3bit and all 43 examples execute in CI-style verification |
|
|
399
399
|
| `0.50.2.dev9` | **Windows native kernels**: CI now compiles the MSVC DLL from the current csrc and the export list includes the 4-bit optimizer and 2/3-bit symbols (they were silently missing before); **q3bit real-model validation** on Qwen3-1.7B (frozen 3-bit base + LoRA, eval 4.34→4.03 over 80 steps, RSS −67%, native step 7.7 s vs fp32 5.5 s); fixed the causal-LM **double-shift** label bug in the iGPU training kit (Windows package v0.1.2) |
|
|
400
|
+
| `0.50.2.dev10` | **NTFS recovery toolkit** (`sector_carve`, `mft_recover`, CLI + GUI, selftests) and the **video E2E pipeline** (generation/training, LCM and motion diagnostics); AVX2 4-bit GEMV fixes (wrong FP4 codebook, lazy-init race, non-divisible blocksize); gt1030 probe scripts and docs |
|
|
401
|
+
| `0.50.2.dev11` | **NT-store fast paths**: 4-bit dequant writes bypass the cache above 16 MiB (1.7–2.0× at 32–64 MB) and RMSNorm chooses NT by total footprint (x+res+out vs per-CCX L3); CPUID L3-sharing mask fix and the NT threshold wired to one macro; **byte-reproducible sdist** with an identity gate that audits the uploaded bytes (`--sdist`, 2-DLL policy, 20 adversarial cases) plus a docs gate requiring all six ZH/EN docs; repo regrouping into `scripts/*`; UTF-8 BOM strip; 5 reproducible CPU audio benches; 6 video perf fixes and 3 AR fixes |
|
|
400
402
|
|
|
401
403
|
## License and attribution
|
|
402
404
|
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
> toolkit and no driver** — just an AVX2 x86-64 CPU (or ARM64 NEON), the CPU build of PyTorch,
|
|
6
6
|
> and 12–16 GB of RAM.
|
|
7
7
|
|
|
8
|
-
**Version: `0.50.2.
|
|
8
|
+
**Version: `0.50.2.dev11`** · import name is unchanged (`import bitsandbytes as bnb`) · MIT.
|
|
9
9
|
|
|
10
10
|
What the CPU backend provides: 8-bit blockwise optimizers (≈2.3 bytes of state per parameter
|
|
11
11
|
instead of 8; the 4-bit optimizer ≈1.03), 4/8-bit layers that run on CPU tensors, the fused
|
|
12
12
|
Gated DeltaNet kernel for Qwen3-Next / Qwen3.5 linear attention, fused `gemm_8bit`, fused
|
|
13
|
-
RMSNorm/SwiGLU, an SSD cold-memory balancer, and a CPU training/concurrency toolbox.
|
|
13
|
+
RMSNorm/SwiGLU (with NT-store fast paths for large outputs), an SSD cold-memory balancer, and a CPU training/concurrency toolbox.
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -334,12 +334,12 @@ the zig manylinux_2_17 portable build and the devtoolset-8 manylinux_2_17 **Open
|
|
|
334
334
|
```bash
|
|
335
335
|
bash build_linux.sh --selftest # C kernels: 9 checks (quantize/gemm_8bit/gemv_4bit/
|
|
336
336
|
# AdamW8bit/vector-vs-scalar/2-3bit dequant/fused GEMM)
|
|
337
|
-
python test_efst_regressions.py # EFST: nested blocks, 3-D tensor experts, routing usage
|
|
338
|
-
python test_q3bit_kernels.py # 2/3-bit research prototype (old DLL-based tests)
|
|
339
|
-
python test_q3bit_api.py # public q3bit API: pack/dequant/gemm, QuantLinear3bit, fallback
|
|
340
|
-
python test_adamw4bit.py # restored 4-bit optimizer: state bytes, native vs torch, fp32 tracking
|
|
341
|
-
python test_concurrency_plan.py # planner / memory estimate / tune_threads / launcher
|
|
342
|
-
python test_disk_balancer_safety.py # data-safety rules for the disk balancer
|
|
337
|
+
python scripts/test/test_efst_regressions.py # EFST: nested blocks, 3-D tensor experts, routing usage
|
|
338
|
+
python scripts/test/test_q3bit_kernels.py # 2/3-bit research prototype (old DLL-based tests)
|
|
339
|
+
python scripts/test/test_q3bit_api.py # public q3bit API: pack/dequant/gemm, QuantLinear3bit, fallback
|
|
340
|
+
python scripts/test/test_adamw4bit.py # restored 4-bit optimizer: state bytes, native vs torch, fp32 tracking
|
|
341
|
+
python scripts/test/test_concurrency_plan.py # planner / memory estimate / tune_threads / launcher
|
|
342
|
+
python scripts/test/test_disk_balancer_safety.py # data-safety rules for the disk balancer
|
|
343
343
|
```
|
|
344
344
|
|
|
345
345
|
## Documentation
|
|
@@ -366,6 +366,8 @@ The long-form docs live in the repository (`bitsandbytes/docs_cpu/`, Chinese and
|
|
|
366
366
|
| `0.50.2.dev7` | documentation release: README rewritten for the CPU fork (install/wheels/platform matrix, feature table, measured performance, limitations, tests, full dev1→dev7 changelog, EFST/disk-balancer/toolbox examples) |
|
|
367
367
|
| `0.50.2.dev8` | **restored `AdamW4bit`** (the kernel was dropped when dev4 vendored upstream; now scalar C kernel + torch fallback, 1.031 B/param); **new `bitsandbytes.q3bit` API** — `quantize_3bit`/`dequantize_3bit`/`gemm_3bit`/`gemm_3bit_transposed`, `QuantLinear3bit` (frozen 3-bit base + LoRA), `convert_linears_3bit`, native kernels on Linux with identical pure-torch fallback; CLI reference now includes 4bitopt/q3bit and all 43 examples execute in CI-style verification |
|
|
368
368
|
| `0.50.2.dev9` | **Windows native kernels**: CI now compiles the MSVC DLL from the current csrc and the export list includes the 4-bit optimizer and 2/3-bit symbols (they were silently missing before); **q3bit real-model validation** on Qwen3-1.7B (frozen 3-bit base + LoRA, eval 4.34→4.03 over 80 steps, RSS −67%, native step 7.7 s vs fp32 5.5 s); fixed the causal-LM **double-shift** label bug in the iGPU training kit (Windows package v0.1.2) |
|
|
369
|
+
| `0.50.2.dev10` | **NTFS recovery toolkit** (`sector_carve`, `mft_recover`, CLI + GUI, selftests) and the **video E2E pipeline** (generation/training, LCM and motion diagnostics); AVX2 4-bit GEMV fixes (wrong FP4 codebook, lazy-init race, non-divisible blocksize); gt1030 probe scripts and docs |
|
|
370
|
+
| `0.50.2.dev11` | **NT-store fast paths**: 4-bit dequant writes bypass the cache above 16 MiB (1.7–2.0× at 32–64 MB) and RMSNorm chooses NT by total footprint (x+res+out vs per-CCX L3); CPUID L3-sharing mask fix and the NT threshold wired to one macro; **byte-reproducible sdist** with an identity gate that audits the uploaded bytes (`--sdist`, 2-DLL policy, 20 adversarial cases) plus a docs gate requiring all six ZH/EN docs; repo regrouping into `scripts/*`; UTF-8 BOM strip; 5 reproducible CPU audio benches; 6 video perf fixes and 3 AR fixes |
|
|
369
371
|
|
|
370
372
|
## License and attribution
|
|
371
373
|
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bitsandbytes-cpu-fork
|
|
3
|
-
Version: 0.50.2.
|
|
3
|
+
Version: 0.50.2.dev11
|
|
4
4
|
Summary: bitsandbytes with a pure-CPU training backend (AVX2 / NEON): 8-bit optimizers, fused GDN, gemm_8bit, disk balancer. No GPU required.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: repository, https://github.com/Ganyvnanoaa09-0906/bitsandbytes-CPU
|
|
@@ -36,12 +36,12 @@ Dynamic: license-file
|
|
|
36
36
|
> toolkit and no driver** — just an AVX2 x86-64 CPU (or ARM64 NEON), the CPU build of PyTorch,
|
|
37
37
|
> and 12–16 GB of RAM.
|
|
38
38
|
|
|
39
|
-
**Version: `0.50.2.
|
|
39
|
+
**Version: `0.50.2.dev11`** · import name is unchanged (`import bitsandbytes as bnb`) · MIT.
|
|
40
40
|
|
|
41
41
|
What the CPU backend provides: 8-bit blockwise optimizers (≈2.3 bytes of state per parameter
|
|
42
42
|
instead of 8; the 4-bit optimizer ≈1.03), 4/8-bit layers that run on CPU tensors, the fused
|
|
43
43
|
Gated DeltaNet kernel for Qwen3-Next / Qwen3.5 linear attention, fused `gemm_8bit`, fused
|
|
44
|
-
RMSNorm/SwiGLU, an SSD cold-memory balancer, and a CPU training/concurrency toolbox.
|
|
44
|
+
RMSNorm/SwiGLU (with NT-store fast paths for large outputs), an SSD cold-memory balancer, and a CPU training/concurrency toolbox.
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -365,12 +365,12 @@ the zig manylinux_2_17 portable build and the devtoolset-8 manylinux_2_17 **Open
|
|
|
365
365
|
```bash
|
|
366
366
|
bash build_linux.sh --selftest # C kernels: 9 checks (quantize/gemm_8bit/gemv_4bit/
|
|
367
367
|
# AdamW8bit/vector-vs-scalar/2-3bit dequant/fused GEMM)
|
|
368
|
-
python test_efst_regressions.py # EFST: nested blocks, 3-D tensor experts, routing usage
|
|
369
|
-
python test_q3bit_kernels.py # 2/3-bit research prototype (old DLL-based tests)
|
|
370
|
-
python test_q3bit_api.py # public q3bit API: pack/dequant/gemm, QuantLinear3bit, fallback
|
|
371
|
-
python test_adamw4bit.py # restored 4-bit optimizer: state bytes, native vs torch, fp32 tracking
|
|
372
|
-
python test_concurrency_plan.py # planner / memory estimate / tune_threads / launcher
|
|
373
|
-
python test_disk_balancer_safety.py # data-safety rules for the disk balancer
|
|
368
|
+
python scripts/test/test_efst_regressions.py # EFST: nested blocks, 3-D tensor experts, routing usage
|
|
369
|
+
python scripts/test/test_q3bit_kernels.py # 2/3-bit research prototype (old DLL-based tests)
|
|
370
|
+
python scripts/test/test_q3bit_api.py # public q3bit API: pack/dequant/gemm, QuantLinear3bit, fallback
|
|
371
|
+
python scripts/test/test_adamw4bit.py # restored 4-bit optimizer: state bytes, native vs torch, fp32 tracking
|
|
372
|
+
python scripts/test/test_concurrency_plan.py # planner / memory estimate / tune_threads / launcher
|
|
373
|
+
python scripts/test/test_disk_balancer_safety.py # data-safety rules for the disk balancer
|
|
374
374
|
```
|
|
375
375
|
|
|
376
376
|
## Documentation
|
|
@@ -397,6 +397,8 @@ The long-form docs live in the repository (`bitsandbytes/docs_cpu/`, Chinese and
|
|
|
397
397
|
| `0.50.2.dev7` | documentation release: README rewritten for the CPU fork (install/wheels/platform matrix, feature table, measured performance, limitations, tests, full dev1→dev7 changelog, EFST/disk-balancer/toolbox examples) |
|
|
398
398
|
| `0.50.2.dev8` | **restored `AdamW4bit`** (the kernel was dropped when dev4 vendored upstream; now scalar C kernel + torch fallback, 1.031 B/param); **new `bitsandbytes.q3bit` API** — `quantize_3bit`/`dequantize_3bit`/`gemm_3bit`/`gemm_3bit_transposed`, `QuantLinear3bit` (frozen 3-bit base + LoRA), `convert_linears_3bit`, native kernels on Linux with identical pure-torch fallback; CLI reference now includes 4bitopt/q3bit and all 43 examples execute in CI-style verification |
|
|
399
399
|
| `0.50.2.dev9` | **Windows native kernels**: CI now compiles the MSVC DLL from the current csrc and the export list includes the 4-bit optimizer and 2/3-bit symbols (they were silently missing before); **q3bit real-model validation** on Qwen3-1.7B (frozen 3-bit base + LoRA, eval 4.34→4.03 over 80 steps, RSS −67%, native step 7.7 s vs fp32 5.5 s); fixed the causal-LM **double-shift** label bug in the iGPU training kit (Windows package v0.1.2) |
|
|
400
|
+
| `0.50.2.dev10` | **NTFS recovery toolkit** (`sector_carve`, `mft_recover`, CLI + GUI, selftests) and the **video E2E pipeline** (generation/training, LCM and motion diagnostics); AVX2 4-bit GEMV fixes (wrong FP4 codebook, lazy-init race, non-divisible blocksize); gt1030 probe scripts and docs |
|
|
401
|
+
| `0.50.2.dev11` | **NT-store fast paths**: 4-bit dequant writes bypass the cache above 16 MiB (1.7–2.0× at 32–64 MB) and RMSNorm chooses NT by total footprint (x+res+out vs per-CCX L3); CPUID L3-sharing mask fix and the NT threshold wired to one macro; **byte-reproducible sdist** with an identity gate that audits the uploaded bytes (`--sdist`, 2-DLL policy, 20 adversarial cases) plus a docs gate requiring all six ZH/EN docs; repo regrouping into `scripts/*`; UTF-8 BOM strip; 5 reproducible CPU audio benches; 6 video perf fixes and 3 AR fixes |
|
|
400
402
|
|
|
401
403
|
## License and attribution
|
|
402
404
|
|
|
@@ -72,6 +72,7 @@ struct CacheInfo {
|
|
|
72
72
|
size_t l2;
|
|
73
73
|
size_t l3;
|
|
74
74
|
unsigned char discovered; // bit0 = CPUID 成功, bit1 = 用了 OS 兜底
|
|
75
|
+
unsigned l3_sharing; // 共享 L3 的【逻辑处理器】数(CPUID EDX[25:14]+1),0=未知
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
inline void cpuid_x(int r[4], int leaf, int sub) {
|
|
@@ -87,8 +88,9 @@ inline void cpuid_x(int r[4], int leaf, int sub) {
|
|
|
87
88
|
#endif
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
// 枚举一个 leaf
|
|
91
|
-
|
|
91
|
+
// 枚举一个 leaf 的缓存描述符;成功返回非零。
|
|
92
|
+
// l3_sharing 取 EDX[25:14]+1("共享此缓存的逻辑处理器数"),只在 L3 条目上记录。
|
|
93
|
+
inline int enum_leaf(int leaf, size_t* l1d, size_t* l2, size_t* l3, unsigned* l3_sharing) {
|
|
92
94
|
int r[4], sub, found = 0;
|
|
93
95
|
for (sub = 0; sub < 16; ++sub) {
|
|
94
96
|
cpuid_x(r, leaf, sub);
|
|
@@ -102,11 +104,57 @@ inline int enum_leaf(int leaf, size_t* l1d, size_t* l2, size_t* l3) {
|
|
|
102
104
|
const size_t size = (size_t)ways * (size_t)parts * (size_t)line * (size_t)sets;
|
|
103
105
|
if (level == 1 && type == 1 && *l1d == 0) { *l1d = size; found = 1; }
|
|
104
106
|
else if (level == 2 && type == 3 && *l2 == 0) { *l2 = size; found = 1; }
|
|
105
|
-
else if (level == 3 && type == 3 && *l3 == 0) {
|
|
107
|
+
else if (level == 3 && type == 3 && *l3 == 0) {
|
|
108
|
+
*l3 = size;
|
|
109
|
+
// EDX[25:14] 是 12 位("共享该缓存的逻辑处理器数 - 1");掩码必须是 0xfff。
|
|
110
|
+
// 2026-11-16 审查修正:原实现用 0x3ff 只取到 [23:14],在 Linux(无 OS API
|
|
111
|
+
// 覆盖路径)上会低估 sharing。Windows 侧该值随后被 os_l3_sharing() 覆盖。
|
|
112
|
+
if (l3_sharing) *l3_sharing = (unsigned)(((r[3] >> 14) & 0xfff) + 1);
|
|
113
|
+
found = 1;
|
|
114
|
+
}
|
|
106
115
|
}
|
|
107
116
|
return found;
|
|
108
117
|
}
|
|
109
118
|
|
|
119
|
+
// 用 OS API 直接读出"共享 L3 的逻辑处理器数"。
|
|
120
|
+
// 为什么不信 CPUID 的 sharing 字段:它在 AMD 与 Intel 上语义不同,实测本机 CPUID 给 1(错),
|
|
121
|
+
// 而 Windows 的 CACHE_RELATIONSHIP 给出的是真实亲和掩码。Linux 暂未实现(返回 0 = 未知)。
|
|
122
|
+
inline unsigned os_l3_sharing() {
|
|
123
|
+
#if defined(_WIN32)
|
|
124
|
+
DWORD len = 0;
|
|
125
|
+
GetLogicalProcessorInformationEx(RelationCache, nullptr, &len);
|
|
126
|
+
if (!len) return 0;
|
|
127
|
+
char* buf = (char*)malloc(len);
|
|
128
|
+
if (!buf) return 0;
|
|
129
|
+
unsigned best = 0;
|
|
130
|
+
size_t best_sz = 0;
|
|
131
|
+
if (GetLogicalProcessorInformationEx(RelationCache,
|
|
132
|
+
(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)buf, &len)) {
|
|
133
|
+
char* p = buf;
|
|
134
|
+
char* end = buf + len;
|
|
135
|
+
while (p < end) {
|
|
136
|
+
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX e =
|
|
137
|
+
(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)p;
|
|
138
|
+
if (e->Relationship == RelationCache && e->Cache.Level == 3) {
|
|
139
|
+
const size_t sz = (size_t)e->Cache.CacheSize;
|
|
140
|
+
if (sz >= best_sz) {
|
|
141
|
+
ULONG_PTR m = e->Cache.GroupMask.Mask;
|
|
142
|
+
unsigned cnt = 0;
|
|
143
|
+
while (m) { cnt += (unsigned)(m & 1u); m >>= 1; }
|
|
144
|
+
best_sz = sz;
|
|
145
|
+
best = cnt;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
p += e->Size;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
free(buf);
|
|
152
|
+
return best;
|
|
153
|
+
#else
|
|
154
|
+
return 0;
|
|
155
|
+
#endif
|
|
156
|
+
}
|
|
157
|
+
|
|
110
158
|
// Decimal parse with no libc strto* call: see the comment in os_fallback for why that
|
|
111
159
|
// matters for the shared library's glibc floor. Returns false if no digit was present,
|
|
112
160
|
// leaving *out untouched.
|
|
@@ -122,7 +170,7 @@ inline bool parse_decimal(const char* s, size_t* out) {
|
|
|
122
170
|
return any;
|
|
123
171
|
}
|
|
124
172
|
|
|
125
|
-
inline void os_fallback(size_t* l1d, size_t* l2, size_t* l3) {
|
|
173
|
+
inline void os_fallback(size_t* l1d, size_t* l2, size_t* l3, unsigned* l3_sharing) {
|
|
126
174
|
#if defined(_WIN32)
|
|
127
175
|
DWORD len = 0;
|
|
128
176
|
GetLogicalProcessorInformationEx(RelationCache, nullptr, &len);
|
|
@@ -133,6 +181,7 @@ inline void os_fallback(size_t* l1d, size_t* l2, size_t* l3) {
|
|
|
133
181
|
(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)buf, &len)) {
|
|
134
182
|
char* p = buf;
|
|
135
183
|
char* end = buf + len;
|
|
184
|
+
size_t best_l3 = 0;
|
|
136
185
|
while (p < end) {
|
|
137
186
|
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX e =
|
|
138
187
|
(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)p;
|
|
@@ -140,7 +189,19 @@ inline void os_fallback(size_t* l1d, size_t* l2, size_t* l3) {
|
|
|
140
189
|
const size_t sz = (size_t)e->Cache.CacheSize; // 字段是 CacheSize
|
|
141
190
|
if (e->Cache.Level == 1 && e->Cache.Type == CacheData && *l1d == 0) *l1d = sz;
|
|
142
191
|
else if (e->Cache.Level == 2 && *l2 == 0) *l2 = sz;
|
|
143
|
-
else if (e->Cache.Level == 3 && sz >
|
|
192
|
+
else if (e->Cache.Level == 3 && sz > best_l3) {
|
|
193
|
+
best_l3 = sz;
|
|
194
|
+
if (l3_sharing) {
|
|
195
|
+
// 共享该 L3 的逻辑处理器数 = 亲和掩码 popcount。
|
|
196
|
+
// 不用 CPUID 的 sharing 字段:它在 AMD 上语义与 Intel 不同,
|
|
197
|
+
// 实测本机读出来是 1(错),而 API 给的是真实亲和掩码。
|
|
198
|
+
ULONG_PTR m = e->Cache.GroupMask.Mask;
|
|
199
|
+
unsigned cnt = 0;
|
|
200
|
+
while (m) { cnt += (unsigned)(m & 1u); m >>= 1; }
|
|
201
|
+
*l3_sharing = cnt;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (e->Cache.Level == 3 && sz > *l3) *l3 = sz;
|
|
144
205
|
}
|
|
145
206
|
p += e->Size;
|
|
146
207
|
}
|
|
@@ -198,19 +259,23 @@ inline void os_fallback(size_t* l1d, size_t* l2, size_t* l3) {
|
|
|
198
259
|
|
|
199
260
|
inline const CacheInfo& cache_info() {
|
|
200
261
|
static CacheInfo info = [] {
|
|
201
|
-
CacheInfo c = {0, 0, 0, 0};
|
|
262
|
+
CacheInfo c = {0, 0, 0, 0, 0};
|
|
202
263
|
size_t l1 = 0, l2 = 0, l3 = 0;
|
|
203
|
-
|
|
204
|
-
if (enum_leaf(
|
|
264
|
+
unsigned sharing = 0;
|
|
265
|
+
if (enum_leaf(4, &l1, &l2, &l3, &sharing)) c.discovered |= 1; // Intel
|
|
266
|
+
if (enum_leaf(0x8000001D, &l1, &l2, &l3, &sharing)) c.discovered |= 1; // AMD(必需)
|
|
205
267
|
if (l1 == 0 || l2 == 0 || l3 == 0) {
|
|
206
|
-
os_fallback(&l1, &l2, &l3);
|
|
268
|
+
os_fallback(&l1, &l2, &l3, &sharing);
|
|
207
269
|
c.discovered |= 2;
|
|
208
270
|
}
|
|
209
271
|
// 最后的保守兜底:假设三台里【最小】的那个,宁可少赚也不要缓存抖动
|
|
210
272
|
if (l1 == 0) l1 = 32u * 1024;
|
|
211
273
|
if (l2 == 0) l2 = 256u * 1024;
|
|
212
274
|
if (l3 == 0) l3 = 1024u * 1024;
|
|
213
|
-
|
|
275
|
+
// CPUID 的 sharing 字段在 AMD 上不可靠(实测 1),用 OS 亲和掩码覆盖它。
|
|
276
|
+
const unsigned api_sharing = os_l3_sharing();
|
|
277
|
+
if (api_sharing) sharing = api_sharing;
|
|
278
|
+
c.l1d = l1; c.l2 = l2; c.l3 = l3; c.l3_sharing = sharing;
|
|
214
279
|
return c;
|
|
215
280
|
}();
|
|
216
281
|
return info;
|
|
@@ -231,13 +296,62 @@ inline int get_cache_blocks(int chunk_size) {
|
|
|
231
296
|
}
|
|
232
297
|
|
|
233
298
|
// 非临时存储的分档阈值:输出超过它就值得走 NT store。
|
|
234
|
-
//
|
|
299
|
+
//
|
|
300
|
+
// 原始实测(int8->fp32 dequantize,存储占 80% 流量):
|
|
235
301
|
// 输出 <= 1.0 MB : 普通存储赢(NT 亏 0.69~0.73x)
|
|
236
|
-
// 输出 >= 4.2 MB : NT 赢 2.0~3.1x
|
|
237
|
-
//
|
|
302
|
+
// 输出 >= 4.2 MB : NT 赢 2.0~3.1x <- 见下方注:很可能是 cold 目标,已不采用
|
|
303
|
+
// 阈值原为 L3/2。问题:本机 CPUID 的第一条 L3 leaf 报的是**每 CCX 的 4 MiB**
|
|
304
|
+
// (2 CCX x 4 MiB = 8 MiB,已用 GetLogicalProcessorInformationEx 交叉确认),
|
|
305
|
+
// 于是 L3/2 = 2 MiB —— 落在下表的退化区里。
|
|
306
|
+
//
|
|
307
|
+
// 2026-10-28 独立 A/B(另一实现:C# AVX 手写内核、Avx.StoreAlignedNonTemporal、
|
|
308
|
+
// 交错 A/B + 5 次中位 + 两臂输出逐元素一致)。**只保留经复核的尺寸**:
|
|
309
|
+
// 纯写 dst[i]=v : 16 MiB 2.20~2.45x 256 MiB 2.20~2.74x
|
|
310
|
+
// 两遍 rmsnorm : 16 MiB 1.15~1.51x 256 MiB 1.43~1.51x(与本地 1.44~1.52x 吻合)
|
|
311
|
+
// 绝对带宽 : 纯写 regular 7.9~8.6 -> NT 20.5~22.2 GB/s(RFO 被消除)
|
|
312
|
+
// (初版曾记 "2 MiB 0.75~0.90x",那条已由作者撤回:当时单次计时仅 0.19 ms,线程起停
|
|
313
|
+
// 与效应同量级。真值见下面 4 MiB 行,更差也更清楚。注释不保留撤回值。)
|
|
314
|
+
//
|
|
315
|
+
// 同一位审计者随后用"单次计时内重复 20 次(每次 >20 ms)+ 15 次中位 + hot 目标"重测
|
|
316
|
+
// 2D 表(输出字节 x 线程数,speedup = regular/NT):
|
|
317
|
+
// 4 MiB T=1 0.89x T=3 0.28x T=5 0.23x <- 4 MiB 是退化区,不能作为阈值
|
|
318
|
+
// 6 MiB T=1 2.61x T=3 0.67x T=5 0.27x
|
|
319
|
+
// 8 MiB T=1 2.73x T=3 2.79x T=5 0.30x <- 8 MiB 恰好塞满聚合 L3(2 x 4 MiB)
|
|
320
|
+
// 12 MiB T=1 2.87x T=3 2.87x T=5 1.11x
|
|
321
|
+
// 16 MiB T=1 2.86x T=3 2.77x T=5 2.74x <- 与线程数无关的稳定赢区
|
|
322
|
+
// 拐点随并行度右移:胜负取决于"常规写"能否被聚合 L3 完全吸收。
|
|
323
|
+
// T=1 时工作集 = 容量会自我驱逐 ⇒ 6 MiB 就开始赢;T=5 时 8 MiB 仍全命中 ⇒ 0.30x。
|
|
324
|
+
//
|
|
325
|
+
// ⇒ 本处取**保守安全版**:输出 >= 16 MiB 才开 NT(2.7~2.9x,且与线程数无关)。
|
|
326
|
+
//
|
|
327
|
+
// ⚠ 撤回(2026-10-28,同一位审计者):此前有"小工作集把线程绑到单个 CCX"的建议,
|
|
328
|
+
// 依据是 **T=3 绑单 CCX vs T=5 全核** 的比较 —— 线程数与放置同时变了,不是受控实验。
|
|
329
|
+
// 固定线程数=3、只改放置(SetThreadAffinityMask)后结论反转:
|
|
330
|
+
// 工作集 3T 单 CCX 3T 跨 CCX 跨/单
|
|
331
|
+
// 4 MiB 83.5 97.6 1.17
|
|
332
|
+
// 6 MiB 44.1 57.0 1.29
|
|
333
|
+
// 7 MiB 29.5 61.3 2.08 <- 单 CCX 在此崩塌
|
|
334
|
+
// 12 MiB 18.2 23.4 1.29
|
|
335
|
+
// 机理:3 个线程的所有行都要挤进同一个 4 MiB L3 ⇒ 单 CCX 从 4 MiB 起踩踏;
|
|
336
|
+
// 铺到两个 CCX 时每个只需容纳自己那几个线程的分片。
|
|
337
|
+
//
|
|
338
|
+
// ⇒ **正确规则是"按 CCX 分片",不是"绑单 CCX"**:
|
|
339
|
+
// * 让**每个 CCX 的份额 ≤ 每 CCX L3(本机 4 MiB)**;两个 CCX 均匀分片时总量 ≤ 8 MiB 即安全
|
|
340
|
+
// * 触发踩踏的是"每 CCX 份额 > 4 MiB",不是"总量 > 8 MiB"
|
|
341
|
+
// * 线程铺到两个 CCX、数据按 slab 分给线程,自动满足
|
|
342
|
+
// * 这条规则**不需要线程数判据**,因此 `bnb_cores_per_ccx()` 仍保持"只检测、不接线"
|
|
343
|
+
// * 幅度不稳(6–8 MiB 边界两轮 1.29–1.97),只取方向与触发条件,不取倍数
|
|
344
|
+
//
|
|
345
|
+
// 更早那条"threads > 每 CCX 核数 ⇒ 12 MiB / 否则 6 MiB"的二维 NT 判据也基于未受控比较,
|
|
346
|
+
// 一并作废;阈值保持 16 MiB 保守值。
|
|
347
|
+
// 另注:旧记录">4.2 MB 赢 2.0~3.1x"很可能是 cold 目标(新 buffer、常规写也要付 RFO),
|
|
348
|
+
// 训练稳态(hot,同一 dst 反复写)才是 4 MiB 输的那个场景 —— 复测必须标明 hot/cold。
|
|
349
|
+
// 编译期可覆盖,用于做 A/B:BNB_NT_THRESHOLD_MB=20000 表示"实际上从不 NT"。
|
|
350
|
+
#ifndef BNB_NT_THRESHOLD_MB
|
|
351
|
+
#define BNB_NT_THRESHOLD_MB 16
|
|
352
|
+
#endif
|
|
238
353
|
inline size_t bnb_nt_threshold_bytes() {
|
|
239
|
-
|
|
240
|
-
return l3 ? (l3 / 2) : (size_t)(2u << 20);
|
|
354
|
+
return (size_t)BNB_NT_THRESHOLD_MB << 20;
|
|
241
355
|
}
|
|
242
356
|
|
|
243
357
|
// NT store 还需 32 字节对齐;调用方用它做运行时检查
|
|
@@ -245,4 +359,35 @@ inline bool bnb_is_aligned_for_nt(const void* p) {
|
|
|
245
359
|
return (reinterpret_cast<uintptr_t>(p) & 31u) == 0;
|
|
246
360
|
}
|
|
247
361
|
|
|
362
|
+
// ---- 流式核(读写混合)的 NT 判据 ----
|
|
363
|
+
//
|
|
364
|
+
// 上面的 16 MiB 阈值针对的是"纯写/写主导"的核:它们的输出行如果留在 L3,常规写就完全命中,
|
|
365
|
+
// NT 绕过缓存反而是自伤。但**读写混合**的核(例如 fused_rmsnorm 还流式读 x 和 res)不同:
|
|
366
|
+
// 那些读会把 out 的行从 L3 驱逐,常规写照样付 RFO 的 DRAM 读 ⇒ NT 的价值提前出现。
|
|
367
|
+
//
|
|
368
|
+
// 判据因此改成"总足迹 vs 每 CCX 的 L3":足迹 = x (+res) + out。本机每 CCX L3 = 4 MiB:
|
|
369
|
+
// out=1 MiB ⇒ 足迹 3 MiB < 4 MiB ⇒ 全驻留 ⇒ NT 无益(实测 0.95~1.07x)
|
|
370
|
+
// out=2 MiB ⇒ 足迹 6 MiB > 4 MiB ⇒ 溢出 ⇒ NT 立刻 1.79~1.82x(实测,单线程)
|
|
371
|
+
// 与纯写核相差 4~8 倍的拐点,来源就是这个被漏掉的"读侧流"变量。
|
|
372
|
+
inline size_t bnb_stream_l3_budget() {
|
|
373
|
+
const size_t l3 = bnb_cache_detail::cache_info().l3; // 每 CCX
|
|
374
|
+
return l3 ? l3 : (size_t)(4u << 20);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
inline bool bnb_nt_stream_worth(size_t footprint_bytes) {
|
|
378
|
+
return footprint_bytes > bnb_stream_l3_budget();
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// 每个 CCX(共享同一 L3 的那组逻辑处理器)有多少逻辑处理器;0 表示未知。
|
|
382
|
+
//
|
|
383
|
+
// 【只做检测,不参与任何判据】。原因(2026-10-28,审计者指出):这份 zig 构建没有 OpenMP,
|
|
384
|
+
// 内核实际是单线程的;把 threads > cores_per_ccx 这类规则接进来,在本机构建里恒为假,
|
|
385
|
+
// 就成了"无法被任何本机测试触发的分支"。
|
|
386
|
+
// 另外,原本设想的二维 NT 判据(threads > 每 CCX 核数 ⇒ 12 MiB / 否则 6 MiB)**已作废**:
|
|
387
|
+
// 它基于"T=3 单 CCX vs T=5 全核"的未受控比较。修正后的放置规则是"每 CCX 份额 ≤ 4 MiB",
|
|
388
|
+
// 是分片大小约束,**不需要线程数**(详见 bnb_nt_threshold_bytes 上方的撤回说明)。
|
|
389
|
+
inline unsigned bnb_cores_per_ccx() {
|
|
390
|
+
return bnb_cache_detail::cache_info().l3_sharing;
|
|
391
|
+
}
|
|
392
|
+
|
|
248
393
|
#endif // BNB_CPU_CACHE_H
|
|
@@ -515,13 +515,49 @@ static void avx2_dequant_4bit(
|
|
|
515
515
|
const long long input_dim_1 = n >> 1; // packed bytes per row
|
|
516
516
|
const long long absmax_dim_1 = n / blocksize; // scales per row
|
|
517
517
|
|
|
518
|
-
// ---- NT store 分档:2026-
|
|
519
|
-
//
|
|
520
|
-
//
|
|
521
|
-
//
|
|
522
|
-
//
|
|
523
|
-
//
|
|
524
|
-
//
|
|
518
|
+
// ---- NT store 分档:2026-10-29 重测【按尺寸启用】----
|
|
519
|
+
// out 是【纯写】(从头到尾不读),普通 store 会触发 RFO:写 32 MB 实际产生
|
|
520
|
+
// "读 32 MB + 写 32 MB" 的 DRAM 流量。NT store 省掉这次读。
|
|
521
|
+
//
|
|
522
|
+
// 数据来源:同一脚本(_audit_perf/dll_nt_cache.py)、同一台 4500U、6 线程、NF4 -> float、
|
|
523
|
+
// 真 DLL 新旧对比,**在测量互斥池内跑**(每次都有 ticket,可从 pool/events.jsonl 反查)。
|
|
524
|
+
// "cold" = 每轮前先读 96 MB 冲掉 L3。
|
|
525
|
+
//
|
|
526
|
+
// 2048x4096 (32 MB, 走 NT):
|
|
527
|
+
// cold 1.69x ~ 1.99x —— 两个**独立运行者/两次运行**的结果(ticket 不同)
|
|
528
|
+
// warm 2.1x ~ 3.1x —— 波动太大,**不作为结论引用**
|
|
529
|
+
// 4096x4096 (64 MB, 走 NT): cold 1.84x(仅一次运行,另一运行者未复测该 shape)
|
|
530
|
+
// 512x4096 ( 8 MB, 低于门限): cold 0.98x ~ 0.995x(两版走同一条普通 store 路径)
|
|
531
|
+
//
|
|
532
|
+
// 为什么要写区间而不是单点:**同一个脚本、同一台机器,两次运行的比值本身就会漂**
|
|
533
|
+
// (cold 1.69 vs 1.99 差 18%,warm 3.13 vs 2.11 差 48%)。绝对时间和比值都受频率/热/
|
|
534
|
+
// 线程摆放影响。所以本注释只断言"方向 + 区间",不把任何单次比值当常数。
|
|
535
|
+
// 8 MB 那行反而是最稳的(两次 0.98/0.995),因为两版**代码路径相同**,差异只能来自噪声
|
|
536
|
+
// ——这正好是"门限取 2x L3 是对的"的直接证据。
|
|
537
|
+
//
|
|
538
|
+
// 8 MB 的输出正好等于本机 L3,warm 档同一份代码能在 0.19~0.37 ms 之间摆动(43 vs 23 GB/s),
|
|
539
|
+
// 那是缓存驻留态噪声,不是实现差异;跨 harness 的数字(早期原型基准,每轮重建线程,
|
|
540
|
+
// 小 shape 被固定开销主导)同样不可混用。
|
|
541
|
+
//
|
|
542
|
+
// 门限取 2x L3(本机 L3 = 8 MB):输出 <= L3 时普通写会命中缓存,NT 反而把数据赶到 DRAM;
|
|
543
|
+
// 实测 8 MB 档在旧门限(>= 8 MB)下 NT 慢 1.6x,把门限提到 > 16 MB 后 8 MB 档两版同路径、无回退。
|
|
544
|
+
//
|
|
545
|
+
// 2026-09-22 的"NT 无效"是在本 kernel 只有 5.2 GB/s(解码受限)的版本上测的,已过期:
|
|
546
|
+
// 那时瓶颈在 LUT 位平面解码,不在存储通路;现在 kernel 已到 8.0 GB/s,是写受限。
|
|
547
|
+
// 注意:_mm256_stream_ps 要求 32 字节对齐;n 为 8 的倍数(调用点保证)=> 行首对齐,
|
|
548
|
+
// 只要基址对齐即可,故这里额外检查基址。仅对 4 字节输出启用(bf16/fp16 未测)。
|
|
549
|
+
// 2026-11-16 审查修正:阈值改走 bnb_nt_threshold_bytes(),与其它纯写核共用
|
|
550
|
+
// 单一来源(BNB_NT_THRESHOLD_MB 可覆盖),否则清单里的六份 -D 测试件对本核无效、
|
|
551
|
+
// dequant 的 A/B 没有控制臂。BNB_NT_FORCE_OFF 同样作用于本核。
|
|
552
|
+
const bool nt_aligned = (sizeof(T) == sizeof(float))
|
|
553
|
+
&& ((reinterpret_cast<uintptr_t>(out) & 31) == 0);
|
|
554
|
+
#if defined(BNB_NT_FORCE_OFF)
|
|
555
|
+
const bool use_nt = false; // 仅供 A/B:彻底关闭本核 NT,作为控制臂
|
|
556
|
+
#else
|
|
557
|
+
const bool use_nt = nt_aligned
|
|
558
|
+
&& (static_cast<unsigned long long>(m) * static_cast<unsigned long long>(n) * sizeof(T)
|
|
559
|
+
> (unsigned long long)bnb_nt_threshold_bytes());
|
|
560
|
+
#endif
|
|
525
561
|
|
|
526
562
|
BNB_OMP_PARALLEL_FOR
|
|
527
563
|
for (long long row = 0; row < m; ++row) {
|
|
@@ -547,8 +583,12 @@ static void avx2_dequant_4bit(
|
|
|
547
583
|
__m128i dhi = _mm_unpackhi_epi16(w01, w23); // floats 4..7
|
|
548
584
|
__m256 v = _mm256_castsi256_ps(_mm256_inserti128_si256(_mm256_castsi128_si256(dlo), dhi, 1));
|
|
549
585
|
v = _mm256_mul_ps(v, _mm256_set1_ps(scale));
|
|
550
|
-
|
|
586
|
+
if (use_nt)
|
|
587
|
+
_mm256_stream_ps(reinterpret_cast<float*>(orow + k * 2), v);
|
|
588
|
+
else
|
|
589
|
+
avx2_store8(orow + k * 2, v);
|
|
551
590
|
}
|
|
591
|
+
if (use_nt) _mm_sfence(); // 每行一次:保证本行的 NT 写在进入下一行前完成
|
|
552
592
|
for (; k < input_dim_1; ++k) {
|
|
553
593
|
const float scale = srow[(k * 2) / blocksize];
|
|
554
594
|
const unsigned char byte = arow[k];
|
|
@@ -3701,11 +3741,27 @@ long long fused_rmsnorm_fwd_cpu(
|
|
|
3701
3741
|
//(流量 20 B/元素:读x4+写h4+读h4+写out4+读w4),而必要流量只有 12 B。
|
|
3702
3742
|
// 行只有 D*4 = 8 KB(D=2048)⇒ 第一趟读过的 x+res 仍在 L1d(32KB)/L2,
|
|
3703
3743
|
// 第二趟重取是缓存命中:多付一次 res 的 4B 读,省掉 out 的一读一写 8B。
|
|
3704
|
-
// 实测(同进程两实现对比、输出逐位相同):16k×2048 上 0.029s → 0.018s = 1.61x
|
|
3705
|
-
// 有效带宽 18.74 → 30.09 GB/s(实测上限 35.5 的 85
|
|
3706
|
-
//
|
|
3707
|
-
|
|
3708
|
-
|
|
3744
|
+
// 实测(同进程两实现对比、输出逐位相同):16k×2048 上 0.029s → 0.018s = 1.61x。
|
|
3745
|
+
// 旧记录此处写"有效带宽 18.74 → 30.09 GB/s(实测上限 35.5 的 85%)":那个 35.5 GB/s 分母
|
|
3746
|
+
// 后经独立测量作废(本机上限:读约 25、NT 写 22~25 GB/s),且名义 B/元素不等于 DRAM 流量
|
|
3747
|
+
//(第二趟是缓存命中)。故只保留绝对时间与比值,不再给该口径的百分比。
|
|
3748
|
+
// NT 开关:**按总足迹**判,不是按 out 字节数。这个核还流式读 x(和 res),这些读会把 out 的
|
|
3749
|
+
// 行从 L3 里驱逐掉 ⇒ 常规写照样付 RFO 的 DRAM 读。决定胜负的是 x+res+out 的总足迹与每 CCX L3
|
|
3750
|
+
// (本机 4 MiB)的关系:
|
|
3751
|
+
// 实测(thr0/thr2/thr16/thr20000 四构建,交错、hot、21 次中位、单线程、D=2048):
|
|
3752
|
+
// 1 MiB 0.95~1.07x(等价) 2 MiB 1.79~1.82x 3 MiB 1.55x 4 MiB 1.45x
|
|
3753
|
+
// 8 MiB 1.49x 12 MiB 1.44x 16 MiB 1.47x 32 MiB 1.46x
|
|
3754
|
+
// out=1 MiB ⇒ 足迹 3 MiB < 4 MiB ⇒ 全驻留 ⇒ NT 无益;out=2 MiB ⇒ 足迹 6 MiB ⇒ 溢出 ⇒ NT 赢。
|
|
3755
|
+
// 纯写核不能用这个判据(同一份数据在纯写下 4 MiB 会退化到 0.23~0.89x)——它们仍走
|
|
3756
|
+
// bnb_nt_threshold_bytes() 的 16 MiB 全局保守阈值,见 cpu_cache.h。
|
|
3757
|
+
const size_t out_bytes = (size_t)M * (size_t)D * sizeof(float);
|
|
3758
|
+
const size_t footprint = out_bytes * (res ? 3u : 2u); // x (+ res) + out
|
|
3759
|
+
#if defined(BNB_NT_FORCE_OFF)
|
|
3760
|
+
// 仅供 A/B:把这个核的 NT 彻底关掉,作为控制臂(判据本身不受 BNB_NT_THRESHOLD_MB 影响)
|
|
3761
|
+
const bool use_nt = false;
|
|
3762
|
+
#else
|
|
3763
|
+
const bool use_nt = bnb_is_aligned_for_nt(out) && bnb_nt_stream_worth(footprint);
|
|
3764
|
+
#endif
|
|
3709
3765
|
#if defined(_OPENMP)
|
|
3710
3766
|
#pragma omp parallel
|
|
3711
3767
|
#endif
|
{bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/csrc/test_cpu_cache.cpp
RENAMED
|
@@ -15,6 +15,7 @@ int main() {
|
|
|
15
15
|
get_cache_blocks<float>(128));
|
|
16
16
|
printf(" get_cache_blocks<float>(128*4) = %d\n", get_cache_blocks<float>(512));
|
|
17
17
|
printf(" bnb_nt_threshold_bytes() = %.2f MB\n", (double)bnb_nt_threshold_bytes() / 1e6);
|
|
18
|
+
printf(" L3 sharing (logical procs) = %u (0=unknown)\n", bnb_cores_per_ccx());
|
|
18
19
|
printf("\n");
|
|
19
20
|
printf(" 期望(Zen2 Renoir): L1d 32 KB, L2 512 KB, L3 4096 KB/CCX\n");
|
|
20
21
|
return 0;
|
{bitsandbytes_cpu_fork-0.50.2.dev10 → bitsandbytes_cpu_fork-0.50.2.dev11}/docs_cpu/API_REFERENCE.md
RENAMED
|
@@ -267,7 +267,7 @@ print(opt.state_bytes(), 'bytes for', p.numel(), 'params =',
|
|
|
267
267
|
# 30.49M image-AR model
|
|
268
268
|
# our 20-step 1024-param check: parameter relL2 1.2e-3 vs torch AdamW
|
|
269
269
|
# the restored scalar kernel matches the pure-torch fallback to 1.2e-7
|
|
270
|
-
# over 10 steps (test_adamw4bit.py), so the maths agrees exactly
|
|
270
|
+
# over 10 steps (scripts/test/test_adamw4bit.py), so the maths agrees exactly
|
|
271
271
|
```
|
|
272
272
|
|
|
273
273
|
**`the step is slower, so use it for memory not speed`** -- scalar 4-bit kernel: 28.6 ms vs 3.3 ms (8-bit AVX2) and 8.2 ms (fp32 torch) per step at 1M params, measured on the R5-4500U with 6 threads
|
|
@@ -266,7 +266,7 @@ print(opt.state_bytes(), 'bytes for', p.numel(), 'params =',
|
|
|
266
266
|
# 30.49M image-AR model
|
|
267
267
|
# our 20-step 1024-param check: parameter relL2 1.2e-3 vs torch AdamW
|
|
268
268
|
# the restored scalar kernel matches the pure-torch fallback to 1.2e-7
|
|
269
|
-
# over 10 steps (test_adamw4bit.py), so the maths agrees exactly
|
|
269
|
+
# over 10 steps (scripts/test/test_adamw4bit.py), so the maths agrees exactly
|
|
270
270
|
```
|
|
271
271
|
|
|
272
272
|
**`the step is slower, so use it for memory not speed`** -- scalar 4-bit kernel: 28.6 ms vs 3.3 ms (8-bit AVX2) and 8.2 ms (fp32 torch) per step at 1M params, measured on the R5-4500U with 6 threads
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 动态崩坏边界表(速查)
|
|
2
2
|
|
|
3
3
|
> 管线:**冻结配置** 512×512 · DPM-Solver++(2M) · 5 步 · SD1.5 VAE · 独立分块 + 硬切 · FSRCNN 后处理
|
|
4
|
-
> 来源:`motion_boundary.py` + `face_consistency.py` + `streak_metrics.py`,2026-09-11 下午实测
|
|
4
|
+
> 来源:`motion_boundary.py` + `face_consistency.py` + `scripts/misc/streak_metrics.py`,2026-09-11 下午实测
|
|
5
5
|
> 详细分析:这是视频生成项目的独立实验记录,不属于 `bitsandbytes` 库 API;数据由上述脚本产生。
|
|
6
6
|
|
|
7
7
|
## 一、五档实测数据
|
|
@@ -77,13 +77,13 @@ $env:ADIFF_VAE = "D:\work\textmodel\sd15_full\vae"
|
|
|
77
77
|
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u motion_boundary.py --out "D:\work\output\motion"
|
|
78
78
|
|
|
79
79
|
# 纯分析(不生成)
|
|
80
|
-
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u motion_report.py --root "D:\work\output\motion"
|
|
80
|
+
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u scripts/video/motion_report.py --root "D:\work\output\motion"
|
|
81
81
|
|
|
82
82
|
# 面部一致性
|
|
83
83
|
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u face_consistency.py `
|
|
84
84
|
--root "D:\work\output\motion" --out "D:\work\output\motion\face.json"
|
|
85
85
|
|
|
86
86
|
# 放射条纹量化
|
|
87
|
-
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u streak_metrics.py `
|
|
87
|
+
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u scripts/misc/streak_metrics.py `
|
|
88
88
|
--root "D:\work\output\motion" --more "D:\work\output\motion_mit"
|
|
89
89
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Pipeline: **frozen config** 512x512 · DPM-Solver++(2M) · 5 steps · SD1.5 VAE · independent
|
|
4
4
|
> tiling + hard cuts · FSRCNN post-processing
|
|
5
|
-
> Source: `motion_boundary.py` + `face_consistency.py` + `streak_metrics.py`, measured on
|
|
5
|
+
> Source: `motion_boundary.py` + `face_consistency.py` + `scripts/misc/streak_metrics.py`, measured on
|
|
6
6
|
> 2026-09-11 afternoon
|
|
7
7
|
> Note: this is an independent experiment record of the video-generation project; it is not
|
|
8
8
|
> part of the `bitsandbytes` library API.
|
|
@@ -86,13 +86,13 @@ $env:ADIFF_VAE = "D:\work\textmodel\sd15_full\vae"
|
|
|
86
86
|
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u motion_boundary.py --out "D:\work\output\motion"
|
|
87
87
|
|
|
88
88
|
# analysis only (no generation)
|
|
89
|
-
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u motion_report.py --root "D:\work\output\motion"
|
|
89
|
+
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u scripts/video/motion_report.py --root "D:\work\output\motion"
|
|
90
90
|
|
|
91
91
|
# face consistency
|
|
92
92
|
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u face_consistency.py `
|
|
93
93
|
--root "D:\work\output\motion" --out "D:\work\output\motion\face.json"
|
|
94
94
|
|
|
95
95
|
# radial-streak quantification
|
|
96
|
-
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u streak_metrics.py `
|
|
96
|
+
& "D:\work\那很有乐子了~\.venv_dml\Scripts\python.exe" -u scripts/misc/streak_metrics.py `
|
|
97
97
|
--root "D:\work\output\motion" --more "D:\work\output\motion_mit"
|
|
98
98
|
```
|