HSAFoundation / HSA-Drivers-Linux-AMD

These drivers have been superseded by ROCm Platform now hosted at Radeon Open Compute GitHub Repo
https://github.com/RadeonOpenCompute
Other
61 stars 15 forks source link

Will the HSA driver work on the Gigabyte F2A88XM-D3H #1

Closed zhongliangong closed 10 years ago

zhongliangong commented 10 years ago

Hi My Kaveri system has the same components as the reference specs, except for the motherboard - which is a Gigabyte instead of an Asus machine. Has anyone gotten this to work on the Gigabyte motherboard? Or is there any Asus-specific code in the drivers (or any capability in the ASUS motherboard that the gigabyte one does not offer?)?

Thanks Zhong Liang ONG

ogabbay commented 10 years ago

Hi, The HSA driver (kernel and userspace bits) are working on the Gigabyte F2A88XM-D3H without any problems.

      Oded
zhongliangong commented 10 years ago

Thank you Oded for the clarification! Is there a specific BIOS version that was tested (other than manually setting the IOMMU in the BIOS)?

ogabbay commented 10 years ago

HSA was not tested officially on this MB, but I have this MB at my home as my personal test machine and HSA works. I use the F5 version of the BIOS.

zhongliangong commented 10 years ago

Thanks Oded! Can't wait to unlock the full compute power of my Kaveri CPU!

ogabbay commented 10 years ago

Great. Contact me if you have any more questions

zhongliangong commented 10 years ago

A bad assumption on my part - you need the open source radeon driver. I was expecting this new feature to be supported on fglrx and spent a few hours reinstalling both the official and beta packages... Now my system finally passes all tests with the open-source drivers!

ogabbay commented 10 years ago

Yes, we don't support Catalyst (fglrx). We currently working over radeon.

zhongliangong commented 10 years ago

Hey Oded - my apologies if the answer is really obvious, but I haven't been able to figure this out after searching through the docs: I'm still unable to verify if there exists a compiler that can target the HSA. I installed the AMDAPP v2.9 SDK using the standard script. However the results from a simple test (http://wiki.tiker.net/OpenCLHowTo) appear to be worse than the intel i7-2600 shown in the demo. On CodeXL (1.4.5728) - the System Information tab shows no OpenCL devices. Am I missing a step in my system setup?

Thanks

zhongliangong commented 10 years ago

Ok so running a sample code seems to confirm that my platform is CPU only With 4 compute units I think it's only seeing the CPU's.

ongzl@amd-kaveri-server:~/cl_sample/samples/opencl/bin/x86_64$ ./ConcurrentKernel 
Platform 0 : Advanced Micro Devices, Inc.
GPU not found. Falling back to CPU device
Platform found : Advanced Micro Devices, Inc.

Selected Platform Vendor : Advanced Micro Devices, Inc.
Device 0 : AMD A10-7850K APU with Radeon(TM) R7 Graphics Device ID is 0xd5c170

 Sample parameters :
     Local Size : 64
     Num WGs Per Kernel : 10
     Available Compute Units : 4
     Num Kernels : 10
     Num Queues  : 2
     Buffer size per Kernel(Bytes) : 1048576
briansp2020 commented 10 years ago

Zhong Liang ONG, AMD's OpenCL driver currently does not work with HSA kernel. Their OpenCL driver comes with their Catalyst driver and it is not supported when working with HSA enabled kernel. To see HSA in action, I suggest APARAPI (https://code.google.com/p/aparapi/wiki/SettingUpLinuxHSAMachineForAparapi) hsaMandel example was impressive.

ogabbay commented 10 years ago

briansp2020 is correct. BTW, did you notice that there is a script in the repo to check if kfd was installed correctly on the system ? If you see that only the CPU is getting recognized, it is worth running the script and see the problem, hopefully.

zhongliangong commented 10 years ago

Thanks Brian And Oded I did run the script, which confirmed that everything worked, so I think it's probably the AMD OpenCL drivers, as mentioned by Brian, which was how I found out that I was supposed to use the open source drivers (the kfd check script reported that the fglrx driver blacklisted the radeon driver). I'll try the APARAPI repository and see if it works, but we were hoping to get the OpenCL to work as we have more C/C++ code than Java, so some way of getting compute units to be recognized in OpenCL would be most welcome.

briansp2020 commented 10 years ago

@gabbayo Do you know when AMD will release OpenCL run-time that utilizes HSA? I remember hearing Q4 of this year for OCL2.0 support. Would that be the first version that will utilize HSA? Is there a plan to release OCL1.2 with SVM extension before that?

zhongliangong commented 10 years ago

I remember reading from Anandtech that it should happen by the end of June - "In Q2 2014, a preview driver providing OpenCL 1.2 with some unified memory extensions from OpenCL 2.0 built on top of HSA infrastructure should be released." ( http://www.anandtech.com/show/7677/amd-kaveri-review-a8-7600-a10-7850k/6 ).

I think Windows 8.1 has the HSA OpenCL 1.2 driver, so I'd expect the linux one to come soon?

ogabbay commented 10 years ago

@briansp2020 @zhongliangong I have forwarded your questions to the relevant people in AMD.

s86097john commented 10 years ago

Sorry , I got some problem after installing the kfd driver.

First, I have some error message about : " bad checksum for the CRAT table " and " couldn't get CRAT table size from ACPI ".

Second, After I install the driver, I run the script and the result is shown below.

1

It looks like I didn't install the driver successfully. So, did I make some stupid mistake or miss something?(I followed all the steps in the readme .)

By the way, my motherborad is also F2A88XM-D3H.

ogabbay commented 10 years ago

Those errors you mentioned indicate a BIOS issue. Could you please post your BIOS version ? Could you also please send your dmesg log ?

s86097john commented 10 years ago

BIOS version: F5

dmesg log: (this is the part which the message show up , if you want the whole message ,please let me know.)

[ 28.334747] kfd kfd: Initialized module [ 28.334755] Bad checksum for the CRAT table [ 28.334777] Couldn't get CRAT table size from ACPI [ 28.334793] Finished initializing topology ret=-22 [ 28.349082] checking generic (c0000000 300000) vs hw (c0000000 10000000) [ 28.349086] fb: conflicting fb hw usage radeondrmfb vs EFI VGA - removing generic driver [ 28.349133] Console: switching to colour dummy device 80x25 [ 28.349755] [drm] initializing kernel modesetting (KAVERI 0x1002:0x130F 0x1002:0x0123). [ 28.349795] [drm] register mmio base: 0xFEB00000 [ 28.349797] [drm] register mmio size: 262144 [ 28.349804] [drm] doorbell mmio base: 0xD0000000 [ 28.349805] [drm] doorbell mmio size: 8388608 [ 28.349924] ATOM BIOS: 113

ogabbay commented 10 years ago

The BIOS version is good. The dmesg log you gave me doesn't show me much. Could you please send the full dmesg log ? Also, please do: "sudo apt-get install acpidump" "sudo acpidump -b -n CRAT" And send me the created file, called crat.dat Thanks.

s86097john commented 10 years ago

I had sent the files to you , please check your email . Thanks a lot.

ogabbay commented 10 years ago

got it, thanks

ogabbay commented 10 years ago

Hi, It appears we may have a bug in the kernel code. If I will send you a patch, will you be able to compile the kernel and try it ?

s86097john commented 10 years ago

OK, I will do that . Please send me the patch. Thanks.

ogabbay commented 10 years ago

I've sent you the patch through email

ogabbay commented 10 years ago

Hi, I've uploaded a new version, 0.5.1, which should fix your ACPI issues.

s86097john commented 10 years ago

Thank you very very much !!! :+1: After I install the version, 0.5.1 version , I run the check script and the results are all "Yes". But I forgot to tell you another error message: "ERROR Unable to locate IOAPIC for GSI 56". This message shows up before and after the driver installed. And , I have a friend that he has the motherboard as same as mine. However, he didn't encounter the problem which fixed by the 0.5.1 version image. I am curious about it . :) Anyway, thank you for your efforts !!

ogabbay commented 10 years ago

Glad I could help. The error you mentioned is not related to KFD so please disregard it.