Skip to content

[SYCL] Optimize 1D accessor. #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

romanovvlad
Copy link
Contributor

In case of 1D buffer, adjust pointer to buffer offset during
initialization(__init method) rather then each time in operator[] or
get_pointer functions.

  • Fix some bugs related to missing offset calculations in several
    methods.

Signed-off-by: Vlad Romanov [email protected]

In case of 1D buffer, adjust pointer to buffer offset during
initialization(__init method) rather then each time in operator[] or
get_pointer functions.

+ Fix some bugs related to missing offset calculations in several
methods.

Signed-off-by: Vlad Romanov <[email protected]>
@romanovvlad romanovvlad requested a review from bader May 1, 2019 06:22
Copy link
Contributor

@vladimirlaz vladimirlaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add tests covering changed use cases

@keryell
Copy link
Contributor

keryell commented May 2, 2019

By looking at this I realize that in triSYCL we do not use the same formula...
https://github.com/triSYCL/triSYCL/blob/master/include/CL/sycl/detail/linear_id.hpp
By looking at the specification it is not clear to me whether the computation should take into account the offset (Intel) or not (triSYCL)...

@romanovvlad
Copy link
Contributor Author

By looking at this I realize that in triSYCL we do not use the same formula...
https://github.com/triSYCL/triSYCL/blob/master/include/CL/sycl/detail/linear_id.hpp
By looking at the specification it is not clear to me whether the computation should take into account the offset (Intel) or not (triSYCL)...

Yeah... it's also not clear to me.

@romanovvlad
Copy link
Contributor Author

Could you please add tests covering changed use cases

Lit test test/basic_tests/buffer/subbuffer.cpp already tests this functionality. Is it enough?

@vladimirlaz
Copy link
Contributor

Could you please add tests covering changed use cases

Lit test test/basic_tests/buffer/subbuffer.cpp already tests this functionality. Is it enough?

Ok for me

@romanovvlad romanovvlad merged commit cc80635 into intel:sycl May 6, 2019
vladimirlaz pushed a commit to vladimirlaz/llvm that referenced this pull request Oct 11, 2019
vladimirlaz pushed a commit that referenced this pull request Feb 18, 2020
  CONFLICT (content): Merge conflict in clang/lib/Analysis/CallGraph.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants