Use AR_WORK_SPACE/offload/ as base dir for offload temp files#1552
Merged
Use AR_WORK_SPACE/offload/ as base dir for offload temp files#1552
Conversation
OffloadManager previously wrote temp .pt files to /tmp. Redirect them to AR_WORK_SPACE/offload/ so they live alongside other workspace artifacts and respect the user-configured workspace path. Signed-off-by: yiliu7 <yi4.liu@intel.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: yiliu30 <yi4.liu@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Redirects OffloadManager’s temporary offload files from the system temp directory to a workspace-local directory so offload artifacts live alongside other AR_WORK_SPACE outputs.
Changes:
- Create
<AR_WORK_SPACE>/offload/and placeOffloadManagertemp directories under it viatempfile.mkdtemp(..., dir=base_dir). - Log the resulting workspace-based tempdir path for easier debugging/validation.
Contributor
|
Why not use output_dir and delete the offload directory after quantization? |
lvliang-intel
approved these changes
Mar 16, 2026
After removing the per-run temp subdirectory, also remove the parent ar_work_space/offload/ directory if it is empty. Uses os.rmdir which only succeeds on empty directories, so concurrent runs are safe. Signed-off-by: yiliu7 <yi4.liu@intel.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: yiliu30 <yi4.liu@intel.com>
Contributor
Author
output_dir is meant for final output, mixing temporary offload files into the user's output directory would be messy.
The |
wenhuach21
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OffloadManagertemp files from/tmp/toAR_WORK_SPACE/offload/so they live alongside other workspace artifacts and respect the user-configured workspace path.low_cpu_mem_usage=True, large.ptoffload files now go toar_work_space/offload/<prefix>_xxxx/by default (or a custom path ifAR_WORK_SPACEis set via environment variable).Test plan
pytest test/test_cpu/core/test_autoround.py -v— all relevant tests pass; log output confirmstempdir = .../ar_work_space/offload/compressor_...AR_WORK_SPACEenv var that offload files land in the expected location