Assignment 6: Validation fail on GPU

67 views
Skip to first unread message

Nicholas Fung

unread,
Apr 6, 2020, 9:52:12 PM4/6/20
to Parallel and Distributed Systems at SFU (431)
Thanks to the update to run.sh, it turns out that my GPU implementation isn't getting correct results. However, we don't have any indicators outside of pass/fail, so I have no idea on why the GPU images don't match. Any suggestions on why is there a mismatch?

Bruno Da Silva

unread,
Apr 6, 2020, 9:53:22 PM4/6/20
to Parallel and Distributed Systems at SFU (431)
Run the individual diffs the script does, to see which one failed

Arrvindh Shriraman

unread,
Apr 6, 2020, 9:55:49 PM4/6/20
to parallel-s...@googlegroups.com
That is a hard one as the images might look similar pixel values may be difference. A couple of things
1) If you have concurrency induced bug 
Your GPU image output will vary from run to run (independent of reference image)
2) if your GPU output is same across runs then I will check the actual pixel operations 


On Mon, Apr 6, 2020 at 18:52 Nicholas Fung <ncf...@sfu.ca> wrote:
Thanks to the update to run.sh, it turns out that my GPU implementation isn't getting correct results. However, we don't have any indicators outside of pass/fail, so I have no idea on why the GPU images don't match. Any suggestions on why is there a mismatch?

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parallel-systems-sfu/a78faf9e-e352-443a-8705-ada8838fd211%40googlegroups.com.
--
Arrvindh Shriraman
Associate Professor
Computer Science
Simon Fraser University

Nicholas Fung

unread,
Apr 6, 2020, 10:11:04 PM4/6/20
to Parallel and Distributed Systems at SFU (431)
So in every case where we're calling a device function (gpu_*), we'll have to use atomic operations to keep them thread safe?


On Monday, April 6, 2020 at 6:55:49 PM UTC-7, Arrvindh Shriraman wrote:
That is a hard one as the images might look similar pixel values may be difference. A couple of things
1) If you have concurrency induced bug 
Your GPU image output will vary from run to run (independent of reference image)
2) if your GPU output is same across runs then I will check the actual pixel operations 


On Mon, Apr 6, 2020 at 18:52 Nicholas Fung <ncf...@sfu.ca> wrote:
Thanks to the update to run.sh, it turns out that my GPU implementation isn't getting correct results. However, we don't have any indicators outside of pass/fail, so I have no idea on why the GPU images don't match. Any suggestions on why is there a mismatch?

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems-sfu+unsub...@googlegroups.com.

Bruno Da Silva

unread,
Apr 6, 2020, 10:12:09 PM4/6/20
to Parallel and Distributed Systems at SFU (431)
Only if you're writing to specific pieces of memory that other threads might be writing to concurrently.

In all other cases, you do not need to use atomics.

Arrvindh Shriraman

unread,
Apr 6, 2020, 10:13:34 PM4/6/20
to parallel-s...@googlegroups.com
Your question seems to suggest a misunderstanding. You may want to visit the slides on histogram from last week

Atomics only work on fundamental types not functions 

On Mon, Apr 6, 2020 at 19:11 Nicholas Fung <ncf...@sfu.ca> wrote:
So in every case where we're calling a device function (gpu_*), we'll have to use atomic operations to keep them thread safe?

On Monday, April 6, 2020 at 6:55:49 PM UTC-7, Arrvindh Shriraman wrote:
That is a hard one as the images might look similar pixel values may be difference. A couple of things
1) If you have concurrency induced bug 
Your GPU image output will vary from run to run (independent of reference image)
2) if your GPU output is same across runs then I will check the actual pixel operations 


On Mon, Apr 6, 2020 at 18:52 Nicholas Fung <ncf...@sfu.ca> wrote:
Thanks to the update to run.sh, it turns out that my GPU implementation isn't getting correct results. However, we don't have any indicators outside of pass/fail, so I have no idea on why the GPU images don't match. Any suggestions on why is there a mismatch?

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems...@googlegroups.com.

--
Arrvindh Shriraman
Associate Professor
Computer Science
Simon Fraser University

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parallel-systems-sfu/cf79306d-bc54-4b7f-9c27-3a610aebd0a9%40googlegroups.com.

Nicholas Fung

unread,
Apr 6, 2020, 10:16:50 PM4/6/20
to Parallel and Distributed Systems at SFU (431)
Apologies, I meant to ask if we have to use atomic operations within all of our device functions. I didn't mean to imply using atomic operations on the functions themselves.


On Monday, April 6, 2020 at 7:13:34 PM UTC-7, Arrvindh Shriraman wrote:
Your question seems to suggest a misunderstanding. You may want to visit the slides on histogram from last week

Atomics only work on fundamental types not functions 
On Mon, Apr 6, 2020 at 19:11 Nicholas Fung <ncf...@sfu.ca> wrote:
So in every case where we're calling a device function (gpu_*), we'll have to use atomic operations to keep them thread safe?

On Monday, April 6, 2020 at 6:55:49 PM UTC-7, Arrvindh Shriraman wrote:
That is a hard one as the images might look similar pixel values may be difference. A couple of things
1) If you have concurrency induced bug 
Your GPU image output will vary from run to run (independent of reference image)
2) if your GPU output is same across runs then I will check the actual pixel operations 


On Mon, Apr 6, 2020 at 18:52 Nicholas Fung <ncf...@sfu.ca> wrote:
Thanks to the update to run.sh, it turns out that my GPU implementation isn't getting correct results. However, we don't have any indicators outside of pass/fail, so I have no idea on why the GPU images don't match. Any suggestions on why is there a mismatch?

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems-sfu+unsub...@googlegroups.com.

--
Arrvindh Shriraman
Associate Professor
Computer Science
Simon Fraser University

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems-sfu+unsub...@googlegroups.com.

Arrvindh Shriraman

unread,
Apr 6, 2020, 10:40:02 PM4/6/20
to parallel-s...@googlegroups.com
Only where you have shared data structure updated by multiple threads e.g., histogram. 

On Mon, Apr 6, 2020 at 19:16 Nicholas Fung <ncf...@sfu.ca> wrote:
Apologies, I meant to ask if we have to use atomic operations within all of our device functions. I didn't mean to imply using atomic operations on the functions themselves.

On Monday, April 6, 2020 at 7:13:34 PM UTC-7, Arrvindh Shriraman wrote:
Your question seems to suggest a misunderstanding. You may want to visit the slides on histogram from last week

Atomics only work on fundamental types not functions 
On Mon, Apr 6, 2020 at 19:11 Nicholas Fung <ncf...@sfu.ca> wrote:
So in every case where we're calling a device function (gpu_*), we'll have to use atomic operations to keep them thread safe?

On Monday, April 6, 2020 at 6:55:49 PM UTC-7, Arrvindh Shriraman wrote:
That is a hard one as the images might look similar pixel values may be difference. A couple of things
1) If you have concurrency induced bug 
Your GPU image output will vary from run to run (independent of reference image)
2) if your GPU output is same across runs then I will check the actual pixel operations 


On Mon, Apr 6, 2020 at 18:52 Nicholas Fung <ncf...@sfu.ca> wrote:
Thanks to the update to run.sh, it turns out that my GPU implementation isn't getting correct results. However, we don't have any indicators outside of pass/fail, so I have no idea on why the GPU images don't match. Any suggestions on why is there a mismatch?

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems...@googlegroups.com.

--
Arrvindh Shriraman
Associate Professor
Computer Science
Simon Fraser University

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems...@googlegroups.com.

--
Arrvindh Shriraman
Associate Professor
Computer Science
Simon Fraser University

--
You received this message because you are subscribed to the Google Groups "Parallel and Distributed Systems at SFU (431)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parallel-systems...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parallel-systems-sfu/01380544-363d-4c33-83fc-1b1129ed5a6c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages