PyTorch’s New Knapsack Solver Cuts Memory Footprint by 20×
A recent update to PyTorch’s memory planner introduces a sliding‑window, Hirschberg‑based knapsack solver that slashes peak RAM usage by a factor of twenty and boosts runtime. The change, currently available only in the main branch, offers developers a powerful alternative to the default dynamic‑programming approach.