Cdjones
Cdjones
MModular
Created by Cdjones on 9/28/2024 in #questions
LLVM ERROR: out of memory
WSL Ubuntu user with 16GB ram. Getting this error using Tensors:
LLVM ERROR: out of memory
Allocation failed
[76641:76641:20240928,125448.725259:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[76641:76641:20240928,125448.725342: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 run tst.mojo
[76641:76645:20240928,125448.726441:ERROR directory_reader_posix.cc:42] opendir /home/cdjones2005/.modular/crashdb/attachments/d64fa270-91ca-4f99-aef6-873b441805f4: No such file or directory (2)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 mojo 0x000056044ad0d438
1 mojo 0x000056044ad0b25e
2 mojo 0x000056044ad0dacd
3 libc.so.6 0x00007fa62fce4520
4 libc.so.6 0x00007fa62fd389fc pthread_kill + 300
5 libc.so.6 0x00007fa62fce4476 raise + 22
6 libc.so.6 0x00007fa62fcca7f3 abort + 211
7 mojo 0x000056044acaa688
8 mojo 0x000056044acaa6c2
9 mojo 0x000056044c4a9af5
10 mojo 0x000056044d0fca42
11 mojo 0x000056044d0fcd18
12 mojo 0x000056044d0fb0ad
13 libKGENCompilerRTShared.so.19.0git 0x00007fa61fd97ead KGEN_CompilerRT_AlignedAlloc + 125
14 libKGENCompilerRTShared.so.19.0git 0x00007fa5d800c7ed KGEN_CompilerRT_AlignedAlloc + 18446744072504166845
mojo crashed!
Please file a bug report.
Aborted
LLVM ERROR: out of memory
Allocation failed
[76641:76641:20240928,125448.725259:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[76641:76641:20240928,125448.725342: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 run tst.mojo
[76641:76645:20240928,125448.726441:ERROR directory_reader_posix.cc:42] opendir /home/cdjones2005/.modular/crashdb/attachments/d64fa270-91ca-4f99-aef6-873b441805f4: No such file or directory (2)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 mojo 0x000056044ad0d438
1 mojo 0x000056044ad0b25e
2 mojo 0x000056044ad0dacd
3 libc.so.6 0x00007fa62fce4520
4 libc.so.6 0x00007fa62fd389fc pthread_kill + 300
5 libc.so.6 0x00007fa62fce4476 raise + 22
6 libc.so.6 0x00007fa62fcca7f3 abort + 211
7 mojo 0x000056044acaa688
8 mojo 0x000056044acaa6c2
9 mojo 0x000056044c4a9af5
10 mojo 0x000056044d0fca42
11 mojo 0x000056044d0fcd18
12 mojo 0x000056044d0fb0ad
13 libKGENCompilerRTShared.so.19.0git 0x00007fa61fd97ead KGEN_CompilerRT_AlignedAlloc + 125
14 libKGENCompilerRTShared.so.19.0git 0x00007fa5d800c7ed KGEN_CompilerRT_AlignedAlloc + 18446744072504166845
mojo crashed!
Please file a bug report.
Aborted
3 replies
MModular
Created by Cdjones on 8/18/2024 in #questions
Reading Tensor From File
No description
6 replies
MModular
Created by Cdjones on 7/10/2024 in #questions
Tensor Transposition
After looking through the mojo documentation for the standard library as well as external code repositories, I was unable to find functionality to transpose 2 specified dimensions of a Tensor struct, similar to what's available in libraries such as Pytorch and Numpy. I implemented my own basic function as a brute force approach that iterates through every index, switches the specified dimensions and stores it in a separate Tensor struct. Is there any better way to go about doing this? I've been trying to look for a way to vectorize this process using SIMD as well as trying to find a way to directly mutate the tensor but can't think of any better approach. I've also tried searching for the source code that Numpy or Pytorch uses for these functions but couldn't seem to find it. My Current Approach: https://github.com/mehta302/Tensor-Transpose/blob/main/transpose.mojo Benchmark: (with 100x100x100 float32 randomized tensor switching first 2 dimensions)
---------------------
Benchmark Report (s)
---------------------
Mean: 0.25936431399999998
Total: 2.0749145119999999
Iters: 8
Warmup Mean: 0.27413139349999999
Warmup Total: 0.54826278699999997
Warmup Iters: 2
Fastest Mean: 0.25936431399999998
Slowest Mean: 0.25936431399999998
---------------------
Benchmark Report (s)
---------------------
Mean: 0.25936431399999998
Total: 2.0749145119999999
Iters: 8
Warmup Mean: 0.27413139349999999
Warmup Total: 0.54826278699999997
Warmup Iters: 2
Fastest Mean: 0.25936431399999998
Slowest Mean: 0.25936431399999998
1 replies