Why Android x86 or bliss os does not load virtio gpu or amdgpu driver for RX 6500 XT passthrough? - android-x86

I am new in these waters. After installing aarch64 arch on several arm boards. Decided to try android x86 and then android arm.
However in documentations it says it supports nvidia through nouvaeu driver I have rtx 3060 and NV170 is not supported in nouvaeu I get it. However it should support RX 6500 XT with or without vulkan supports. That I dont get. When I boot with virtual VGA as primary and rx 6500 XT as secondary I see AMD GPU in listed in lspci output however cant make modprobe to load gpu drivers. What am I missing ? Both happens in blissOS'es and Android_X86's latest versions.
Did you make them work, should quadruple check everything ? (vga rom, binary drivers etc)

Related

How do I use the OpenCL C++/C++ for OpenCL kernel languages?

I have only tried compiling kernels using pyopencl, but I can only seem to be able to use OpenCl C. Looking at clinfo, I only see support for CLC listed, heres some truncated output from my pc:
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3423.0)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback
Platform Extensions function suffix AMD
Platform Host timer resolution 1ns
Platform Name AMD Accelerated Parallel Processing
Number of devices 1
Device Name gfx1031
Device Vendor Advanced Micro Devices, Inc.
Device Vendor ID 0x1002
Device Version OpenCL 2.0
Driver Version 3423.0 (HSA1.1,LC)
Device OpenCL C Version OpenCL C 2.0
Device Type GPU
Device Board Name (AMD) AMD Radeon RX 6700 XT
Device PCI-e ID (AMD) 0x73df
Device Topology (AMD) PCI-E, 0000:2f:00.0
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 20
I am using a rocm driver compiled from the AUR, I tried to also install the mesa driver alongside but could not do so (perhaps I need to uninstall the other, but I dread having to recompile it if mesa fails).
My laptop (intel hd graphics) seems to support OpenCL 3.0 but also only lists CLC support. What am I missing, is this not implemented yet? I saw something somewhere about "offline compilation" and maybe using a "clc++" option with clang but can someone elaborate?
C++ for OpenCL can be used in two ways:
Online compilation
If OpenCL device supports cl_ext_cxx_for_opencl, it is possible to compile a program written using the C++ for OpenCL kernel language in runtime. Applications may pass -cl-std=CLC++ to clCompileProgram and clBuildProgram for programs created using clCreateProgramFromSource to request the program be built as C++ for OpenCL.
Offline compilation
If OpenCL device allows to create the program with SPIR-V, then it is possible to compile C++ for OpenCL source into intermediate LLVM IR:
clang -c -cl-std=clc++ -target spir64 -O3 -emit-llvm -o test.ll test.clcpp
Next, LLVM IR can be translated into SPIR-V using llvm-spirv:
llvm-spirv test.ll -o test.spv
Finally, OpenCL program can be created using clCreateProgramWithIL call:
std::ifstream il_file("test.spv", std::ios::binary);
std::vector<char> il_buffer;
std::copy(std::istreambuf_iterator<char>(il_file),
std::istreambuf_iterator<char>(),
std::back_inserter(il_buffer));
cl_program program =
clCreateProgramWithIL(context, il_buffer.data(), il_buffer.size(), &ret);
For PyOpenCL:
with open('test.spv', 'rb') as il_file:
il_buffer = bytes(il_file.read())
prg = cl.Program(ctx, il_buffer)
To check that OpenCL device supports SPIR-V modules, you need to use CL_DEVICE_IL_VERSION query in OpenCL 2.1 or newer and the CL_DEVICE_ILS_WITH_VERSION query in OpenCL 3.0 or newer.
For additional information about offline compilation please see Offline Compilation of OpenCL Kernels into SPIR-V Using Open Source Tooling article.

Eiffel Studio ARM Apple Silicon M1

I am hoping to create some software with Eiffel & Eiffel Studio
I have a Mac mini with the Apple M1 Arm Processor.
Is there a port of EiffelStudio to native Mac M1?
Does Eiffel Studio support native MacOS Windowing or is it still requiring Windows?
EiffelStudio 21.11 download page does not list a native build for macOS running on M1, only on x86-64. Provided that there are builds for Linux running on ARM, there should be no obstacles to make a build for M1, though.
As to the GUI part, starting from 21.11, non-Windows installations of EiffelStudio rely on GTK 3, that utilizes Quartz API. So, it should not require X Windows.
For now, EiffelStudio for macos M1 is not yet built officially.
However you can download https://ftp.eiffel.com/pub/beta/nightly/PorterPackage_106046.tar and compile it yourself.
For usual macosx-x86-64 machine, the command from the extracted folder is
./compile_exes macosx-x86-64
You may need to get inspired by config files from PorterPackage/C/CONFIGS/ to have a dedicated config for macos on M1 .

paraview needs higher OpenGL in Mesa

Im trying to use paraview 5.3.0 in CentOS.
I compiled it with Qt5. When I start paraview it tells me:
GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but
is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you
are using Mesa please make sure you have version 10.6.5 or later and make sure your driver
in Mesa supports OpenGL 3.2.
Here is the OnBoard graphics card:
lspci |grep VGA
03:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. Device 0536 (rev 04)
And the glxinfo:
glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.9, 256 bits)
OpenGL version string: 2.1 Mesa 17.0.1
OpenGL shading language version string: 1.30
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 17.0.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
I dont understand what "... make sure your driver in Mesa ..." means.
kind regards
When using llvmpipe/gallium with mesa, a software renderer, the OpenGL capabilities can be incorrectly detected. The simplest way to fix that is to force it :
MESA_GL_VERSION_OVERRIDE=3.3 ./bin/paraview
The llvmpipe is the software rendering driver.
I don't know if you are running CentOS on a VM or not (even if glxinfo says "OpenGL vendor string: VMware, Inc." that doesn't necessary imply you are running on VMware).
If you are not running CentOS as a VM guest, consider installing the appropriate mesa drivers for your video card.

CL_DEVICE_NOT_AVAILABLE using Intel Core 2 Duo E8500 CPU

I get the error CL_DEVICE_NOT_AVAILABLE when running this sample code. However, unlike in that question, my CPU, the Intel Core 2 Duo E8500 CPU, appears to be supported. I've made sure to link against the Intel version of the OpenCL libraries, since I also have the Nvidia libraries installed. Why is this error occurring?
The Intel OpenCL SDK 2013 required SSE 4.2. From what I can tell (here) the Intel Core 2 Duo E8500 CPU only has SSE 4.1
"CL_DEVICE_NOT_AVAILABLE" is the error you get when you try to create an OpenCL device on an unsupported CPU.
The good news for you is that the Intel OpenCL SDK 2012 works on SSE 4.1; you should uninstall the 2013 SDK and use the 2012 SDK instead (or get a newer CPU).
"CL_DEVICE_NOT_AVAILABLE" has nothing to do with the SDK. It's due to the OpenCL device driver which is part of the video card device driver.
It's common to confuse the SDK and the OpenCL device driver. You develop the host code with the SDK but the kernel is compiled and run through the device driver. I often develop with the Intel SDK but I run my kernels on the CPU using the Intel video driver or the AMD Radeon drivers and on the GPU using the Nvidia video drivers (GTX590). I have all three video drivers installed in Windows. You don't have to have an AMD video card to instal the Radeon drivers.
So in your case you can use the AMD drivers to run your kernel on the CPU. They are much less restrictive than Intel's.
On windows I get faster results running my Kernel on my Sandy Bridge CPU using the Intel OpenCL drivers than AMD. However, on Linux the AMD driver runs my kernel faster on my Intel CPU than the Intel driver does.
I encountered this error while creating a tutorial on how to install hashcat on Ubuntu 18.04; I've included the instructions below for Installing OpenCL™ Runtimes for Intel® Processors - Option A (Recommended)- feel free to review my full gist on GitHub. Hope that helps!
Installing OpenCL™ Runtimes for Intel® Processors
Installing OpenCL™ Runtimes for Intel® Processors - Option A (Recommended)
Check your CPU system processor architecture by running sudo lscpu to identify the class of CPU e.g. "Intel (R) Core (TM) i7-7700 CPU # 3.60Ghz"- alternatively, you can go to Settings > Details which will also reveal the CPU-family (e.g. Intel (R) HD Graphics 630 (Kaby Lake GT2)).
Go to the Intel Developer Zone and scroll down to the corresponding download link for your system; assuming you're running Ubuntu 18.04 and have a Intel Core-class CPU, scroll down to "Linux* OS Ubuntu* 16.04.x (deb)" and click on the Github link for 18.46.11837 Runtimes to access the runtime-packages to download.
There should be instructions within the aforementioned Github repo- or you can proceed with the following in the next steps.
cd ~/Desktop
mkdir neo
cd neo
sudo wget https://github.com/intel/compute-runtime/releases/download/18.46.11837/intel-gmmlib_18.4.0.348_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/18.46.11837/intel-igc-core_18.44.1060_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/18.46.11837/intel-igc-opencl_18.44.1060_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/18.46.11837/intel-opencl_18.46.11837_amd64.deb
Install the packages by running sudo dpkg -i *.deb.
Restart the system by running sudo reboot.
Installing OpenCL™ Runtimes for Intel® Processors - Option B
Go to Intel OpenCL Runtimes website and scroll down to the bottom of the page to Download Intel CPU Runtime for OpenCL Applications 18.1 for LINUX OS (64-bit only).
After downloading the OpenCL Runtimes for Intel Processors, cd ~/Downloads
Run sudo tar -xzf l_opencl_p_18.1.0.013.tgz to unpack the tgz file- please note, the OpenCL file version may update since the time as of this gist (ie as of this gist, the version is 18.1.0.013.)
cd l_opencl_p_18.1.0.013
Run sudo ./install.sh
A welcome screen is prompted- hold-down the "Enter" key until able to input select "2" for "I do NOT consent to the collection of my Information"
Hit "1"
Hit "1"
Hit "Enter" and then restart the computer.
If any additional Intel OpenCL errors are encountered after testing hashcat, go to section 'Installing OpenCL™ Runtimes for Intel® Processors - B'- if not, proceed with section "Testing Hashcat"

OpenCL: working with doubles error

The error states:
error: can't enable all OpenCL extensions or unrecognized OpenCL extension
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
System configuration:
Windows 7 on 64 bit
Notebook with ATI Mobility Radeon HD 5400 series
Visual Studio 2010
Drivers installed:
AMD-APP-SDK-v2.8-Windows-64
amd_catalyst_13.5_mobility_beta3
How can i solve this problem because i need to use double type in the kernel?
The directive is declared in the first kernel line.
Your GPU doesn't support double precision. This is why the OpenCL runtime is reporting it cannot enable the cl_khr_fp64 extension. If you really need double precision, try using the CPU as an OpenCL device instead and run your kernel on that.

Resources