-
Notifications
You must be signed in to change notification settings - Fork 248
Open
Labels
cuda.coreEverything related to the cuda.core moduleEverything related to the cuda.core moduletriageNeeds the team's attentionNeeds the team's attention
Description
Parent issue: #1673
Goal
Decide on and apply a consistent resource cleanup policy across all examples.
Current state
- Most examples do NOT close streams or buffers explicitly.
- Only
saxpy.pyandmemory_ops.pydemonstrate explicitclose()calls. strided_memory_view_gpu.pyuses afinallyblock for cleanup, others don't.- No examples use context managers for resource management.
Decisions needed
- Should examples demonstrate explicit
close()calls as best practice? - Should examples use context managers (if the API supports them)?
- Should examples use
try/finallyblocks for cleanup? - Is it acceptable for simple examples to rely on process exit for cleanup?
Files affected
All 25 example files listed in #1673.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cuda.coreEverything related to the cuda.core moduleEverything related to the cuda.core moduletriageNeeds the team's attentionNeeds the team's attention