1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[PR #32] [MERGED] Use PYTORCH_ALLOC_CONF instead of deprecated PYTORCH_CUDA_ALLOC_CONF #246

Closed
opened 2026-11-01 04:19:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/p-e-w/heretic/pull/32
Author: @kldzj
Created: 11/20/2025
Status: ✅ Merged
Merged: 11/21/2025
Merged by: @p-e-w

Base: master ← Head: pytorch-deprecation-warning


📝 Commits (2)

  • 0fd42ec Use PYTORCH_ALLOC_CONF instead of deprecated PYTORCH_CUDA_ALLOC_CONF
  • e1a3b6d style: reformat environment variable check

📊 Changes

1 file changed (+5 additions, -2 deletions)

View changed files

📝 src/heretic/main.py (+5 -2)

📄 Description

Problem

With #17 I introduced setting PYTORCH_CUDA_ALLOC_CONF to expandable_segments:True to reduce memory fragmentation for the model. Even though PyTorch docs sometimes still mention PYTORCH_CUDA_ALLOC_CONF, during runtime we get a deprecation warning.

[W1120 14:44:07.101109672 AllocatorConfig.cpp:28] Warning: PYTORCH_CUDA_ALLOC_CONF is deprecated, use PYTORCH_ALLOC_CONF instead

Solution

Use PYTORCH_ALLOC_CONF instead of PYTORCH_CUDA_ALLOC_CONF.

Result

Suppression of the deprecation warning.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/p-e-w/heretic/pull/32 **Author:** [@kldzj](https://github.com/kldzj) **Created:** 11/20/2025 **Status:** ✅ Merged **Merged:** 11/21/2025 **Merged by:** [@p-e-w](https://github.com/p-e-w) **Base:** `master` ← **Head:** `pytorch-deprecation-warning` --- ### 📝 Commits (2) - [`0fd42ec`](https://github.com/p-e-w/heretic/commit/0fd42ece420b6bcf32d6a52ffee4ebc6bb1a8d5a) Use `PYTORCH_ALLOC_CONF` instead of deprecated `PYTORCH_CUDA_ALLOC_CONF` - [`e1a3b6d`](https://github.com/p-e-w/heretic/commit/e1a3b6dc2d4a6e776ed0c9c1ce7bf324e9a8e941) style: reformat environment variable check ### 📊 Changes **1 file changed** (+5 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/heretic/main.py` (+5 -2) </details> ### 📄 Description ## Problem With #17 I introduced setting `PYTORCH_CUDA_ALLOC_CONF` to `expandable_segments:True` to reduce memory fragmentation for the model. Even though PyTorch docs sometimes still mention `PYTORCH_CUDA_ALLOC_CONF`, during runtime we get a deprecation warning. ``` [W1120 14:44:07.101109672 AllocatorConfig.cpp:28] Warning: PYTORCH_CUDA_ALLOC_CONF is deprecated, use PYTORCH_ALLOC_CONF instead ``` ## Solution Use `PYTORCH_ALLOC_CONF` instead of `PYTORCH_CUDA_ALLOC_CONF`. ## Result Suppression of the deprecation warning. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 04:19:11 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#246
No description provided.