cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

hong
Journeyman III

How to enable HSA and using OpenCL at the same

Hi,

I have installed HSA enabled kernel and hsa runtime from github https://github.com/HSAFoundation/HSA-Docs-AMD/wiki/HSA-Platforms-&-Installation

and install the cloc by which I can compile and run the helloworld example (exsiting in the cloc example files)correctly.

When I read the source code of helloworld, I think the host code is is different from OpenCL code. I wonder whether there is a new program model for HSA or the program model is still OpenCL 2.0. If it is the former one, how can I learn this new program model? Because I find that the samples in SDK3.0 claim that they use the new features of HSA. So could I run these samples correctly? If the answer is yes, how?

So far, can I just install the AMD APU driver and AMD APP SDK 3.0 to enable HSA and use OpenCL at the same time?

Thank you!

0 Likes
1 Solution
jedwards
Staff

Your statement  "I wonder whether there is a new program model for HSA or the program model is still OpenCL 2.0." isn't correct; Currently there isn't an OpenCL 2.0 runtime that uses HSA directly, and there has never been. The catalyst version of OpenCL 2.0 uses some components of HSA, but it doesn't utilize the HSA drivers or HSA runtime provided on the HSA Foundation GitHub site. Cloc provides a translator from OpenCL C to HSAIL, but the resulting ISA must still be launched through the HSA runtime.

Currently there is no way for the Catalyst version of OpenCL 2.0 to exist with HSA. The drivers are incompatible.

CPPAMP is one programming model supported by HSA. See this link https://bitbucket.org/multicoreware/cppamp-driver-ng/wiki/HSA%20Support%20Status

View solution in original post

2 Replies
rodol
Adept I

from my understanding you can do HSA with opencl on opencl 2.0, like in windows whit opencl 2.0 catalyst drivers,and normal opencl programs.

Now if you are refering to have your code in HSAIL  (HSA Intermediate Language) the one that CLOC outputs, from a normal opencl program, i think you cant , from CLOC/README.md at master · HSAFoundation/CLOC · GitHub

on the example part


This version of cloc supports the SNACK method of writing accelerated kernels in c. With SNACK, a host program can directly call the accelerated function. Here is the c++ source code HelloWorld.cpp using SNACK.

So the host code in "helloworld"  are using SNACK, not the normal opencl host code

jedwards
Staff

Your statement  "I wonder whether there is a new program model for HSA or the program model is still OpenCL 2.0." isn't correct; Currently there isn't an OpenCL 2.0 runtime that uses HSA directly, and there has never been. The catalyst version of OpenCL 2.0 uses some components of HSA, but it doesn't utilize the HSA drivers or HSA runtime provided on the HSA Foundation GitHub site. Cloc provides a translator from OpenCL C to HSAIL, but the resulting ISA must still be launched through the HSA runtime.

Currently there is no way for the Catalyst version of OpenCL 2.0 to exist with HSA. The drivers are incompatible.

CPPAMP is one programming model supported by HSA. See this link https://bitbucket.org/multicoreware/cppamp-driver-ng/wiki/HSA%20Support%20Status