You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get this mnist.py example working, but so far it's crashing.
I created the following BASH script to make the full install and build process:
#!/bin/bash
PROJDIR=$(pwd)/pytorch_dlprim
# Clone pytorch_dlprim
git clone --recurse-submodules https://github.com/artyom-beilis/pytorch_dlprim.git "$PROJDIR"
cd "$PROJDIR"
# Get python version (3.11 in my case)
python_version=$(python3 --version 2>&1) # Captures the output of `python --version`
python_major_minor=$(echo "$python_version" | cut -d ' ' -f 2) # Extracts the second field, which is the version number
python_major=$(echo "$python_major_minor" | cut -d '.' -f 1) # Extracts the major version
python_minor=$(echo "$python_major_minor" | cut -d '.' -f 2) # Extracts the minor version
# Create python environment
python3 -m venv env
VIRTUAL_ENV="$(pwd)/env"
source $VIRTUAL_ENV/bin/activate
# Download torchvision CPU
python -m pip install --force-reinstall --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
# Build dlprim
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=$VIRTUAL_ENV/lib/python$python_major.$pythonminor/site-packages/torch/share/cmake/Torch ..
make -j15
cd ..
python mnist.py --device ocl:0
exit
I also try to get the pytorch 1.13 as suggested, but it seems that this version cannot be downloaded anymore? pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu Fails with requering torchaudo 2+ and torchvision 0.15+. This consequently requirs torch v2+
My computer is:
Radeon 7900 with Mesa driver
16Gb ram
Threadripper
Linux 6.1
mnist.py crash
using GDB, I get the following back-trace:
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:228
228 ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
(gdb) bt
#0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:228
#1 0x00007fffde73e618 in std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) () at /lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x00007fffde73088d in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) () at /lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007fffaa15e9e7 in c10::Dispatcher::registerFallback(c10::DispatchKey, c10::KernelFunction, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () at /lib/x86_64-linux-gnu/libtorch_cpu.so.1.13
#4 0x00007fffaa19e2cc in torch::Library::_fallback(torch::CppFunction&&) & () at /lib/x86_64-linux-gnu/libtorch_cpu.so.1.13
#5 0x00007fffa9f23075 in () at /lib/x86_64-linux-gnu/libtorch_cpu.so.1.13
#6 0x00007fffa9f29619 in () at /lib/x86_64-linux-gnu/libtorch_cpu.so.1.13
#7 0x00007fffa9ec77ab in () at /lib/x86_64-linux-gnu/libtorch_cpu.so.1.13
#8 0x00007ffff7fcf8be in call_init (env=0x34d61b0, argv=0x7fffffffdb68, argc=4, l=<optimized out>) at ./elf/dl-init.c:90
#9 call_init (l=<optimized out>, argc=4, argv=0x7fffffffdb68, env=0x34d61b0) at ./elf/dl-init.c:27
#10 0x00007ffff7fcf9a4 in _dl_init (main_map=0x6011350, argc=4, argv=0x7fffffffdb68, env=0x34d61b0) at ./elf/dl-init.c:137
#11 0x00007ffff7dd8024 in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, args=<optimized out>) at ./elf/dl-error-skeleton.c:182
#12 0x00007ffff7fd609e in dl_open_worker (a=a@entry=0x7fffffffcfd0) at ./elf/dl-open.c:808
#13 0x00007ffff7dd7fca in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, args=<optimized out>) at ./elf/dl-error-skeleton.c:208
#14 0x00007ffff7fd6438 in _dl_open
(file=0x7fffb06fa510 "/home/...../test_myxtral/pytorch_dlprim/build/libpt_ocl.so", mode=<optimized out>, caller_dlopen=0x7ffff7b05ae9, nsid=<optimized out>, argc=4, argv=0x7fffffffdb68, env=0x34d61b0)
at ./elf/dl-open.c:884
#15 0x00007ffff7d0e438 in dlopen_doit (a=a@entry=0x7fffffffd240) at ./dlfcn/dlopen.c:56
#16 0x00007ffff7dd7fca in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffd1a0, operate=<optimized out>, args=<optimized out>) at ./elf/dl-error-skeleton.c:208
#17 0x00007ffff7dd807f in __GI__dl_catch_error (objname=0x7fffffffd1f8, errstring=0x7fffffffd200, mallocedp=0x7fffffffd1f7, operate=<optimized out>, args=<optimized out>) at ./elf/dl-error-skeleton.c:227
#18 0x00007ffff7d0df27 in _dlerror_run (operate=operate@entry=0x7ffff7d0e3e0 <dlopen_doit>, args=args@entry=0x7fffffffd240) at ./dlfcn/dlerror.c:138
#19 0x00007ffff7d0e4e9 in dlopen_implementation (dl_caller=<optimized out>, mode=<optimized out>, file=<optimized out>) at ./dlfcn/dlopen.c:71
#20 ___dlopen (file=<optimized out>, mode=<optimized out>) at ./dlfcn/dlopen.c:81
#21 0x00007ffff7b05ae9 in () at /usr/lib/python3.11/lib-dynload/_ctypes.cpython-311-x86_64-linux-gnu.so
#22 0x0000000000547ae8 in ()
#23 0x0000000000517eb3 in _PyObject_MakeTpCall ()
#24 0x000000000052b940 in _PyEval_EvalFrameDefault ()
#25 0x000000000051f067 in _PyObject_FastCallDictTstate ()
#26 0x0000000000565973 in ()
#27 0x0000000000517e55 in _PyObject_MakeTpCall ()
#28 0x000000000052b940 in _PyEval_EvalFrameDefault ()
#29 0x000000000052360b in PyEval_EvalCode ()
#30 0x0000000000647497 in ()
#31 0x0000000000644d4f in ()
#32 0x0000000000651010 in ()
#33 0x0000000000650d5b in _PyRun_SimpleFileObject ()
#34 0x0000000000650b84 in _PyRun_AnyFileObject ()
#35 0x000000000064f90f in Py_RunMain ()
#36 0x00000000006275c7 in Py_BytesMain ()
#37 0x00007ffff7cb024a in __libc_start_call_main (main=main@entry=0x627530, argc=argc@entry=4, argv=argv@entry=0x7fffffffdb68) at ../sysdeps/nptl/libc_start_call_main.h:58
#38 0x00007ffff7cb0305 in __libc_start_main_impl (main=0x627530, argc=4, argv=0x7fffffffdb68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdb58) at ../csu/libc-start.c:360
#39 0x0000000000627461 in _start ()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am trying to get this mnist.py example working, but so far it's crashing.
I created the following
BASH
script to make the full install and build process:I also try to get the pytorch 1.13 as suggested, but it seems that this version cannot be downloaded anymore?
pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu
Fails with requering torchaudo 2+ and torchvision 0.15+. This consequently requirs torch v2+My computer is:
mnist.py
crashusing GDB, I get the following back-trace:
Any suggestion?
Beta Was this translation helpful? Give feedback.
All reactions