syclacademy icon indicating copy to clipboard operation
syclacademy copied to clipboard

Problem with Excercise 6 solution

Open thomas-perschke opened this issue 4 years ago • 9 comments

Hello,

the solution for exercise 6 (matrix transpose) has a problem in the local memory part. I attached the solution file with a real testcase showing the problem and a possible fix.

solution .txt

thomas-perschke avatar Oct 29 '20 08:10 thomas-perschke

Thanks Thomas for providing this, we will look into integrating your version.

rodburns avatar Nov 02 '20 08:11 rodburns

@rodburns What is the status of this? By looking at https://github.com/codeplaysoftware/syclacademy/pull/33 it looks like this example is no longer in the training.

keryell avatar Oct 31 '21 17:10 keryell

This was the original exercise for demonstrating coalesced memory access, it's still an interesting exercises so might be worth adding it back in again, not sure where it would fit into the lessons, but we could maybe add it as an extra exercise for now.

AerialMantis avatar Nov 02 '21 10:11 AerialMantis

I'm seeing build errors with the solution for Exercise 6 I thought my solution was wrong but after I'm hitting these issues when building on Ubuntu 22.04. Most of these just seem to be missing brackets after trying them on my machine: olution.cpp:53:71: error: expected ';' after expression [=](sycl::id<1> idx) { accR[idx] = accA[idx] + accB[idx] ^ ; solution.cpp:55:9: error: member reference base type 'void' is not a structure or union .wait(); ^~~~~ solution.cpp:58:5: error: expected ')' } catch (const sycl::exception& e) { ^ solution.cpp:46:16: note: to match this '(' .submit([&](sycl::handler& cgh) { ^ solution.cpp:65:2: error: expected catch } ^ solution.cpp:65:2: error: expected '}' solution.cpp:22:48: note: to match this '{' TEST_CASE("vector_add", "vector_add_solution") { ^ 5 errors generated.

xerofoify avatar Sep 06 '22 07:09 xerofoify

Hi @xerofoify I can't reproduce these syntax errors locally. Could you copy-paste your version of solution.cpp here please?

hdelan avatar Sep 06 '22 09:09 hdelan

Also please let me know the output of:

git diff Code_Exercises/Exercise_06_Vector_Add/solution.cpp

Run from the root dir of syclacademy. Thanks

hdelan avatar Sep 06 '22 09:09 hdelan

It seems to have gotten managed with something after resetting the git's head it seems fine.

xerofoify avatar Sep 06 '22 22:09 xerofoify

That's great. @AerialMantis can we close this issue since the original one is no longer relevant?

hdelan avatar Sep 07 '22 07:09 hdelan

Yeah I think this ticket can be closed, I think it might be worth re-introducing the matrix transpose example, though we should maybe create a separate ticket for this,

AerialMantis avatar Sep 08 '22 09:09 AerialMantis