context
This directory focuses on Context creation, switching, binding, and destruction, as well as context usage patterns in multi-thread scenarios.
Sample List
- 0_context_query: Queries the current Context, default Stream, and current thread resource limits.
- 1_context_scoped_determinism: Observes the default Context state and verifies that deterministic computation settings remain isolated between two Contexts.
Recommendations
- Typical usage of
aclrtCreateContext,aclrtSetCurrentContext,aclrtDestroyContext, and other interfaces. - Relationship between Device and Context.
- Context isolation and reuse in multi-thread scenarios.
References
- ../device/: Device initialization and switching.
- ../stream/: Relationship between stream and context.