Hi Daniel,

I tried with your building command and at least it is working fine for me.

Thanks!
--Yichen

On Fri, Nov 6, 2020 at 6:41 PM Yichen Yang <yang...@umich.edu> wrote:

> Hi all,
>
> I am using gcn3-gpu docker running on ubuntu16.4 host machine. And follow
> the gem5-resources/readme to build the application.
>
> Thanks!
> --Yichen
>
> On Fri, Nov 6, 2020 at 6:21 PM Poremba, Matthew <matthew.pore...@amd.com>
> wrote:
>
>> [AMD Public Use]
>>
>>
>>
>> Hi Matt,
>>
>>
>>
>>
>>
>> I also see the getdents error with square building gem5 with gcc 7.5.0.
>>
>>
>>
>> I would hope we wouldn’t have to define a variable in scons to get a
>> syscall to work. I am not sure where is SYS_getdents / SYS_getdents64 are
>> supposed to be defined, but it is not anywhere in gem5. Different compiler
>> maybe? The change that broke this for me literally just moves files around
>> so I have no ideas how that caused it to break.
>>
>>
>>
>>
>>
>> -Matt
>>
>>
>>
>> *From:* Matt Sinclair <mattdsincl...@gmail.com>
>> *Sent:* Friday, November 6, 2020 2:55 PM
>> *To:* Daniel Gerzhoy <daniel.gerz...@gmail.com>
>> *Cc:* Kyle Roarty <kroa...@wisc.edu>; Poremba, Matthew <
>> matthew.pore...@amd.com>; Yichen Yang <yang...@umich.edu>; gem5 users
>> mailing list <gem5-users@gem5.org>
>> *Subject:* Re: [gem5-users] Re: gem5 GCN3 GPU model running issues
>>
>>
>>
>> [CAUTION: External Email]
>>
>> Ok, we’re using the same, but haven’t gotten the second error ...
>> strange.  Are you using different apps?
>>
>>
>>
>> Matt
>>
>>
>>
>> On Fri, Nov 6, 2020 at 4:45 PM Daniel Gerzhoy <daniel.gerz...@gmail.com>
>> wrote:
>>
>> I'm using the gcn3 docker, so Ubuntu 16.04 I believe
>>
>>
>>
>> On Fri, Nov 6, 2020 at 5:44 PM Matt Sinclair <mattdsincl...@gmail.com>
>> wrote:
>>
>> Hi Daniel & Yichen,
>>
>>
>>
>> What OS are you using?  We have not encountered either of these problems
>> thus far ... something must be different about your setup and ours.
>>
>>
>>
>> Thanks,
>>
>> Matt
>>
>>
>>
>> On Fri, Nov 6, 2020 at 4:35 PM Daniel Gerzhoy via gem5-users <
>> gem5-users@gem5.org> wrote:
>>
>> For some reason that syscall is only built if you set a flag. Recompile
>> the simulator like so:
>>
>>
>>
>> scons -j$(nproc) build/GCN3_X86/gem5.opt --ignore-style SLICC_HTML=True
>> CCFLAGS_EXTRA="-DSYS_getdents -DSYS_getdents64"
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Dan
>>
>>
>>
>> On Fri, Nov 6, 2020 at 5:25 PM Poremba, Matthew via gem5-users <
>> gem5-users@gem5.org> wrote:
>>
>> [AMD Public Use]
>>
>>
>>
>> Looking into that syscall error now.
>>
>>
>>
>> I’m not quite sure yet how to fix the docker image since python 3.5 is
>> the latest version available for the distro needed.  For now I disabled the
>> check for 3.6 since it seems unnecessarily strict and doesn’t break
>> anything related to this build.
>>
>>
>>
>>
>>
>> -Matt
>>
>>
>>
>> *From:* Yichen Yang <yang...@umich.edu>
>> *Sent:* Friday, November 6, 2020 1:30 PM
>> *To:* Poremba, Matthew <matthew.pore...@amd.com>
>> *Cc:* gem5 users mailing list <gem5-users@gem5.org>
>> *Subject:* Re: [gem5-users] gem5 GCN3 GPU model running issues
>>
>>
>>
>> [CAUTION: External Email]
>>
>> Thanks!
>>
>>
>>
>> I tried the develop branch. But running into new problems
>>
>> warn: ignoring syscall set_robust_list(...)
>> warn: ignoring syscall rt_sigaction(...)
>>       (further warnings will be suppressed)
>> warn: ignoring syscall rt_sigprocmask(...)
>>       (further warnings will be suppressed)
>> warn: ignoring syscall mprotect(...)
>> warn: ignoring syscall mprotect(...)
>> fatal: syscall getdents (#78) unimplemented.
>> Memory Usage: 1562768 KBytes
>>
>>
>>
>> And I think the dockerfile needs some update. The scons requires
>> python3.6 to compile gem5, to be specific, `python3-config` need python3.6,
>> but the default version installed with the docker is 3.5.
>>
>>
>>
>> Best, Yichen
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Nov 6, 2020 at 2:58 PM Poremba, Matthew <matthew.pore...@amd.com>
>> wrote:
>>
>> [AMD Public Use]
>>
>>
>>
>> Hi Yichen,
>>
>>
>>
>>
>>
>> Based on the changes I see you’ve made, it seems like you are using an
>> older version of gem5.  These should all be fixed, including the error you
>> are seeing, on the tip of develop.
>>
>>
>>
>> Keep in mind GCN3 was not officially part of the gem5 20.1 release, so
>> the most up to date version is on the develop branch until the next gem5
>> release.
>>
>>
>>
>>
>>
>> -Matt
>>
>>
>>
>> *From:* Yichen Yang via gem5-users <gem5-users@gem5.org>
>> *Sent:* Friday, November 6, 2020 11:34 AM
>> *To:* gem5-users@gem5.org
>> *Cc:* Yichen Yang <yang...@umich.edu>
>> *Subject:* [gem5-users] gem5 GCN3 GPU model running issues
>>
>>
>>
>> [CAUTION: External Email]
>>
>> Hi,
>>
>>
>>
>> I was trying to run gem5 with its GCN3 GPU model following the
>> instructions on
>> https://www.gem5.org/documentation/general_docs/gpu_models/GCN3
>> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.gem5.org%2Fdocumentation%2Fgeneral_docs%2Fgpu_models%2FGCN3&data=04%7C01%7CMatthew.Poremba%40amd.com%7Ce784e8226edb4138f08608d882a70733%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637403001177990027%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ftl6JwcqokQRhvCYniNVa74OP3WgTIo0K%2BZClXeTW2c%3D&reserved=0>
>> .
>>
>>
>>
>> I fixed some bugs in the code but still cannot run the example. I
>> attached commands and bugs I fixed below.
>>
>>
>>
>> The simulator launched and running into this problem:
>>
>> Program Started!
>> info: running on device
>> info: architecture on AMD GPU device is: 801
>> info: allocate host mem (  7.63 MB)
>> info: launch 'vector_square' kernel
>> panic: panic condition availableTokens > maxTokens occurred: More tokens
>> available than the maximum after recvTokens!
>> Memory Usage: 1737788 KBytes
>> Program aborted at tick 137231963000
>>
>>
>>
>> Is there anything I did incorrectly?
>>
>>
>>
>> Thanks!
>>
>> Best, Yichen
>>
>>
>>
>> To be specific, I use the following command:
>>
>> ## build docker
>> docker build -t gcn3-test gem5/util/dockerfiles/gcn-gpu
>> ## make gem5
>> docker run --rm -v $PWD/gem5:/gem5 -w /gem5 gcn3-test scons -sQ
>> -j$(nproc) build/GCN3_X86/gem5.opt
>> ## make application
>> docker run --rm -v $PWD/gem5-resources:/gem5-resources -w /gem5-resources
>> -u $UID:$GID \
>>                 gcr.io/gem5-test/gcn-gpu
>> <https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgcr.io%2Fgem5-test%2Fgcn-gpu&data=04%7C01%7CMatthew.Poremba%40amd.com%7Ce784e8226edb4138f08608d882a70733%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637403001178000023%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=grJ0SMHG6SL6wl%2FmZMJGzUNAVOBAuLrCtYysIPUBKiQ%3D&reserved=0>
>>  make
>> gfx8-apu -C /gem5-resources/src/square
>> ## run gem5
>> docker run --rm -v $PWD/gem5:/gem5 -v $PWD/gem5-resources:/gem5-resources
>> \
>>                 -w /gem5 gcn3-test \
>>                 build/GCN3_X86/gem5.opt configs/example/apu_se.py -n2 \
>>                 --benchmark-root=/gem5-resources/src/square/bin \
>>                 -c square.o
>>
>>
>>
>> And here's the bugs I fixed:
>>
>> diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py
>> index 03418c3..a285a14 100644
>> --- a/configs/example/apu_se.py
>> +++ b/configs/example/apu_se.py
>> @@ -174,7 +174,7 @@ parser.add_option("--numLdsBanks", type="int",
>> default=32,
>>                    help="number of physical banks per LDS module")
>>  parser.add_option("--ldsBankConflictPenalty", type="int", default=1,
>>                    help="number of cycles per LDS bank conflict")
>> -parser.add_options("--lds-size", type="int", default=65536,
>> +parser.add_option("--lds-size", type="int", default=65536,
>>                     help="Size of the LDS in bytes")
>>  parser.add_option('--fast-forward-pseudo-op', action='store_true',
>>                    help = 'fast forward using kvm until the m5_switchcpu'
>> diff --git a/src/gpu-compute/compute_unit.hh
>> b/src/gpu-compute/compute_unit.hh
>> index fe2091d..2df4807 100644
>> --- a/src/gpu-compute/compute_unit.hh
>> +++ b/src/gpu-compute/compute_unit.hh
>> @@ -1015,6 +1015,8 @@ class ComputeUnit : public ClockedObject
>>              return sqcTLBPort;
>>          } else if (if_name == "ldsPort") {
>>              return ldsPort;
>> +        } else if (if_name == "gmTokenPort") {
>> +            return gmTokenPort;
>>          } else {
>>              return ClockedObject::getPort(if_name, idx);
>>          }
>>
>>
>>
>> --
>>
>> *Yichen Yang*
>>
>> University of Michigan
>>
>> Ph.D. Student in Computer Science and Engineering
>>
>> Address: 2260 Hayward St, Ann Arbor, MI 48109, U.S.A.
>> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.google.com%2Fmaps%2Fsearch%2F2260%2BHayward%2BSt%2C%2BAnn%2BArbor%2C%2BMI%2B48109%2C%2BU.S.A.%3Fentry%3Dgmail%26source%3Dg&data=04%7C01%7CMatthew.Poremba%40amd.com%7Ce784e8226edb4138f08608d882a70733%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637403001178010017%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6Hx%2FaTdhVXt2CsIEjCpyFZUsIWWM64lr0viirMSEKrk%3D&reserved=0>
>>
>> E-mail: yang...@umich.edu
>>
>>
>>
>>
>> --
>>
>> *Yichen Yang*
>>
>> University of Michigan
>>
>> Ph.D. Student in Computer Science and Engineering
>>
>> Address: 2260 Hayward St, Ann Arbor, MI 48109, U.S.A.
>> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.google.com%2Fmaps%2Fsearch%2F2260%2BHayward%2BSt%2C%2BAnn%2BArbor%2C%2BMI%2B48109%2C%2BU.S.A.%3Fentry%3Dgmail%26source%3Dg&data=04%7C01%7CMatthew.Poremba%40amd.com%7Ce784e8226edb4138f08608d882a70733%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637403001178010017%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6Hx%2FaTdhVXt2CsIEjCpyFZUsIWWM64lr0viirMSEKrk%3D&reserved=0>
>>
>> E-mail: yang...@umich.edu
>>
>> _______________________________________________
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>>
>> _______________________________________________
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>>
>> --
>>
>> Regards,
>> Matt Sinclair
>>
>> Assistant Professor
>> University of Wisconsin-Madison
>>
>> Computer Sciences Department
>>
>> cs.wisc.edu/~sinclair
>> <https://nam11.safelinks.protection.outlook.com/?url=http:%2F%2Fcs.wisc.edu%2F~sinclair&data=04%7C01%7CMatthew.Poremba%40amd.com%7Ce784e8226edb4138f08608d882a70733%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637403001178020010%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=iymj5dpTdtfIxMuck2mBiexvZhPJwWyclaXsVbI4rro%3D&reserved=0>
>>
>> --
>>
>> Regards,
>> Matt Sinclair
>>
>> Assistant Professor
>> University of Wisconsin-Madison
>>
>> Computer Sciences Department
>>
>> cs.wisc.edu/~sinclair
>> <https://nam11.safelinks.protection.outlook.com/?url=http:%2F%2Fcs.wisc.edu%2F~sinclair&data=04%7C01%7CMatthew.Poremba%40amd.com%7Ce784e8226edb4138f08608d882a70733%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637403001178020010%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=iymj5dpTdtfIxMuck2mBiexvZhPJwWyclaXsVbI4rro%3D&reserved=0>
>>
>
>
> --
>
> *Yichen Yang*
>
> University of Michigan
>
> Ph.D. Student in Computer Science and Engineering
>
> Address: 2260 Hayward St, Ann Arbor, MI 48109, U.S.A.
>
> E-mail: yang...@umich.edu
>


-- 

*Yichen Yang*

University of Michigan

Ph.D. Student in Computer Science and Engineering

Address: 2260 Hayward St, Ann Arbor, MI 48109, U.S.A.

E-mail: yang...@umich.edu
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to