Skip to content
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

behavior of global and constant device memory changed in develop branch #2305

Open
psychocoderHPC opened this issue Jun 28, 2024 · 4 comments
Labels
Milestone

Comments

@psychocoderHPC
Copy link
Member

With #2242 we changed the behavior of global and constant device memory.

The new macro ALPAKA_STATIC_ACC_MEM_GLOBAL contains now a template ACC, therefore we will get a unique type definition for each accelerator.
A 1 dimensional acc has no access to the device global variable of the 2 dimensional acc. This was not the case in older alpaka versions.

This behavior change is most likely very easy to fix by adding a method to get the reference to the global memory. This method should use the device type derived from the accelerator to get the global memory. In this case all CPU accelerators will have access to the same memory address.

I marked this behavior change as bug and will try to address this issue after my vacations.

ping @AuroraPerego only that you know about it.

@psychocoderHPC psychocoderHPC added this to the 1.2.0 milestone Jun 28, 2024
@fwyzard
Copy link
Contributor

fwyzard commented Jun 28, 2024

Can we change the code to use the Tag as template argument ?

@AuroraPerego
Copy link
Contributor

The DevGlobal internally is already templated on the Tag and there is a map from Acc to Tag here.

I don't remember why we are passing the Acc and not the Tag, but it may be related to this.

@psychocoderHPC
Copy link
Member Author

Can we change the code to use the Tag as template argument ?

I am not sure if Tag or ´DevecieTypeis better. With one eye already looking to managed memory or system wide availbable memory I would say we should useDeviceType`

@fwyzard
Copy link
Contributor

fwyzard commented Jul 1, 2024

What do you mean by DeviceType ?
Like DevCpu vs DevCudaRt ?

Are global variables implemented in the same way for all the accelerators that use the DevCpu device type ?

@psychocoderHPC psychocoderHPC modified the milestones: 1.2.0, 2.0.0 Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants