My code results in a ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2) plus the request to submit a bug.
Steps to reproduce
from tensor import Tensor
import benchmark
from utils.index import Index
from random import random_float64
from algorithm import parallelize
alias float_type = DType.float32
alias nelts = simdwidthof[DType.float32]()
@parameter
fn test[n: Int](t: Tensor[float_type]) -> Float32:
var r: Float32 = 0.0
var rs = Tensor[float_type](n)
@parameter
fn sub(a: Int):
var r: Float32 = 0.0
for b in range(n):
for nv in range(0, n, nelts):
r += (t[Index(a)] * t[Index(b)] + t.simd_load[nelts](nv)).reduce_add[
1
]()
rs[Index(a)] = r
parallelize[sub](n)
# Comment this out to get
# [22144:22144:20231109,094207.171496:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
# [22144:22144:20231109,094207.171567:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
# Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes.
# Stack dump:
# 0. Program arguments: mojo test.mojo
# for a in range(n):
# r += rs[Index(a)]
return r
fn main():
alias n = nelts * 375
var t = Tensor[float_type](n)
for a in range(n):
t[Index(a)] = random_float64(-1, 1).cast[float_type]()
print(nelts)
print(test[n](t))
@parameter
fn bench() -> None:
let r = test[n](t)
let report = benchmark.run[bench]()
report.print()
System information
- What OS did you do install Mojo on ?
Windows 11 WSL, installed according to instruction (vanilla Ubuntu)
- Provide version information for Mojo by pasting the output of `mojo -v`
mojo 0.5.0 (6e50a738)
- Provide Modular CLI version by pasting the output of `modular -v`
modular 0.2.2 (95d42445)
Bug description
My code results in a
ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
plus the request to submit a bug.Steps to reproduce
System information