intel / openvino-plugins-ai-audacity

A set of AI-enabled effects, generators, and analyzers for Audacity®.
GNU General Public License v3.0
886 stars 56 forks source link

Error: Inappropriate ioctl for device --LINUX-- #72

Closed r0b0t2k closed 6 months ago

r0b0t2k commented 6 months ago

Hi there, I am attempting to follow the instructions and build audacity with mod-openvino support. I am using the following.

Arch Linux
Linux robotjox 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC

i7-8086k
CPU FLAGs:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d

GPU: 3080TI

I build audacity with the mod-openvino module as instructed here https://github.com/intel/openvino-plugins-ai-audacity/blob/main/doc/build_doc/linux/README.md#audacity-openvino-module-build

But unfortunately I met with this ioctl error for Device. Audacity Log

8:10:31: Audacity 3.4.2-alpha-20240314
18:10:31: Warning: Cannot set locale to language "English".
18:10:32: FFmpeg libraries loaded successfully from: /usr/lib/libavformat.so.60.16.100
18:16:53: Unable to load the module "/home/robot/gitrepos/audacity/audacity-build/Release/lib/audacity/modules/mod-openvino.so". Error: Inappropriate ioctl for device
18:16:54: Warning: Critical Nyquist files could not be found. Nyquist effects will not work.
18:16:56: sqlite3 message: (1) no such table: project in "SELECT 1 FROM project LIMIT 1;"
18:16:57: FFmpeg libraries loaded successfully from: /usr/lib/libavformat.so.60.16.100

Unfortunately I do not know what ioctl means or where to go from here to determine what I can change or do to fix this problem. Additionally I understand the directions are written for Ubuntu but I was able to satisfy all dependencies using the Arch User Repository for the most part. Except for the stable diffusion pipelines which I built following the instructions and provided PATHs for.

Below is my cmake output for audacity with mod-openvino added as a module in CMakeLists.txt

[robot@robotjox audacity-build]$ cmake -G "Unix Makefiles" ../. -DCMAKE_BUILD_TYPE=Release                                                                                                                                                                                                                                    
-- The ASM_NASM compiler identification is unknown                                                                                                                                                                                                                                                                            
-- Didn't find assembler                                                                                                                                                                                                                                                                                                      
-- Build Info:                                                                                                                                                                                                                                                                                                                
--   Host System: Linux-6.7.9-arch1-1                                                                                                                                                                                                                                                                                         
--   Host System Name: Linux                                                                                                                                                                                                                                                                                                  
--   Host System Processor: x86_64                                                                                                                                                                                                                                                                                            
--   Host System Version: 6.7.9-arch1-1                                                                                                                                                                                                                                                                                       
--   Host System Architecture: 64-bit                                                                                                                                                                                                                                                                                         
--                                                                                                                                                                                                                                                                                                                            
--   Compiler: /usr/bin/c++                                                                                                                                                                                                                                                                                                   
--   Compiler Version: 13.2.1                                                                                                                                                                                                                                                                                                 
--   Compiler Standard: 17                                                                                                                                                                                                                                                                                                    
--   Compiler Standard Required: ON                                                                                                                                                                                                                                                                                           
--   Compiler Extensions:                                                                                                                                                                                                                                                                                                     
--                                                                                                                                                                                                                                                                                                                            
--   Current Commit: 9dd60f25c                                                                                                                                                                                                                                                                                                
--                                                                                                                                                                                                                                                                                                                            
-- ========== Using Conan version of ZLIB ==========                                                                                                                                                                                                                                                                          
-- ========== Using Conan version of PNG ==========                                                                                                                                                                                                                                                                           
-- ========== Using system version of JPEG ==========                                                                                                                                                                                                                                                                         
-- ========== Using Conan version of EXPAT ==========                                                                                                                                                                                                                                                                         
-- ========== Using Conan version of wxWidgets ==========                                                                                                                                                                                                                                                                     
-- ========== Using Conan version of libmp3lame ==========                                                                                                                                                                                                                                                                    
-- ========== Using Conan version of mpg123 ==========                                                                                                                                                                                                                                                                        
-- ========== Using Conan version of libid3tag ==========                                                                                                                                                                                                                                                                     
-- ========== Using Conan version of WavPack ==========                                                                                                                                                                                                                                                                       
-- ========== Using Conan version of Ogg ==========                                                                                                                                                                                                                                                                           
-- ========== Using Conan version of FLAC ==========                                                                                                                                                                                                                                                                          
-- ========== Using Conan version of Opus ==========                                                                                                                                                                                                                                                                          
-- ========== Using Conan version of opusfile ==========                                                                                                                                                                                                                                                                      
-- ========== Using Conan version of Vorbis ==========                                                                                                                                                                                                                                                                        
-- ========== Using Conan version of SndFile ==========                                                                                                                                                                                                                                                                       
-- ========== Using Conan version of PortAudio ==========                                                                                                                                                                                                                                                                     
-- ========== Using Conan version of RapidJSON ==========                                                                                                                                                                                                                                                                     
-- ========== Using Conan version of PortMidi ==========                                                                                                                                                                                                                                                                      
-- ========== Using Conan version of vst3sdk ==========                                                                                                                                                                                                                                                                       
-- ========== Using Conan version of Catch2 ==========                                                                                                                                                                                                                                                                        
-- Found libuuid:                                                                                                                                                                                                                                                                                                             
        libuuid_INCLUDE_DIR: /usr/include                                                                                                                                                                                                                                                                                     
        libuuid_LIBRARIES: /usr/lib/libuuid.so                                                                                                                                                                                                                                                                                
'/usr/bin/python3.11' '/home/robot/gitrepos/audacity/conan/conan_runner.py' '--build-dir' '/home/robot/gitrepos/audacity/audacity-build' '--compiler' 'GNU' '--compiler-version' '13.2.1' '--build-types' 'Release' '--target-arch' 'x86_64' '--build-arch' 'x86_64' '--lib-dir' 'lib/audacity' '-o' 'use_zlib=True' 'use_libp
ng=True' 'use_expat=True' 'use_wxwidgets=True' 'use_libmp3lame=True' 'use_mpg123=True' 'use_libid3tag=True' 'use_wavpack=True' 'use_ogg=True' 'use_flac=True' 'use_opus=True' 'use_opusfile=True' 'use_vorbis=True' 'use_libsndfile=True' 'use_jack=True' 'use_portaudio=True' 'use_rapidjson=True' 'use_portmidi=True' 'use_v
st3sdk=True' 'use_catch2=True'                                                                                                                                                                                                                                                                                                
Skipping conan install, arguments and requirements are the same                                                                                                                                                                                                                                                               
-- Conan: Target declared 'ZLIB::ZLIB'                                                                                                                                                                                                                                                                                        
-- Conan: Target declared 'EXPAT::EXPAT'                                                                                                                                                                                                                                                                                      
-- Conan: Component target declared 'wxwidgets::base'                                                                                                                                                                                                                                                                         
-- Conan: Component target declared 'wxwidgets::core'                                                                                                                                                                                                                                                                         
-- Conan: Component target declared 'wxwidgets::adv'                                                                                                                                                                                                                                                                          
-- Conan: Component target declared 'wxwidgets::net'                                                                                                                                                                                                                                                                          
-- Conan: Component target declared 'wxwidgets::xml'                                                                                                                                                                                                                                                                          
-- Conan: Component target declared 'wxwidgets::html'                                                                                                                                                                                                                                                                         
-- Conan: Component target declared 'wxwidgets::aui'                                                                                                                                                                                                                                                                          
-- Conan: Component target declared 'wxwidgets::qa'                                                                                                                                                                                                                                                                           
-- Conan: Component target declared 'wxwidgets::xrc'
-- Conan: Target declared 'wxwidgets::wxwidgets'                                                                                                                                                                                                                                                           18:04:19 [332/1886]
-- Conan: Target declared 'libmp3lame::libmp3lame'
-- Conan: Component target declared 'MPG123::libmpg123'
-- Conan: Component target declared 'MPG123::libout123'
-- Conan: Component target declared 'MPG123::libsyn123'
-- Conan: Target declared 'mpg123::mpg123'
-- Conan: Target declared 'libid3tag::libid3tag'
-- Conan: Target declared 'wavpack::wavpack'
-- Conan: Component target declared 'Ogg::ogg'
-- Conan: Component target declared 'FLAC::FLAC'
-- Conan: Component target declared 'FLAC::FLAC++'
-- Conan: Target declared 'flac::flac'                                         
-- Conan: Component target declared 'opus::libopus'
-- Conan: Target declared 'Opus::opus'                                         
-- Conan: Component target declared 'opusfile::libopusfile'
-- Conan: Component target declared 'opusfile::opusurl'
-- Conan: Target declared 'opusfile::opusfile'
-- Conan: Component target declared 'Vorbis::vorbis'
-- Conan: Component target declared 'Vorbis::vorbisenc'
-- Conan: Component target declared 'Vorbis::vorbisfile'
-- Conan: Target declared 'vorbis::vorbis'
-- Conan: Component target declared 'libsndfile::sndfile'
-- Conan: Target declared 'SndFile::sndfile'
-- Conan: Target declared 'portaudio::portaudio'
-- Conan: Target declared 'rapidjson'                                          
-- Conan: Target declared 'portmidi::portmidi'
-- Conan: Component target declared 'vst3sdk::base'
-- Conan: Component target declared 'vst3sdk::pluginterfaces'
-- Conan: Component target declared 'vst3sdk::sdk'
-- Conan: Component target declared 'vst3sdk::sdk_common'
-- Conan: Component target declared 'vst3sdk::sdk_hosting'
-- Conan: Target declared 'vst3sdk::vst3sdk'
-- Conan: Target declared 'Catch2::Catch2'
-- Trying to retrieve GTK version from libwx_gtk2u_core-3.1.so
-- ========== Configuring vamp ==========
-- Using 'vamp' local library                                                  
-- ========== Configuring lv2 ==========
-- Using 'lv2' local library                                                   
-- Checking for module 'QtGui >= 4.4.0'
--   Package 'QtGui', required by 'virtual:world', not found
-- ========== Configuring portsmf ==========
-- Using 'portsmf' local library                                               
-- ========== Configuring sbsms ==========
-- Using 'sbsms' local library                                                 
-- ========== Configuring soundtouch ==========
-- Using 'soundtouch' local library                                            
-- ========== Configuring twolame ==========
-- Using 'twolame' local library                                               
-- ========== Configuring manual ==========
-- ========== Configuring images ==========
-- ========== Configuring lib-string-utils ==========
-- ========== Configuring lib-strings ==========
-- ========== Configuring lib-utility ==========
-- ========== Configuring lib-uuid ==========
-- ========== Configuring lib-components ==========
-- ========== Configuring lib-basic-ui ==========
-- ========== Configuring lib-exceptions ==========
-- ========== Configuring lib-export-ui ==========
-- ========== Configuring lib-preferences ==========
-- ========== Configuring soxr ==========
-- Using 'soxr' local library                                                  
-- ========== Configuring lib-math ==========
-- ========== Configuring lib-files ==========
-- ========== Configuring lib-import-export ==========
-- ========== Configuring lib-ipc ==========
-- ========== Configuring lib-registries ==========
-- ========== Configuring lib-xml ==========
-- ========== Configuring lib-audio-devices ==========
-- ========== Configuring lib-project ==========
-- ========== Configuring lib-screen-geometry ==========
-- ========== Configuring lib-project-rate ==========
-- ========== Configuring lib-file-formats ==========
-- ========== Configuring lib-theme ==========
-- ========== Configuring lib-theme-resources ==========
-- ========== Configuring lib-track ==========                                                                                                                                                                                                                                                             18:04:19 [258/1886]
-- ========== Configuring lib-transactions ==========
-- ========== Configuring lib-sample-track ==========
-- ========== Configuring lib-module-manager ==========
-- ========== Configuring lib-project-history ==========
-- ========== Configuring lib-graphics ==========
-- ========== Configuring lib-audio-graph ==========
-- ========== Configuring lib-tags ==========
-- ========== Configuring lib-realtime-effects ==========
-- ========== Configuring lib-audio-io ==========
-- ========== Configuring lib-wave-track ==========
-- ========== Configuring lib-track-selection ==========
-- ========== Configuring sqlite ==========
-- Using 'sqlite' local library                                                
-- ========== Configuring lib-project-file-io ==========
-- ========== Configuring lib-command-parameters ==========
-- ========== Configuring lib-numeric-formats ==========
-- ========== Configuring lib-effects ==========
-- ========== Configuring lib-time-frequency-selection ==========
-- ========== Configuring lib-wx-wrappers ==========
-- ========== Configuring lib-shuttlegui ==========
-- ========== Configuring lib-wx-init ==========
-- ========== Configuring lib-time-track ==========
-- ========== Configuring lib-vst3 ==========
-- ========== Configuring lib-snapping ==========
-- ========== Configuring lib-vst ==========
-- ========== Configuring lib-lv2 ==========
-- ========== Configuring lib-ladspa ==========
-- ========== Configuring lib-playable-track ==========
-- ========== Configuring lib-time-and-pitch ==========
-- ========== Configuring lib-mixer ==========
-- ========== Configuring lib-channel ==========
-- ========== Configuring lib-stretching-sequence ==========
-- ========== Configuring locale ==========
-- ========== Configuring Audacity ==========
-- Using precompiled headers                                                   
-- ========== Configuring mod-script-pipe ==========
-- ========== Configuring mod-mp3 ==========
-- ========== Configuring mod-pcm ==========
-- ========== Configuring mod-cl ==========
-- ========== Configuring mod-lof ==========
-- ========== Configuring mod-aup ==========
ENV LIBTORCH_ROOTDIR = /usr/lib/                                               
-- Found CUDA: /opt/cuda (found version "12.4") 
-- The CUDA compiler identification is NVIDIA 12.4.99
-- Detecting CUDA compiler ABI info                                            
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /opt/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features                                             
-- Detecting CUDA compile features - done
-- Found CUDAToolkit: /opt/cuda/include (found version "12.4.99") 
-- Caffe2: CUDA detected: 12.4                                                 
-- Caffe2: CUDA nvcc is: /opt/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /opt/cuda
-- Caffe2: Header version is: 12.4                                             
-- /opt/cuda/lib/libnvrtc.so shorthash is 53a95926
-- USE_CUDNN is set to 0. Compiling without cuDNN support
-- USE_CUSPARSELT is set to 0. Compiling without cuSPARSELt support
-- Autodetected CUDA architecture(s):  8.6
-- Added CUDA NVCC flags for: -gencode;arch=compute_86,code=sm_86
-- Found Torch: /usr/lib/libtorch.so                                           
torch libraries = torch;torch_library;/usr/lib/libc10.so;/usr/lib/libkineto.a;/usr/lib/libcuda.so;/opt/cuda/lib/libnvrtc.so;/opt/cuda/lib64/libnvToolsExt.so;/opt/cuda/lib64/libcudart.so;/usr/lib/libc10_cuda.so
whisper library = /lib/libwhisper.so                                           
stable_diffusion_ov library = /home/robot/gitrepos/stablediffusion-pipelines-cpp/stablediffusion-pipelines-cpp-build/installed/lib/libstable_diffusion_ov.so   
stable_diffusion_audio_ov library = /home/robot/gitrepos/stablediffusion-pipelines-cpp/stablediffusion-pipelines-cpp-build/installed/lib/libstable_diffusion_audio_ov.so
-- ========== Configuring mod-openvino ==========
-- ========== Configuring mod-null ==========
-- ========== Configuring mod-nyq-bench ==========
-- ========== Configuring mod-ogg ==========
-- ========== Configuring mod-flac ==========
-- ========== Configuring mod-mp2 ==========
-- ========== Configuring mod-wavpack ==========
-- ========== Configuring mod-mpg123 ==========
-- ========== Configuring lib-ffmpeg-support =========
-- ========== Configuring mod-ffmpeg ==========
-- ========== Configuring mod-opus ==========
-- ========== Configuring nyquist ==========
-- ========== Configuring plug-ins ==========
-- Configuring done (4.3s)                                                     
-- Generating done (0.7s)                                                      
-- Build files have been written to: /home/robot/gitrepos/audacity/audacity-build

As you can see up to this point I have no reason to expect something not to work.

Here is the output of make

[robot@robotjox audacity-build]$ make -j `nproc`                                                                                                                                                                                                                                                                              
[  0%] Built target lib-screen-geometry                                                                                                                                                                                                                                                                                       
[  0%] Built target portmixer                                                                                                                                                                                                                                                                                                 
[  0%] Built target lib-time-and-pitch                                                                                                                                                                                                                                                                                        
[  2%] Built target libsoxr                                                                                                                                                                                                                                                                                                   
[  3%] Built target lib-string-utils                                                                                                                                                                                                                                                                                          
[  3%] Built target sqlite                                                                                                                                                                                                                                                                                                    
[  3%] Built target libsuil_x11                                                                                                                                                                                                                                                                                               
[  4%] Built target lib-utility                                                                                                                                                                                                                                                                                               
[  4%] Built target libsuil_x11_in_gtk2                                        
[  4%] Built target lib-strings                                                
[  4%] Built target libsuil_qt5_in_gtk3            
[  6%] Built target plug-ins                                                   
[ 10%] Built target locale                                                     
[ 14%] Built target nyquist                                                    
[ 15%] Built target libsbsms                                                   
[ 15%] Built target libsuil_qt5_in_gtk2                                        
[ 16%] Built target portsmf                                                    
[ 15%] Built target libsuil_x11_in_gtk3                                        
[ 17%] Built target soundtouch                                                 
[ 17%] Built target version                                                    
[ 18%] Built target libvamp                                                    
[ 18%] Built target findlib                                                    
[ 19%] Built target lib-string-utils-test                                      
[ 19%] Built target lib-uuid                                                   
[ 20%] Built target twolame                                                    
[ 21%] Built target lib-ipc                                                    
[ 21%] Built target lib-utility-test                                           
[ 21%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/collections.c.o                                                       
[ 21%] Built target lib-graphics                                                                                                                               
[ 21%] Built target lib-basic-ui                                                                                                                               
[ 21%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/instance.c.o                                                          
[ 21%] Built target lib-components                                                                                                                             
[ 22%] Built target lib-time-and-pitch-test                                    
[ 22%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/node.c.o                                                              
[ 23%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/lib.c.o                                                               
[ 23%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/plugin.c.o                                                            
[ 23%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/port.c.o                                                              
[ 23%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/pluginclass.c.o                                                       
[ 23%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/query.c.o                                                             
[ 39%] Built target libnyquist                                                                                                                                 
[ 39%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/scalepoint.c.o                                                        
[ 39%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/state.c.o                                                                                                                                                                                                                            
[ 40%] Built target lib-exceptions                                                                                                                                                                                                                                                                                            
[ 40%] Built target lib-preferences                                                                                                                            
[ 41%] Built target lib-transactions                                           
[ 41%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/ui.c.o                                                                
[ 41%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/util.c.o                                                              
[ 42%] Built target lib-files                                                                                                                                                                                                                                                                                                 
[ 42%] Building C object cmake-proxies/lv2/CMakeFiles/lv2.dir/__/__/lib-src/lv2/lilv/src/world.c.o                                                                                                                                                                                                                            
[ 42%] Built target lib-command-parameters                                     
[ 43%] Built target lib-math                                                   
[ 43%] Built target lib-registries                                                                                                                                                                                                                                                                                            
[ 43%] Built target lib-audio-devices                                          
[ 43%] Built target lib-theme                                                                                                                                  
[ 44%] Built target lib-audio-graph                                                                                                                                                                                                                                                                                           
[ 45%] Built target lib-wx-wrappers                                            
[ 45%] Built target lib-xml
[ 45%] Built target lib-file-formats                                                                                                                                                                                                                                                                       18:05:05 [119/1886]
[ 46%] Built target lib-channel                                                
[ 46%] Built target image-compiler                                             
[ 46%] Built target lib-shuttlegui                                             
[ 46%] Built target lib-project                                                
[ 46%] Built target lib-mixer                                                  
[ 46%] Built target lib-export-ui                                              
[ 47%] Built target lib-module-manager                                         
[ 50%] Built target lib-ffmpeg-support                                         
[ 51%] Built target lib-theme-resources
[ 51%] Built target lib-project-rate                                           
[ 51%] Built target lib-project-history
[ 52%] Built target lib-stretching-sequence
[ 53%] Built target lib-wx-init                                                
[ 54%] Built target lib-tags                                                   
[ 54%] Built target lib-time-frequency-selection
[ 54%] Built target lib-track                                                  
[ 55%] Built target lib-realtime-effects
[ 55%] Built target lib-preferences-test
[ 56%] Built target lib-numeric-formats
[ 56%] Built target lib-playable-track                                         
[ 56%] Built target lib-time-track                                             
[ 56%] Built target lib-track-selection
[ 56%] Built target lib-audio-io                                               
[ 57%] Built target lib-snapping                                               
[ 57%] Built target lib-numeric-formats-test
[ 57%] Built target lib-sample-track                                           
[ 57%] Built target lib-snapping-test                                          
[ 57%] Built target lib-wave-track                                             
[ 58%] Built target lib-project-file-io
[ 59%] Built target lib-effects                                                
[ 60%] Built target lib-stretching-sequence-test
[ 60%] Built target lib-ladspa                                                 
[ 61%] Built target lib-vst                                                    
[ 62%] Built target lib-vst3                                                   
[ 63%] Built target lib-import-export                                          
[ 63%] Linking C static library liblv2.a
[ 64%] Built target mod-opus                                                   
[ 64%] Built target mod-mpg123                                                 
[ 64%] Built target mod-flac                                                   
[ 64%] Built target mod-wavpack                                                
[ 64%] Built target mod-mp2                                                    
[ 64%] Built target mod-pcm                                                    
[ 65%] Built target mod-ogg                                                    
[ 67%] Built target lv2                                                        
[ 67%] Linking CXX shared library ../../Release/lib/audacity/lib-lv2.so
[ 68%] Built target lib-lv2                                                    
[ 69%] Linking CXX executable ../Release/bin/audacity
[ 98%] Built target Audacity                                                   
[ 98%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-script-pipe.so                                                                         
[ 98%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/htdemucs.cpp.o                                                                     
[ 98%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/OVWhisperTranscription.cpp.o                                                       
[ 98%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-aup.so
[ 98%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-cl.so
[ 98%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/OVMusicSeparation.cpp.o                                                            
[ 98%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-lof.so
[ 98%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/OVMusicGeneration.cpp.o                                                            
[ 98%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/OVMusicStyleRemix.cpp.o                                                            
[ 98%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/OVNoiseSuppression.cpp.o                                                           
[ 98%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-mp3.so
[ 98%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-ffmpeg.so                                                                              
[ 98%] Built target mod-script-pipe                                            
[ 98%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/OpenVINO.cpp.o                                                                     
[ 98%] Built target mod-aup                                                    
[ 98%] Built target mod-cl                                                     
[ 99%] Built target mod-mp3                                                    
[ 99%] Built target mod-lof                                                    
[100%] Built target mod-ffmpeg                                                 
[100%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-openvino.so                                                                            
[100%] Built target mod-openvino

Not sure if those outputs are helpful, if you have suggestions on how I can get more debugging info on this ioctl issue. Please let me know. Again this might not be a problem with the actual build procedure, since it appears to have worked, perhaps I am missing something either in Arch Linux or Driver wise.

RyanMetcalfeInt8 commented 6 months ago

Hi @r0b0t2k,

I think I've seen this Inappropriate ioctl for device error on Ubuntu before., and remember thinking that the error message thrown here must be unrelated to the actual load issue.

Anyway, I remember back when I saw this issue on my side there was some ABI mismatch between the libraries that I had compiled, and the Libtorch libraries that I had linked against. In your above log I see that torch is getting picked up from /usr/lib/ -- do you remember the method you used to install it there? The location jumps out as something that might have been installed by some kind of package manager, which, perhaps installs the incompatible ABI version by default.

Thanks, Ryan

r0b0t2k commented 6 months ago

Hi @r0b0t2k,

I think I've seen this Inappropriate ioctl for device error on Ubuntu before., and remember thinking that the error message thrown here must be unrelated to the actual load issue.

Anyway, I remember back when I saw this issue on my side there was some ABI mismatch between the libraries that I had compiled, and the Libtorch libraries that I had linked against. In your above log I see that torch is getting picked up from /usr/lib/ -- do you remember the method you used to install it there? The location jumps out as something that might have been installed by some kind of package manager, which, perhaps installs the incompatible ABI version by default.

Thanks, Ryan

Yes, you are correct I used the following https://aur.archlinux.org/packages/libtorch-cuda So that I would not have to build it myself. I will try building libtorch manually and recompiling the module. Ill report back success or failure. Probably tomorrow or the next day.

r0b0t2k commented 6 months ago

Ok so last night I removed the libtorch-cuda that was installed via Arch User Repository or AUR. And I went back to the linux instructions and downloaded the version of libtorch in the instructions. I reran cmake and saw the following Warning.

-- Configuring done (1.1s)                                                                                                                                     
CMake Warning at cmake-proxies/cmake-modules/AudacityFunctions.cmake:463 (add_library):                                                                        
  Cannot generate a safe runtime search path for target mod-openvino because                                                                                                                                                                                                                                                  
  files in some directories may conflict with libraries in implicit                                                                                            
  directories:                                                                                                                                                                                                                                                                                                                

    runtime library [libc10.so] in /usr/lib may be hidden by files in:                                                                                         
      /home/robot/libtorch/lib                                                                                                                                                                                                                                                                                                

  Some of these libraries may not be found correctly.                                                                                                          
Call Stack (most recent call first):                                                                                                                           
  cmake-proxies/cmake-modules/AudacityFunctions.cmake:593 (audacity_module_fn)                                                                                 
  modules/mod-openvino/CMakeLists.txt:57 (audacity_module)                                                                                                     

-- Generating done (0.7s)                                                                                                                                      
-- Build files have been written to: /home/robot/gitrepos/audacity/audacity-build

Seems like it does not like something in my system but it still wrote the build files. So I went on to run

 make -j `nproc`

And the output was much larger than before. But here at the end something failed and it mentions that file that had a warning in the cmake.

[ 99%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-script-pipe.so                                                                                                                                                                                                                                        
[ 99%] Built target mod-script-pipe                                                                                                                                                                                                                                                                                           
[ 99%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/OVWhisperTranscription.cpp.o                                                       
[ 99%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-lof.so                                                                                 
[ 99%] Building CXX object modules/mod-ffmpeg/CMakeFiles/mod-ffmpeg.dir/FFmpeg.cpp.o                                                                           
[ 99%] Built target mod-lof                                                                                                                                    
[ 99%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/htdemucs.cpp.o                                                                     
[ 99%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-cl.so                                                                                  
[ 99%] Building CXX object modules/mod-ffmpeg/CMakeFiles/mod-ffmpeg.dir/FFmpegPrefs.cpp.o                                                                      
[ 99%] Built target mod-cl                                                                                                                                     
make[2]: *** No rule to make target '/usr/lib/libc10.so', needed by 'Release/lib/audacity/modules/mod-openvino.so'.  Stop.                                     
make[2]: *** Waiting for unfinished jobs....
[ 99%] Building CXX object modules/mod-openvino/CMakeFiles/mod-openvino.dir/OpenVINO.cpp.o                                                                     
[ 99%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-aup.so
[100%] Building CXX object modules/mod-ffmpeg/CMakeFiles/mod-ffmpeg.dir/FFmpegPresets.cpp.o                                                                    
[100%] Building CXX object modules/mod-ffmpeg/CMakeFiles/mod-ffmpeg.dir/ImportFFmpeg.cpp.o                                                                     
[100%] Built target mod-aup                                                    
[100%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-mp3.so
[100%] Built target mod-mp3                                                    
[100%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-ffmpeg.so                                                                              
[100%] Built target mod-ffmpeg                                                 
make[1]: *** [CMakeFiles/Makefile2:5260: modules/mod-openvino/CMakeFiles/mod-openvino.dir/all] Error 2                                                         
make: *** [Makefile:166: all] Error 2

So I went to the ./Release/lib/audacity/modules/ folder and can confirm it now does not rebuild mod-openvino.so as it has a last modified date for yesterday the 14th.

[robot@robotjox audacity-build]$ ls -latr ./Release/lib/audacity/modules/
total 5740
-rwxr-xr-x 1 robot robot 1373960 Mar 14 18:05 mod-openvino.so
drwxr-xr-x 3 robot robot    4096 Mar 15 15:42 ..
-rwxr-xr-x 1 robot robot   68776 Mar 15 15:42 mod-mpg123.so
-rwxr-xr-x 1 robot robot  119928 Mar 15 15:42 mod-ogg.so
-rwxr-xr-x 1 robot robot  222400 Mar 15 15:42 mod-opus.so
-rwxr-xr-x 1 robot robot  352800 Mar 15 15:42 mod-mp2.so
-rwxr-xr-x 1 robot robot  317528 Mar 15 15:42 mod-pcm.so
-rwxr-xr-x 1 robot robot  235960 Mar 15 15:42 mod-flac.so
-rwxr-xr-x 1 robot robot  158248 Mar 15 15:42 mod-wavpack.so
-rwxr-xr-x 1 robot robot  293256 Mar 15 15:44 mod-script-pipe.so
-rwxr-xr-x 1 robot robot  282656 Mar 15 15:44 mod-lof.so
-rwxr-xr-x 1 robot robot  489504 Mar 15 15:44 mod-cl.so
-rwxr-xr-x 1 robot robot  423416 Mar 15 15:44 mod-aup.so
-rwxr-xr-x 1 robot robot  599776 Mar 15 15:44 mod-mp3.so
-rwxr-xr-x 1 robot robot  897280 Mar 15 15:44 mod-ffmpeg.so
drwxr-xr-x 2 robot robot    4096 Mar 15 15:44 .

The following is how I had my LIBTORCH_ROOTDIR set and the contents of that folder.

LIBTORCH_ROOTDIR=/home/robot/libtorch

[robot@robotjox audacity]$ ls -la /home/robot/libtorch
total 32
drwxr-xr-x  6 robot robot 4096 Nov  8 07:29 .
drwx------ 30 robot robot 4096 Mar 15 16:06 ..
drwxr-xr-x  2 robot robot 4096 Nov  8 07:28 bin
-rw-r--r--  1 robot robot   61 Nov  8 07:29 build-hash
-rw-r--r--  1 robot robot   10 Nov  8 07:29 build-version
drwxr-xr-x  8 robot robot 4096 Nov  8 07:28 include
drwxr-xr-x  2 robot robot 4096 Nov  8 07:31 lib
drwxr-xr-x  3 robot robot 4096 Nov  8 07:28 share

Is it that I am now missing /usr/lib/libc10.so

I apologize for not being able to get this right, if the problem seems obvious please let me know.

r0b0t2k commented 6 months ago

ok so from the libtorch folder I copied libc10.so to /usr/lib and when I went to make again

make -j `nproc`

I got the following

ake[2]: *** No rule to make target '/usr/lib/libkineto.a', needed by 'Release/lib/audacity/modules/mod-openvino.so'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:5260: modules/mod-openvino/CMakeFiles/mod-openvino.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

It makes me feel like it is not honoring the LIBTORCH_ROOTDIR but I am not sure what to think.

RyanMetcalfeInt8 commented 6 months ago

Hi @r0b0t2k,

You may want to completely remove your audacity-build folder, and do a fresh build. I've found that CMake can cache stuff in a way that makes it difficult to switch library paths after the initial build -- so I always just start clean to be sure.

Additionally, you may want to re-do the earlier stable-diffusion-cpp build, as that would need to point to the newly downloaded version of Libtorch.

The LIBTORCH_ROOTDIR & contents of the libtorch directory look fine to me. You shouldn't have to copy anything to /usr/lib -- in fact, you might want to remove anything you have copied there, like libc10.so.

Thanks, Ryan

r0b0t2k commented 6 months ago

Thank you, I will try your suggestions and report back soon. I removed anything I added to /usr/lib I kept track of it.

r0b0t2k commented 6 months ago

Ok! finally. So ill start buy saying a lot of my problems were self inflicted. You are probably used to this, but my first problem was I tried installing all the dependencies like openvino/whisper/libtorch all via the Arch User Repositories. Which to be fair has these things. However I should have done a better job following the instructions and realizing I never had to actually build libtorch or openvino. They were just downloads and we would just be using the already compiled stuff there.

So basically I started over from scratch in the instructions. However there was one part I was not able to get passed and the part about stablediffusion pipelines it instructs you to checkout v0.1 tag, I could not get cmake to complete with this tag I would get an error. Unfortunately I do not have the buffer of the error. But I was able to checkout to main and complete the cmake and build of the stablediffusion part.

image

Anyway I have finally got Audacity running with openvino enabled in ARCH linux. I will now try to load the actual models and see if I can start toying with music. Ill report back how that goes.

r0b0t2k commented 6 months ago

Ok so at least I was able to get mod-openvino working, unfortunately I get the following when attempting music generation.

23:33:47: Error: In Music Generation, exception: Exception from src/inference/src/core.cpp:116:
[ GENERAL_ERROR ] Exception from src/inference/src/model_reader.cpp:137:
Unable to read the model: /usr/local/lib/openvino-models/riffusion-unet-quantized-int8/unet_int8.xml Please check that model format: xml is supported and the model is correct. Available frontends: onnx pytorch tflite tf paddle ir 

23:33:49: Operation 'OpenVINO Music Generation' took 0.184000 seconds. Poll was called 1 times and took 0.000001 seconds. Yield was called 0 times and took 0.000000 seconds.

Not sure if this is because I built stablediffusion from main instead of v0.1 but this file is not in my openvino-models folder. not sure why. maybe I missed something?

The following is my openvino-models contents.

[robot@robotjox ~]$ ls -la /usr/local/lib/openvino-models/*
-rwxr-xr-x 1 root root 147951465 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-base.bin
-rwxr-xr-x 1 root root  41181346 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-base-encoder-openvino.bin
-rwxr-xr-x 1 root root    287262 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-base-encoder-openvino.xml
-rwxr-xr-x 1 root root 487601967 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-small.bin
-rwxr-xr-x 1 root root 176308380 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-small-encoder-openvino.bin
-rwxr-xr-x 1 root root    822917 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-small-encoder-openvino.xml
-rwxr-xr-x 1 root root 487614184 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-small.en-tdrz.bin
-rwxr-xr-x 1 root root 176308378 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-small.en-tdrz-encoder-openvino.bin
-rwxr-xr-x 1 root root    524203 Mar 16 23:21 /usr/local/lib/openvino-models/ggml-small.en-tdrz-encoder-openvino.xml
-rwxr-xr-x 1 root root 101167138 Mar 16 23:21 /usr/local/lib/openvino-models/htdemucs_v4.bin
-rwxr-xr-x 1 root root   1875040 Mar 16 23:21 /usr/local/lib/openvino-models/htdemucs_v4.xml
-rwxr-xr-x 1 root root   8625568 Mar 16 23:21 /usr/local/lib/openvino-models/noise-suppression-denseunet-ll-0001.bin
-rwxr-xr-x 1 root root    689820 Mar 16 23:21 /usr/local/lib/openvino-models/noise-suppression-denseunet-ll-0001.xml

/usr/local/lib/openvino-models/deepfilternet2:
total 9492
drwxr-xr-x 2 root root    4096 Mar 16 23:21 .
drwxr-xr-x 5 root root    4096 Mar 16 23:21 ..
-rwxr-xr-x 1 root root 3321828 Mar 16 23:21 df_dec.bin
-rwxr-xr-x 1 root root  114419 Mar 16 23:21 df_dec.xml
-rwxr-xr-x 1 root root 2589012 Mar 16 23:21 enc.bin
-rwxr-xr-x 1 root root  179155 Mar 16 23:21 enc.xml
-rwxr-xr-x 1 root root 3311612 Mar 16 23:21 erb_dec.bin
-rwxr-xr-x 1 root root  184963 Mar 16 23:21 erb_dec.xml

/usr/local/lib/openvino-models/deepfilternet3:
total 8852
drwxr-xr-x 2 root root    4096 Mar 16 23:21 .
drwxr-xr-x 5 root root    4096 Mar 16 23:21 ..
-rwxr-xr-x 1 root root 3325940 Mar 16 23:21 df_dec.bin
-rwxr-xr-x 1 root root  126292 Mar 16 23:21 df_dec.xml
-rwxr-xr-x 1 root root 1934676 Mar 16 23:21 enc.bin
-rwxr-xr-x 1 root root  190864 Mar 16 23:21 enc.xml
-rwxr-xr-x 1 root root 3278844 Mar 16 23:21 erb_dec.bin
-rwxr-xr-x 1 root root  189168 Mar 16 23:21 erb_dec.xml

/usr/local/lib/openvino-models/musicgen:
total 334516
drwxr-xr-x 4 root root      4096 Mar 16 23:21 .
drwxr-xr-x 5 root root      4096 Mar 16 23:21 ..
-rwxr-xr-x 1 root root   2008008 Mar 16 23:21 attention_mask_from_prepare_4d_causal_10s.raw
-rwxr-xr-x 1 root root    504008 Mar 16 23:21 attention_mask_from_prepare_4d_causal_5s.raw
-rwxr-xr-x 1 root root    264422 Mar 16 23:21 encodec_20s.xml
-rwxr-xr-x 1 root root    264423 Mar 16 23:21 encodec_5s.xml
-rwxr-xr-x 1 root root  58957600 Mar 16 23:21 encodec_combined_weights.bin
-rwxr-xr-x 1 root root    451577 Mar 16 23:21 encodec_encoder_10s.xml
-rwxr-xr-x 1 root root    451610 Mar 16 23:21 encodec_encoder_5s.xml
-rwxr-xr-x 1 root root  58974494 Mar 16 23:21 encodec_encoder_combined_weights.bin
drwxr-xr-x 2 root root      4096 Mar 16 23:21 mono
-rwxr-xr-x 1 root root    793854 Mar 16 23:21 musicgen-small-tokenizer.bin
-rwxr-xr-x 1 root root      5847 Mar 16 23:21 musicgen-small-tokenizer.xml
drwxr-xr-x 2 root root      4096 Mar 16 23:21 stereo
-rwxr-xr-x 1 root root 219257306 Mar 16 23:21 t5.bin
-rwxr-xr-x 1 root root    562833 Mar 16 23:21 t5.xml

And the following are the mono and stereo folders in musicgen.

[robot@robotjox ~]$ ls -la /usr/local/lib/openvino-models/musicgen/mono/
total 1192420
drwxr-xr-x 2 root root      4096 Mar 16 23:21 .
drwxr-xr-x 4 root root      4096 Mar 16 23:21 ..
-rwxr-xr-x 1 root root  16785440 Mar 16 23:21 embed_tokens.bin
-rwxr-xr-x 1 root root     14539 Mar 16 23:21 embed_tokens.xml
-rwxr-xr-x 1 root root   3149824 Mar 16 23:21 enc_to_dec_proj.bin
-rwxr-xr-x 1 root root      2765 Mar 16 23:21 enc_to_dec_proj.xml
-rwxr-xr-x 1 root root 100663360 Mar 16 23:21 initial_cross_attn_kv_producer.bin
-rwxr-xr-x 1 root root    177543 Mar 16 23:21 initial_cross_attn_kv_producer.xml
-rwxr-xr-x 1 root root  16777224 Mar 16 23:21 lm_heads.bin
-rwxr-xr-x 1 root root     11545 Mar 16 23:21 lm_heads.xml
-rwxr-xr-x 1 root root 704942882 Mar 16 23:21 musicgen_decoder_combined_weights.bin
-rwxr-xr-x 1 root root 353432018 Mar 16 23:21 musicgen_decoder_combined_weights_int8.bin
-rwxr-xr-x 1 root root   2578731 Mar 16 23:21 musicgen_decoder_static0_10s.xml
-rwxr-xr-x 1 root root   2576614 Mar 16 23:21 musicgen_decoder_static0_5s.xml
-rwxr-xr-x 1 root root   3153579 Mar 16 23:21 musicgen_decoder_static_batch1_int8.xml
-rwxr-xr-x 1 root root   2585992 Mar 16 23:21 musicgen_decoder_static_batch1.xml
-rwxr-xr-x 1 root root   3154347 Mar 16 23:21 musicgen_decoder_static_int8.xml
-rwxr-xr-x 1 root root   2585248 Mar 16 23:21 musicgen_decoder_static.xml
-rwxr-xr-x 1 root root   8388608 Mar 16 23:21 sinusoidal_positional_embedding_weights_2048_1024.raw
[robot@robotjox ~]$ ls -la /usr/local/lib/openvino-models/musicgen/stereo/
total 1323504
drwxr-xr-x 2 root root      4096 Mar 16 23:21 .
drwxr-xr-x 4 root root      4096 Mar 16 23:21 ..
-rwxr-xr-x 1 root root  33570880 Mar 16 23:21 embed_tokens.bin
-rwxr-xr-x 1 root root     28747 Mar 16 23:21 embed_tokens.xml
-rwxr-xr-x 1 root root   3149824 Mar 16 23:21 enc_to_dec_proj.bin
-rwxr-xr-x 1 root root      2765 Mar 16 23:21 enc_to_dec_proj.xml
-rwxr-xr-x 1 root root 201326656 Mar 16 23:21 initial_cross_attn_kv_producer.bin
-rwxr-xr-x 1 root root    148811 Mar 16 23:21 initial_cross_attn_kv_producer.xml
-rwxr-xr-x 1 root root  33554440 Mar 16 23:21 lm_heads.bin
-rwxr-xr-x 1 root root     21713 Mar 16 23:21 lm_heads.xml
-rwxr-xr-x 1 root root 704942882 Mar 16 23:21 musicgen_decoder_combined_weights.bin
-rwxr-xr-x 1 root root 353432018 Mar 16 23:21 musicgen_decoder_combined_weights_int8.bin
-rwxr-xr-x 1 root root   2578731 Mar 16 23:21 musicgen_decoder_static0_10s.xml
-rwxr-xr-x 1 root root   2576614 Mar 16 23:21 musicgen_decoder_static0_5s.xml
-rwxr-xr-x 1 root root   3153281 Mar 16 23:21 musicgen_decoder_static_batch1_int8.xml
-rwxr-xr-x 1 root root   2585694 Mar 16 23:21 musicgen_decoder_static_batch1.xml
-rwxr-xr-x 1 root root   3154143 Mar 16 23:21 musicgen_decoder_static_int8.xml
-rwxr-xr-x 1 root root   2584950 Mar 16 23:21 musicgen_decoder_static.xml
-rwxr-xr-x 1 root root   8388608 Mar 16 23:21 sinusoidal_positional_embedding_weights_2048_1024.raw
RyanMetcalfeInt8 commented 6 months ago

Hi @r0b0t2k,

Nice work getting everything compiled, and seems like the plugins themselves are loading correctly too -- nice!

The issue that you are now facing is my fault 😟

We're in the process of replacing the stable-diffusion based Music Generation effect (that we released in 3.4.2-R1) with a new LLM (Large Language Model) version.

The issue is that the build README's are kind of caught in the middle -- which I need to fix. At the end of the README, it gives instructions to populate an openvino-models folder that works with the newer Music Generation V2 generator (as well as other new features like deepfilternet models for noise suppression). But, the instructions mistakenly still tell you to check out tag 3.4.2-R1 for this repo -- and so what you are left with is a set of effects that are kind of 'mismatched' with the set of models that are installed.

My recommendation would be to re-do the last part of the build, starting from here, but ignore the part that tells you to check out tag v3.4.2-R1.

After it's all built and running, you should see two Music Generator generators "OpenVINO Music Generation" and "OpenVINO Music Generation V2" -- choose the V2 version.

Let me know if you have questions or any issues!

Thanks, Ryan

r0b0t2k commented 6 months ago

Thanks for your guidance. I did get a little bit further, but things do not seem to be working well. There is a lot to keep track of but I was able to select musicgen2 and I generated something. but that was with CPU selected. What was generated was mostly not great. But I am also not sure what kind of outputs I can or should expect. When trying to tell the program to use GPU, it just errors out with the following.

20:04:07: Operation 'OpenVINO Music Generation' took 0.248000 seconds. Poll was called 1 times and took 0.000001 seconds. Yield was called 0 times and took 0.000000 seconds.
20:04:38: Operation 'OpenVINO Music Generation V2' took 20.018000 seconds. Poll was called 41 times and took 0.067764 seconds. Yield was called 41 times and took 0.027510 seconds.
20:05:36: Operation 'OpenVINO Music Generation V2' took 16.468000 seconds. Poll was called 34 times and took 0.062164 seconds. Yield was called 33 times and took 0.033607 seconds.
20:06:36: Operation 'OpenVINO Music Generation V2' took 16.528000 seconds. Poll was called 34 times and took 0.069331 seconds. Yield was called 33 times and took 0.041158 seconds.
20:07:13: Error: MusicGen pipeline could not be created.
20:07:13: Operation 'OpenVINO Music Generation V2' took 3.556000 seconds. Poll was called 8 times and took 0.049136 seconds. Yield was called 7 times and took 0.035984 seconds.
20:07:12: Error: In Music Generation V2, exception: Exception from src/inference/src/core.cpp:99:
[ GENERAL_ERROR ] Check 'false' failed at src/plugins/intel_gpu/src/plugin/program_builder.cpp:179:
[GPU] ProgramBuilder build failed!
Exception from src/plugins/intel_gpu/src/graph/include/primitive_type_base.h:58:
[GPU] Can't choose implementation for result:new_key_value_23_0/sink_port_0 node (type=reorder)
[GPU] Original name: new_key_value_23_0/sink_port_0
[GPU] Original type: Result
[GPU] Reason: Check '!kernels.empty()' failed at src/plugins/intel_gpu/src/kernel_selector/kernel_selector.cpp:70:
[GPU] Couldn't find a suitable kernel for result:new_key_value_23_0/sink_port_0 params raw string: F32_BFYX_v64_p0_0_v1_p0_0_v16_p0_0_v2_p0_0;F16_BFYX_v64_p0_0_v1_p0_0_v16_p0_0_v2_p0_0

20:07:47: Error: MusicGen pipeline could not be created.
20:07:47: Operation 'OpenVINO Music Generation V2' took 3.126000 seconds. Poll was called 7 times and took 0.117770 seconds. Yield was called 6 times and took 0.103004 seconds.
20:07:46: Error: In Music Generation V2, exception: Exception from src/inference/src/core.cpp:99:
[ GENERAL_ERROR ] Check 'false' failed at src/plugins/intel_gpu/src/plugin/program_builder.cpp:179:
[GPU] ProgramBuilder build failed!
Exception from src/plugins/intel_gpu/src/graph/include/primitive_type_base.h:58:
[GPU] Can't choose implementation for result:new_key_value_23_0/sink_port_0 node (type=reorder)
[GPU] Original name: new_key_value_23_0/sink_port_0
[GPU] Original type: Result
[GPU] Reason: Check '!kernels.empty()' failed at src/plugins/intel_gpu/src/kernel_selector/kernel_selector.cpp:70:
[GPU] Couldn't find a suitable kernel for result:new_key_value_23_0/sink_port_0 params raw string: F32_BFYX_v64_p0_0_v1_p0_0_v16_p0_0_v2_p0_0;F16_BFYX_v64_p0_0_v1_p0_0_v16_p0_0_v2_p0_0

I feel like I am reaching a dead end here, let me know if you think we should keep troubleshooting this. I do not want to waste your time.

RyanMetcalfeInt8 commented 6 months ago

Hi @r0b0t2k,

It seems like you have everything build correctly, at least at the Audacity plugin level. The errors that you are getting for your GPU device seem to happen at OpenVINO-level... what kind of GPU do you have?

There is a lot to keep track of but I was able to select musicgen2 and I generated something. but that was with CPU selected.

Yeah, MusicGen2 output quality is going to vary quite a bit (even if you use the same prompt, but run it a few times and let the seed change run-to-run), but CPU shouldn't give any worse output than GPU. The default prompt "80s pop track with bassy drums and synth" with a 'seed' of 1 all running on CPU seems to give me reasonable output.

Edit: You can also try Music Gen V2 in an 'audio continuation' use case. Highlight 10s or so of some existing audio, and you can use that as input 'context' to start generating from. It's pretty fun.

Thanks, Ryan

r0b0t2k commented 6 months ago

For GPU I have a EVGA 3080ti, yea ill try messing with it some more and see what kind of outputs I can get.

RyanMetcalfeInt8 commented 6 months ago

Going to close this one, as it seems we solved the initial issues. Feel free to open another issue in case you have any questions.