HI : I built the HSAIL_X86 model for gem5. I also created the an executable "hello" using g++ and openCL runtimes. I was able to build the required .asm file using the AMD High-Level-Compiler ( HLC ) provided in AMD git repo. However when i try to run the program , i get an error : unknown HSA Object.
*kzs0115@eelnx221:/scratch/gem5$ ./build/HSAIL_X86/gem5.opt configs/example/apu_se.py -c tests/test-progs/gpu-hello/bin/x86/linux/gpu-hello -k tests/test-progs/gpu-hello/bin/x86/gpu-hello-kernel.asm linux/ kzs0115@eelnx221:/scratch/gem5$ ./build/HSAIL_X86/gem5.opt configs/example/apu_se.py -c tests/test-progs/gpu-hello/bin/x86/linux/gpu-hello -k tests/test-progs/gpu-hello/bin/x86/linux/gpu-hello-kernel.brig gem5 Simulator System. http://gem5.org <http://gem5.org>gem5 is copyrighted software; use the --copyright option for details.gem5 compiled Feb 4 2019 12:30:03gem5 started Feb 15 2019 14:25:45gem5 executing on eelnx221, pid 28614command line: ./build/HSAIL_X86/gem5.opt configs/example/apu_se.py -c tests/test-progs/gpu-hello/bin/x86/linux/gpu-hello -k tests/test-progs/gpu-hello/bin/x86/linux/gpu-hello-kernel.brigGlobal frequency set at 1000000000000 ticks per secondwarn: system.ruby.network adopting orphan SimObject param 'int_links'warn: system.ruby.network adopting orphan SimObject param 'ext_links'warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)fatal: Unknown HSA object type for file: ./tests/test-progs/gpu-hello/bin/x86/linux/gpu-hello-kernel.brig.Memory Usage: 1169144 KBytes* I made the executable using the following commands : *g++ -static -std=c++11 -I../../../../cl-runtime/ $(prog).cpp $(prog)_benchmark.cc $(prog)_cl12_benchmark.cc -L../../../../cl-runtime/dbg64b/ -lOpenCL -o $(prog)* I built the asm using the following commands : *clc2 --enable-hsail-extensions -cl-std=CL2.0 $oclfllvm-dis -o results/$fname.fe.ll results/$fname.fe.bcecho "FE complete"llvm-link -prelink-opt -o results/$fname.linked.bc results/$fname.fe.bc -l $ROOT/bin/builtins-hsail.bcecho "llvm-link completed!"llvm-dis -o results/$fname.linked.ll results/$fname.linked.bcopt -O3 -gpu -whole -verify results/$fname.linked.bc -o results/$fname.opt.bcecho "opt complete!"llvm-dis -o results/$fname.opt.ll results/$fname.opt.bcllc -O2 -march=hsail-64 -filetype=obj -o results/$fname.asm results/$fname.opt.bcecho "llc complete"hsailasm -disassemble -o results/$fname.hsail results/$fname.brigecho "HSAIL generated!"* Any ideas on how to fix this ? Am i generating the .asm file incorrectly ? If so , how do i generate it ? Thank you for your time On Tue, Feb 12, 2019 at 1:29 PM Gutierrez, Anthony < [email protected]> wrote: > There are some instructions about how to build the software stack for the > GPU model here: http://gem5.org/GPU_Models > > You’ll need to build the ROCr (runtime) ROCt (thunk) and HCC (clang/llvm > compiler), and probably HIP too as most available codes are in HIP. For > example, the Rodinia benchmarks have been hipified here: > https://github.com/ROCm-Developer-Tools/HIP-Examples/tree/master/rodinia_3.0/hip > > The recommended branches are listed on the site, however most users have > not been able to get them to run in the simulator. > > These are shas for each repo known to work in gem5: > > HCC: 7d030799dca53d39f141d60c73950966501b3ffb > ROCr: f92eba2a8b0d5e9a8fa28a127bd1eb59f03d3eb0 > ROCt: d13b4e2e2413cb20e8cc2bcdd419f06f499f306e > HIP: 0e3d824e8d8f1ec3e31b26fa1f2e46fd3e6d4241 > > > From: gem5-users <[email protected]> On Behalf Of Krishna > Subramanian > Sent: Thursday, February 7, 2019 12:26 PM > To: gem5 Developer List <[email protected]>; [email protected] > Subject: [gem5-users] GPU > > Hi > > I was able to successfully run the GPU Hello included in the gem5 > distribution using the HSAIL build. However i was wondering how to write my > own openCL/different language program and compile it all the way down to an > executable binary on the HSAIL ( or the equivalent in GCN3). Is there any > tutorial/methodology you can point me to if available. > > Thank you for your time > Best, > Krishna > _______________________________________________ > gem5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
