Existing numerical computing libraries lack native support for physical units, limiting their application in rigorous scientific computing. Here, the authors developed SAIUnit, which integrates physical units, and unit-aware mathematical functions and transformations into numerical computing libraries for artificial intelligence-driven scientific computing.