Hi Matt, 

Thanks for the detailed response and link to the docker image.

I have been looking at the post 
https://www.mail-archive.com/gem5-users@gem5.org/msg15909.html 
<https://www.mail-archive.com/gem5-users@gem5.org/msg15909.html>, and I used 
several hints regarding rocm version, and changes to the library paths in 
apu_se.py listed in the post. In an alternate post  
https://www.mail-archive.com/gem5-users@gem5.org/msg16275.html 
<https://www.mail-archive.com/gem5-users@gem5.org/msg16275.html>, Anthony 
recommended some specific commit IDs for ROCr, ROCt, and HCC. I am yet to 
install these ROC packages with these specific commit IDs.

We will try HIP and the docker image you have provided.

Thanks again. 


> On Mar 21, 2020, at 4:28 PM, Matt Sinclair <mattdsincl...@gmail.com> wrote:
> 
> Hi Anirudh,
> 
> This question has been asked several times before.  I recommend you take a 
> look, e.g., 
> here:https://www.mail-archive.com/gem5-users@gem5.org/msg15909.html 
> <https://www.mail-archive.com/gem5-users@gem5.org/msg15909.html> and see if 
> those suggestions resolve your problems.  Usually this error means you either 
> have an OS that is not supported or you haven't set up the ROCm stack 
> correctly.  In the past, I saw this error when running on Ubuntu 14/16, but I 
> thought the updated commits on the AMD staging branch had resolved this.  So, 
> perhaps it's a problem with how you set up ROCm then (or you are using a very 
> old commit).
> 
> A secondary problem is that the current GPU model does not fully support 
> OpenCL, it only supports HIP: http://old.gem5.org/GPU_Models.html 
> <http://old.gem5.org/GPU_Models.html> (it appears that the new website does 
> appear to have that page; Jason have you already filed a JIRA ticket about 
> this?).  Note that the linked webpage does need to be updated to explain how 
> to hipify applications.  The slides from the tutorial on that webpage have 
> some instructions about how to hipify that represent a good place to start 
> (e.g., slide 76).
> 
> In the meantime, we have created a Docker that sets up everything you need to 
> run the GPU model: https://github.com/KyleRoarty/gem5_docker/ 
> <https://github.com/KyleRoarty/gem5_docker/>.  We are also in the process of 
> merging this into gem5: 
> https://gem5-review.googlesource.com/c/amd/gem5/+/26544 
> <https://gem5-review.googlesource.com/c/amd/gem5/+/26544>.  I suggest you use 
> one of these as your starting point, as based on the error it's probably an 
> issue with how you set up ROCm (as mentioned above).
> 
> In terms of running backprop, the simplest thing to do would be to take the 
> CUDA version of backprop (e.g., from Rodinia), run hipify on it, remove the 
> dGPU copies, compile it with hipcc, and try running that.  You can see an 
> example of how Kyle did the last two steps for square (similar to you vector 
> addition) here: 
> https://github.com/KyleRoarty/gem5_docker/blob/master/tests/run_tests.sh 
> <https://github.com/KyleRoarty/gem5_docker/blob/master/tests/run_tests.sh>
> 
> Thanks,
> Matt
> 
> On Sat, Mar 21, 2020 at 2:42 PM Anirudh <system...@gmail.com 
> <mailto:system...@gmail.com>> wrote:
> Thanks for the response.
> 
> This is the command line argument: build/GCN3_X86/gem5.opt 
> configs/example/apu_se.py -c backprop.out -o '-n 16’.
> 
> I also tried a simple hand written vector addition program in OpenCL, and I 
> was encountering the same issue.
> 
>> On Mar 21, 2020, at 12:31 AM, Abhishek Singh <abhishek.singh199...@gmail.com 
>> <mailto:abhishek.singh199...@gmail.com>> wrote:
>> 
>> Hi,
>> Can you paste your command line? 
>> 
>> On Fri, Mar 20, 2020 at 8:37 PM Anirudh <system...@gmail.com 
>> <mailto:system...@gmail.com>> wrote:
>> Hello,
>> 
>> I would like some help running the backprop benchmark on AMD gem5-gpu. The 
>> backprop benchmark is written in OpenCL. I am using g++ v 4.8. I have rocm 
>> 1.6 installed. 
>> 
>> I am seeing this error: “ sysconf(NPROCESSORS_CONF) failed: No such file or 
>> directory. request to allocate mask for invalid number”. I suspect this has 
>> something to do with querying some system state by OpenCL calls. 
>> 
>> I have been following a relevant post that encountered the same issue for 
>> HCC applications 
>> (https://gem5-users.gem5.narkive.com/wMel4JdA/gem5-compute-gpu-model 
>> <https://gem5-users.gem5.narkive.com/wMel4JdA/gem5-compute-gpu-model>). 
>> 
>> Any guidance on this issue would be useful. 
>> 
>> Thanks.
>> _______________________________________________
>> gem5-users mailing list
>> gem5-users@gem5.org <mailto:gem5-users@gem5.org>
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users 
>> <http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users>_______________________________________________
>> gem5-users mailing list
>> gem5-users@gem5.org <mailto:gem5-users@gem5.org>
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users 
>> <http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users>
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org <mailto:gem5-users@gem5.org>
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users 
> <http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users>_______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to