Skip to content

Clean up cffi resources in file #679

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

Merged

Conversation

oleksandr-pavlyk
Copy link
Contributor

Description

closes gh-535

This PR removes fixture clean_up_cffi_files and add logic for examples/strided_memory_view.py to create temporary directory, compile CPU extension in it, import, execute, and clean-up artifacts and the temporary directory in the example.

Furthermore, GPU example is modified to make sure that stream is closed even if error occurred during GPU example execution.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Copy link
Contributor

copy-pr-bot bot commented Jun 4, 2025

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@oleksandr-pavlyk oleksandr-pavlyk requested review from rwgk and leofang and removed request for rwgk June 4, 2025 17:28
@oleksandr-pavlyk
Copy link
Contributor Author

/ok to test

@leofang leofang added P1 Medium priority - Should do test Improvements or additions to tests cuda.core Everything related to the cuda.core module labels Jun 4, 2025
@leofang leofang added this to the cuda.core beta 4 milestone Jun 4, 2025

This comment has been minimized.

@leofang leofang added this to CCCL Jun 4, 2025
@github-project-automation github-project-automation bot moved this to Todo in CCCL Jun 4, 2025
Make sure to del cpu_func and my_func that references it.
@oleksandr-pavlyk
Copy link
Contributor Author

/ok to test

Copy link
Member

@leofang leofang left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the temporary file issue and cleaning up the example!

@github-project-automation github-project-automation bot moved this from Todo to In Review in CCCL Jun 5, 2025
@leofang leofang merged commit 6c8ab73 into NVIDIA:main Jun 5, 2025
53 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Jun 5, 2025
Copy link

github-actions bot commented Jun 5, 2025

Doc Preview CI
Preview removed because the pull request was closed or merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.core Everything related to the cuda.core module P1 Medium priority - Should do test Improvements or additions to tests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

os.remove on Windows could fail if files are still in use
2 participants