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

Only allocate tempStorage once #3

Closed
wants to merge 1 commit into from

Conversation

riking
Copy link
Contributor

@riking riking commented Apr 15, 2020

While loading seeds into memory for the GPU to use, realloc() was called multiple times resulting in a lot of copying.

While loading seeds into memory for the GPU to use, realloc() was called multiple times resulting in a lot of copying.
arraySize=0;
arraySize = 0;
for(int gpu_index = 0; gpu_index < GPU_COUNT; gpu_index++) {
arraySize += *nodes[gpu_index].num_seeds;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

broken, this needs the Synchronize moved above it

@riking riking closed this Apr 15, 2020
@riking
Copy link
Contributor Author

riking commented Apr 15, 2020

merged into #4

@riking
Copy link
Contributor Author

riking commented Apr 15, 2020

Pulling out of #4 and putting on hold until #1 is merged.

@riking riking reopened this Apr 15, 2020
@riking riking marked this pull request as draft April 15, 2020 04:31
@hube12
Copy link
Member

hube12 commented Apr 15, 2020

uh wtf, the seeds returned by the gpu aren't constant at all accross runs

@hube12
Copy link
Member

hube12 commented Apr 15, 2020

we can for sure have a upper bound for the array but that array would be way too large

@riking
Copy link
Contributor Author

riking commented Apr 15, 2020

The number to allocate for each run is calculated after the GPUs are done.

@riking riking closed this Dec 22, 2020
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.

2 participants