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] Remove deprecated compile option ndarray_use_cached_allocator #7937

Merged
merged 1 commit into from
May 8, 2023

Conversation

jim19930609
Copy link
Contributor

@jim19930609 jim19930609 commented May 6, 2023

Issue: #

Brief Summary

🤖 Generated by Copilot at b10a055

Removed the use_cached flag and related parameters from various classes and functions that handle memory allocation for different devices. This flag was unnecessary and redundant, as all devices now use a caching allocator by default. This simplifies the code and reduces the complexity of the memory management logic.

Walkthrough

🤖 Generated by Copilot at b10a055

  • Remove ndarray_use_cached_allocator flag and simplify memory allocation logic for different devices
  • Eliminate ndarray_use_cached_allocator field from CompileConfig struct and class (link, link, link)
  • Remove use_cached parameter and field from allocate_memory_runtime function and DeviceAllocation struct in CUDADevice and AMDGPUDevice classes (link, link, link, link)
  • Remove use_cached parameter from allocate_memory function in LlvmRuntime class and allocate_memory_runtime function call in allocate_memory_ndarray function (link, link)
  • Remove use_cached field from LlvmDevice class (link)
  • Remove ndarray_use_cached_allocator parameter from test decorator in test_ndarray_caching_allocator function in test_ndarray.py (link)

@netlify
Copy link

netlify bot commented May 6, 2023

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit b10a055
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/6455e49cfb0f680008e2e225

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.

LGTM!

taichi/rhi/amdgpu/amdgpu_device.cpp Show resolved Hide resolved
@jim19930609 jim19930609 requested a review from ailzhang May 8, 2023 02:36
@jim19930609 jim19930609 merged commit 8934a39 into taichi-dev:master May 8, 2023
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…aichi-dev#7937)

Issue: #

### Brief Summary

<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at b10a055</samp>

Removed the `use_cached` flag and related parameters from various
classes and functions that handle memory allocation for different
devices. This flag was unnecessary and redundant, as all devices now use
a caching allocator by default. This simplifies the code and reduces the
complexity of the memory management logic.

### Walkthrough

<!--
copilot:walkthrough
-->
### <samp>🤖 Generated by Copilot at b10a055</samp>

* Remove `ndarray_use_cached_allocator` flag and simplify memory
allocation logic for different devices
* Eliminate `ndarray_use_cached_allocator` field from `CompileConfig`
struct and class
([link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-84b498f7923f43bc9e292dffb7b3d9a0cb7da1c16ddd0062af184a1b7b777976L45),
[link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-604e33db5b7c4f4b819098dee1f2634a36c0974822c1538aec0d57d28ca00dd9L40),
[link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-af631a0c71978fe591e17005f01f7c06bc30ae36c65df306bbb3b08ade770167L196-L197))
* Remove `use_cached` parameter and field from `allocate_memory_runtime`
function and `DeviceAllocation` struct in `CUDADevice` and
`AMDGPUDevice` classes
([link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-e0843d34a17298595cd26f5b47b1933a0d18c5c795b0c91b73ec8541a2cdd3f9L59-R59),
[link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-e0843d34a17298595cd26f5b47b1933a0d18c5c795b0c91b73ec8541a2cdd3f9L65-R67),
[link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-7919f5d7e33aafc72f27ed93febc58a0ac77c220ae718bf78ef134dad3790654L54-R54),
[link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-7919f5d7e33aafc72f27ed93febc58a0ac77c220ae718bf78ef134dad3790654L61-R63))
* Remove `use_cached` parameter from `allocate_memory` function in
`LlvmRuntime` class and `allocate_memory_runtime` function call in
`allocate_memory_ndarray` function
([link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-10c4f36944f322074d4a7f5e6d1878ada018992f7c965f6944c60d4468f7719dL55-R61),
[link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-b9155792159f392bd8bacd44cb1819be5239b022d707499fc364c0f93dd8c5e5L478))
* Remove `use_cached` field from `LlvmDevice` class
([link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-96f2f848955ca34e50c83bdaa4b970cd7d60ac595e924f626c4568a03a43658eL13))
* Remove `ndarray_use_cached_allocator` parameter from `test` decorator
in `test_ndarray_caching_allocator` function in `test_ndarray.py`
([link](https://github.com/taichi-dev/taichi/pull/7937/files?diff=unified&w=0#diff-ca3c8d1edb25b6a7f4affbb79b2e3e74f73b3757e5d465258ce42ea9eb09fbc0L281-R281))
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