[CI/Build][Bugfix] Fix CPU backend default threads num (#13077)

This commit is contained in:
Li, Jiang 2025-02-12 00:55:56 +08:00 committed by GitHub
parent 2b25b7d2e1
commit 565c1efa65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -115,6 +115,9 @@ class CpuPlatform(Platform):
# Environment variables for CPU executor
#
# Set default threads num for OpenMP parallel
os.environ["OMP_NUM_THREADS"] = str(torch.get_num_threads())
# Disable torch async compiling which won't work with daemonic processes
os.environ["TORCHINDUCTOR_COMPILE_THREADS"] = "1"