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

[Lang] Cuda caching allocator for ndarray 1/n #3581

Merged
merged 31 commits into from
Nov 30, 2021

Conversation

qiao-bo
Copy link
Collaborator

@qiao-bo qiao-bo commented Nov 22, 2021

Related issue = #3634
This is the first step towards ndarray memory recycling. We add a simple caching mechanism to reuse CUDA buffers of same size.

@netlify
Copy link

netlify bot commented Nov 22, 2021

✔️ Deploy Preview for jovial-fermat-aa59dc canceled.

🔨 Explore the source changes: a302510

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/61a582b5ecac5a0007a2f8da

@qiao-bo
Copy link
Collaborator Author

qiao-bo commented Nov 22, 2021

/format

taichi/program/ndarray.cpp Outdated Show resolved Hide resolved
python/taichi/lang/_ndarray.py Outdated Show resolved Hide resolved
taichi/backends/cuda/cuda_device.cpp Outdated Show resolved Hide resolved
@qiao-bo
Copy link
Collaborator Author

qiao-bo commented Nov 24, 2021

/format

@qiao-bo
Copy link
Collaborator Author

qiao-bo commented Nov 24, 2021

/format

@qiao-bo
Copy link
Collaborator Author

qiao-bo commented Nov 25, 2021

/format

@qiao-bo
Copy link
Collaborator Author

qiao-bo commented Nov 25, 2021

/format

@qiao-bo qiao-bo marked this pull request as ready for review November 26, 2021 01:45
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

Thanks! I have a few nits

taichi/backends/cpu/cpu_device.cpp Outdated Show resolved Hide resolved
taichi/backends/device.h Outdated Show resolved Hide resolved
taichi/backends/device.h Outdated Show resolved Hide resolved
taichi/backends/cuda/cuda_caching_allocator.h Show resolved Hide resolved
taichi/program/compile_config.h Show resolved Hide resolved
qiao-bo and others added 3 commits November 26, 2021 12:45
@qiao-bo
Copy link
Collaborator Author

qiao-bo commented Nov 26, 2021

/format

@qiao-bo qiao-bo requested a review from k-ye November 26, 2021 05:26
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

LGTM!

taichi/backends/cuda/cuda_caching_allocator.h Outdated Show resolved Hide resolved
Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Nice work!

taichi/program/ndarray.h Outdated Show resolved Hide resolved
taichi/program/ndarray.cpp Outdated Show resolved Hide resolved
taichi/llvm/llvm_program.cpp Outdated Show resolved Hide resolved
taichi/backends/cuda/cuda_device.h Show resolved Hide resolved
taichi/backends/cuda/cuda_device.h Show resolved Hide resolved
taichi/program/compile_config.h Show resolved Hide resolved
taichi/backends/cuda/cuda_caching_allocator.cpp Outdated Show resolved Hide resolved
@qiao-bo
Copy link
Collaborator Author

qiao-bo commented Nov 30, 2021

/format

@qiao-bo qiao-bo merged commit d9836ee into taichi-dev:master Nov 30, 2021
@qiao-bo qiao-bo deleted the recycle branch November 30, 2021 03:18
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.

4 participants