Open helehex opened 2 weeks ago
This happens for sys.info.num_physical_cores(), sys.info.num_logical_cores() and sys.info.num_performance_cores.
sys.info.num_physical_cores()
sys.info.num_logical_cores()
sys.info.num_performance_cores
from sys.info import num_physical_cores fn main(): alias cores = num_physical_cores() print(cores)
Host Information ================ Target Triple: x86_64-unknown-linux CPU: skylake CPU Features: adx, aes, avx, avx2, bmi, bmi2, clflushopt, cmov, crc32, cx16, cx8, f16c, fma, fsgsbase, fxsr, invpcid, lzcnt, mmx, movbe, pclmul, popcnt, prfchw, rdrnd, rdseed, sahf, sgx, sse, sse2, sse3, sse4.1, sse4.2, ssse3, x87, xsave, xsavec, xsaveopt, xsaves mojo 2024.10.1619 (829ffb25)
This is because they're implemented backed by C++ via an external_call function. Currently, the compile-time interpreter can't see through the external_call.
external_call
Ah ok.
Bug description
This happens for
sys.info.num_physical_cores()
,sys.info.num_logical_cores()
andsys.info.num_performance_cores
.Steps to reproduce
System information