-
Notifications
You must be signed in to change notification settings - Fork 75
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
[WIP] implement memory visibility #2180
base: develop
Are you sure you want to change the base?
Changes from all commits
aa6cf2e
57d2034
4e0d945
d7e7b8e
d1dce1f
9bf634f
d5dbce5
8e9ce27
e2b827d
f20c2a1
fa496fd
341d765
3a3fbf5
db2b4c6
527f0d2
4a09464
6ae951d
a5f7336
c3eebea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -162,8 +162,7 @@ auto main() -> int | |||||
CounterBasedRngKernel::Key key = {rd(), rd()}; | ||||||
|
||||||
// Allocate buffer on the accelerator | ||||||
using BufAcc = alpaka::Buf<Acc, Data, Dim, Idx>; | ||||||
BufAcc bufAcc(alpaka::allocBuf<Data, Idx>(devAcc, extent)); | ||||||
auto bufAcc(alpaka::allocBuf<Data, Idx>(devAcc, extent)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally, I prefer the syntax
Suggested change
It's just a preference, not a request to make any changes. |
||||||
|
||||||
// Create the kernel execution task. | ||||||
auto const taskKernelAcc = alpaka::createTaskKernel<Acc>( | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,11 @@ namespace alpaka::trait | |
{ | ||
}; | ||
|
||
struct MemVisibility<alpaka::AccCpuSerial<TDim, TIdx>> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like a copy paste error. |
||
{ | ||
using type = alpaka::MemVisibleGenericSycl; | ||
}; | ||
|
||
//! The SYCL accelerator device properties get trait specialization. | ||
template<template<typename, typename> typename TAcc, typename TDim, typename TIdx> | ||
struct GetAccDevProps< | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defining the buffer type looks ugly now. @chillenzer suggested to use a default template parameter:
typename TMeVisibility = alpaka::MemVisibilityTypeList<TDev>
. This is possible but this also means the default is, that the memory is only visible from the plattform of given device type.If we want to use for example manage memory, we still need to define the visibility manually. Also it could confuse, if the user defines the an alpaka buffer with default visibility as member variable and tries to use
alpakaMemMapped
for allocating the memory.