syclacademy
syclacademy copied to clipboard
Problem with Excercise 6 solution
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.
Thanks Thomas for providing this, we will look into integrating your version.
@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.
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.
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.
Hi @xerofoify I can't reproduce these syntax errors locally. Could you copy-paste your version of solution.cpp here please?
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
It seems to have gotten managed with something after resetting the git's head it seems fine.
That's great. @AerialMantis can we close this issue since the original one is no longer relevant?
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,