Parent issue: #1673
Goal
Apply consistent import ordering and evaluate external dependency usage across all examples.
Current state
- At least 5 different import ordering patterns exist across the 11 cuda.core examples.
- Some start with
sys, some have no stdlib imports, some use try/except for optional deps inline.
- No consistent grouping (stdlib → third-party → cuda).
- CuPy is required by 7 of 11 cuda.core examples.
- Only
show_device_properties.py has zero external dependencies.
- Optional dependency handling (try/except) is inconsistent.
Decisions needed
- What import group ordering should examples follow (e.g., stdlib → third-party → cuda)?
- Should we reduce CuPy dependency where possible (e.g., use NumPy + manual device allocation)?
- What is the standard pattern for optional dependency handling (try/except with skip vs hard fail)?
Files affected
All 25 example files listed in #1673.
Parent issue: #1673
Goal
Apply consistent import ordering and evaluate external dependency usage across all examples.
Current state
sys, some have no stdlib imports, some use try/except for optional deps inline.show_device_properties.pyhas zero external dependencies.Decisions needed
Files affected
All 25 example files listed in #1673.