[gem5-users] Re: AMD GCN3 - HIP Compile m5_exit() issue

2020-08-01 Thread Sampad Mohapatra via gem5-users
Sorry for the confusion. Compiling with gcc works. I am able to use
m5_exit() after following the steps in my last reply.

Though I will also test your given steps.

Thank you Daniel.

On Sat, Aug 1, 2020, 3:51 PM Daniel Gerzhoy 
wrote:

> What errors are you getting?
>
> I would separate that out further though.
>
> Steps 1-3: Compile Each one separately
> g++ -O2 -I/sam/gem5/util/m5/../../include -o m5op_x86.o -c m5op_x86.S
> g++ -O2 -I/sam/gem5/util/m5/../../include -o m5_mmap.o -c m5_mmap.c
> hipcc -g -O2 -I/sam/gem5/include -o 2DConvolution.o  2DConvolution.cpp
>
> #Step 4: Use hipcc to link
> hipcc -g -O2  -o 2DConvolution.exe m5op_x86.o m5_mmap.o 2DConvolution.o
> --amdgpu-target=gfx801
>
> On Sat, Aug 1, 2020 at 3:39 PM Sampad Mohapatra  wrote:
>
>> Hi Daniel,
>>
>> Actually compiling m5op_x86.o and m5_mmap.o fails with hipcc.
>> Gcc works fine. Here's my steps.
>>
>> *Compilation Steps:*
>> g++ -O2 -I/sam/gem5/util/m5/../../include -o m5op_x86.o -c m5op_x86.S
>> g++ -O2 -I/sam/gem5/util/m5/../../include -o m5_mmap.o -c m5_mmap.c
>>
>> /opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2 2DConvolution.cpp
>> -I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.o
>> /sam/gem5/util/m5/m5_mmap.o -o 2DConvolution.exe
>>
>> Thanks,
>> Sampad
>>
>> On Sat, Aug 1, 2020 at 3:17 PM Daniel Gerzhoy 
>> wrote:
>>
>>> Sorry, using hipcc* to link them together.
>>>
>>> On Sat, Aug 1, 2020 at 2:15 PM Daniel Gerzhoy 
>>> wrote:
>>>
 I would suggest compiling M5op with gcc or g++ with a -c flag and then
 using M5op to link them together.

 On Sat, Aug 1, 2020 at 2:13 PM Sampad Mohapatra via gem5-users <
 gem5-users@gem5.org> wrote:

> Hello,
>
> While trying to compile polybench benchmarks with m5_exit(0) using the
> HIP compiler ()
> I am getting a lot of errors (m5ops.h was included).
> Please give me some advice.
>
> *Compile Command:*
>
> /opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2
> 2DConvolution.cpp -I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.S -o
> 2DConvolution.exe
>
> *Error:*
>
> /sam/gem5/util/m5/m5op_x86.S:78:16: error: unknown directive
> .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00;
> ret; .endfunc;
>^
> /sam/gem5/util/m5/m5op_x86.S:78:73: error: unknown directive
> .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00;
> ret; .endfunc;
>
>   ^
> /sam/gem5/util/m5/m5op_x86.S:79:20: error: unknown directive
> .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04;
> .word 0x01; ret; .endfunc;
>^
> /sam/gem5/util/m5/m5op_x86.S:79:85: error: unknown directive
> .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04;
> .word 0x01; ret; .endfunc;
>
> ...
>
> Thank You,
> Sampad Mohapatra
>   ^
> ___
> 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

[gem5-users] Re: AMD GCN3 - HIP Compile m5_exit() issue

2020-08-01 Thread Daniel Gerzhoy via gem5-users
What errors are you getting?

I would separate that out further though.

Steps 1-3: Compile Each one separately
g++ -O2 -I/sam/gem5/util/m5/../../include -o m5op_x86.o -c m5op_x86.S
g++ -O2 -I/sam/gem5/util/m5/../../include -o m5_mmap.o -c m5_mmap.c
hipcc -g -O2 -I/sam/gem5/include -o 2DConvolution.o  2DConvolution.cpp

#Step 4: Use hipcc to link
hipcc -g -O2  -o 2DConvolution.exe m5op_x86.o m5_mmap.o 2DConvolution.o
--amdgpu-target=gfx801

On Sat, Aug 1, 2020 at 3:39 PM Sampad Mohapatra  wrote:

> Hi Daniel,
>
> Actually compiling m5op_x86.o and m5_mmap.o fails with hipcc.
> Gcc works fine. Here's my steps.
>
> *Compilation Steps:*
> g++ -O2 -I/sam/gem5/util/m5/../../include -o m5op_x86.o -c m5op_x86.S
> g++ -O2 -I/sam/gem5/util/m5/../../include -o m5_mmap.o -c m5_mmap.c
>
> /opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2 2DConvolution.cpp
> -I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.o
> /sam/gem5/util/m5/m5_mmap.o -o 2DConvolution.exe
>
> Thanks,
> Sampad
>
> On Sat, Aug 1, 2020 at 3:17 PM Daniel Gerzhoy 
> wrote:
>
>> Sorry, using hipcc* to link them together.
>>
>> On Sat, Aug 1, 2020 at 2:15 PM Daniel Gerzhoy 
>> wrote:
>>
>>> I would suggest compiling M5op with gcc or g++ with a -c flag and then
>>> using M5op to link them together.
>>>
>>> On Sat, Aug 1, 2020 at 2:13 PM Sampad Mohapatra via gem5-users <
>>> gem5-users@gem5.org> wrote:
>>>
 Hello,

 While trying to compile polybench benchmarks with m5_exit(0) using the
 HIP compiler ()
 I am getting a lot of errors (m5ops.h was included).
 Please give me some advice.

 *Compile Command:*

 /opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2 2DConvolution.cpp
 -I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.S -o 2DConvolution.exe

 *Error:*

 /sam/gem5/util/m5/m5op_x86.S:78:16: error: unknown directive
 .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
 .endfunc;
^
 /sam/gem5/util/m5/m5op_x86.S:78:73: error: unknown directive
 .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
 .endfunc;

 ^
 /sam/gem5/util/m5/m5op_x86.S:79:20: error: unknown directive
 .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04;
 .word 0x01; ret; .endfunc;
^
 /sam/gem5/util/m5/m5op_x86.S:79:85: error: unknown directive
 .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04;
 .word 0x01; ret; .endfunc;

 ...

 Thank You,
 Sampad Mohapatra
 ^
 ___
 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

[gem5-users] Re: AMD GCN3 - HIP Compile m5_exit() issue

2020-08-01 Thread Sampad Mohapatra via gem5-users
Hi Daniel,

Actually compiling m5op_x86.o and m5_mmap.o fails with hipcc.
Gcc works fine. Here's my steps.

*Compilation Steps:*
g++ -O2 -I/sam/gem5/util/m5/../../include -o m5op_x86.o -c m5op_x86.S
g++ -O2 -I/sam/gem5/util/m5/../../include -o m5_mmap.o -c m5_mmap.c

/opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2 2DConvolution.cpp
-I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.o
/sam/gem5/util/m5/m5_mmap.o -o 2DConvolution.exe

Thanks,
Sampad

On Sat, Aug 1, 2020 at 3:17 PM Daniel Gerzhoy 
wrote:

> Sorry, using hipcc* to link them together.
>
> On Sat, Aug 1, 2020 at 2:15 PM Daniel Gerzhoy 
> wrote:
>
>> I would suggest compiling M5op with gcc or g++ with a -c flag and then
>> using M5op to link them together.
>>
>> On Sat, Aug 1, 2020 at 2:13 PM Sampad Mohapatra via gem5-users <
>> gem5-users@gem5.org> wrote:
>>
>>> Hello,
>>>
>>> While trying to compile polybench benchmarks with m5_exit(0) using the
>>> HIP compiler ()
>>> I am getting a lot of errors (m5ops.h was included).
>>> Please give me some advice.
>>>
>>> *Compile Command:*
>>>
>>> /opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2 2DConvolution.cpp
>>> -I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.S -o 2DConvolution.exe
>>>
>>> *Error:*
>>>
>>> /sam/gem5/util/m5/m5op_x86.S:78:16: error: unknown directive
>>> .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
>>> .endfunc;
>>>^
>>> /sam/gem5/util/m5/m5op_x86.S:78:73: error: unknown directive
>>> .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
>>> .endfunc;
>>> ^
>>> /sam/gem5/util/m5/m5op_x86.S:79:20: error: unknown directive
>>> .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04; .word
>>> 0x01; ret; .endfunc;
>>>^
>>> /sam/gem5/util/m5/m5op_x86.S:79:85: error: unknown directive
>>> .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04; .word
>>> 0x01; ret; .endfunc;
>>>
>>> ...
>>>
>>> Thank You,
>>> Sampad Mohapatra
>>> ^
>>> ___
>>> 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

[gem5-users] Re: AMD GCN3 - HIP Compile m5_exit() issue

2020-08-01 Thread Daniel Gerzhoy via gem5-users
Sorry, using hipcc* to link them together.

On Sat, Aug 1, 2020 at 2:15 PM Daniel Gerzhoy 
wrote:

> I would suggest compiling M5op with gcc or g++ with a -c flag and then
> using M5op to link them together.
>
> On Sat, Aug 1, 2020 at 2:13 PM Sampad Mohapatra via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Hello,
>>
>> While trying to compile polybench benchmarks with m5_exit(0) using the
>> HIP compiler ()
>> I am getting a lot of errors (m5ops.h was included).
>> Please give me some advice.
>>
>> *Compile Command:*
>>
>> /opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2 2DConvolution.cpp
>> -I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.S -o 2DConvolution.exe
>>
>> *Error:*
>>
>> /sam/gem5/util/m5/m5op_x86.S:78:16: error: unknown directive
>> .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
>> .endfunc;
>>^
>> /sam/gem5/util/m5/m5op_x86.S:78:73: error: unknown directive
>> .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
>> .endfunc;
>> ^
>> /sam/gem5/util/m5/m5op_x86.S:79:20: error: unknown directive
>> .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04; .word
>> 0x01; ret; .endfunc;
>>^
>> /sam/gem5/util/m5/m5op_x86.S:79:85: error: unknown directive
>> .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04; .word
>> 0x01; ret; .endfunc;
>>
>> ...
>>
>> Thank You,
>> Sampad Mohapatra
>>   ^
>> ___
>> 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

[gem5-users] Re: AMD GCN3 - HIP Compile m5_exit() issue

2020-08-01 Thread Daniel Gerzhoy via gem5-users
I would suggest compiling M5op with gcc or g++ with a -c flag and then
using M5op to link them together.

On Sat, Aug 1, 2020 at 2:13 PM Sampad Mohapatra via gem5-users <
gem5-users@gem5.org> wrote:

> Hello,
>
> While trying to compile polybench benchmarks with m5_exit(0) using the HIP
> compiler ()
> I am getting a lot of errors (m5ops.h was included).
> Please give me some advice.
>
> *Compile Command:*
>
> /opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2 2DConvolution.cpp
> -I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.S -o 2DConvolution.exe
>
> *Error:*
>
> /sam/gem5/util/m5/m5op_x86.S:78:16: error: unknown directive
> .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
> .endfunc;
>^
> /sam/gem5/util/m5/m5op_x86.S:78:73: error: unknown directive
> .globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
> .endfunc;
> ^
> /sam/gem5/util/m5/m5op_x86.S:79:20: error: unknown directive
> .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04; .word
> 0x01; ret; .endfunc;
>^
> /sam/gem5/util/m5/m5op_x86.S:79:85: error: unknown directive
> .globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04; .word
> 0x01; ret; .endfunc;
>
> ...
>
> Thank You,
> Sampad Mohapatra
>   ^
> ___
> 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

[gem5-users] AMD GCN3 - HIP Compile m5_exit() issue

2020-08-01 Thread Sampad Mohapatra via gem5-users
Hello,

While trying to compile polybench benchmarks with m5_exit(0) using the HIP
compiler ()
I am getting a lot of errors (m5ops.h was included).
Please give me some advice.

*Compile Command:*

/opt/rocm/hip/bin/hipcc --amdgpu-target=gfx801 -g -O2 2DConvolution.cpp
-I/sam/gem5/include /sam/gem5/util/m5/m5op_x86.S -o 2DConvolution.exe

*Error:*

/sam/gem5/util/m5/m5op_x86.S:78:16: error: unknown directive
.globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
.endfunc;
   ^
/sam/gem5/util/m5/m5op_x86.S:78:73: error: unknown directive
.globl m5_arm; .func m5_arm; m5_arm: .byte 0x0F, 0x04; .word 0x00; ret;
.endfunc;
^
/sam/gem5/util/m5/m5op_x86.S:79:20: error: unknown directive
.globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04; .word
0x01; ret; .endfunc;
   ^
/sam/gem5/util/m5/m5op_x86.S:79:85: error: unknown directive
.globl m5_quiesce; .func m5_quiesce; m5_quiesce: .byte 0x0F, 0x04; .word
0x01; ret; .endfunc;

...

Thank You,
Sampad Mohapatra
^
___
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] Error creating a SimObject

2020-08-01 Thread Saideepak Bejawada via gem5-users
Hi all,

I was trying to create a SimObject(named Buffer) and pass it as an argument to 
another. I could build the gem5 without errors, but while running, I 
encountered the following error:

TypeError: (): incompatible function arguments. The following argument types 
are supported:
1. (self: _m5.param_BaseCache.BaseCacheParams, arg0: 
_m5.param_Buffer.Buffer) -> None

I couldn't understand the error. Does anyone have any idea about this? Any 
comments are welcome.

Thanks,
Saideepak.
___
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] Reading from memory in Gem5

2020-08-01 Thread ABD ALRHMAN ABO ALKHEEL via gem5-users
Hi All, how to read data from memory in Gem5 ? Can I read data from memory in 
Gem5  for a specific addresses? If so, should I use the virtual address or 
physical address? For example, how load instructions read the data from memory? 
Any help would be appreciated. Thanks
___
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