@@ -109,54 +109,46 @@ cdef class Stream:
109109 @classmethod
110110 def legacy_default (cls ):
111111 """ Return the legacy default stream.
112-
113- The legacy default stream is an implicit stream which synchronizes
114- with all other streams in the same CUDA context except for non-blocking
115- streams. When any operation is launched on the legacy default stream,
116- it waits for all previously launched operations in blocking streams to
117- complete, and all subsequent operations in blocking streams wait for
112+
113+ The legacy default stream is an implicit stream which synchronizes
114+ with all other streams in the same CUDA context except for non-blocking
115+ streams. When any operation is launched on the legacy default stream,
116+ it waits for all previously launched operations in blocking streams to
117+ complete, and all subsequent operations in blocking streams wait for
118118 the legacy default stream operation to complete.
119-
119+
120120 Returns
121121 -------
122122 Stream
123123 The legacy default stream instance for the current context.
124-
124+
125125 See Also
126126 --------
127127 per_thread_default : Per-thread default stream alternative.
128-
129- Examples
130- --------
131- >>> stream = Stream.legacy_default()
132- >>> stream.sync() # Synchronize all operations
128+
133129 """
134130 return Stream._from_handle(cls , get_legacy_stream())
135131
136132 @classmethod
137133 def per_thread_default (cls ):
138134 """ Return the per-thread default stream.
139-
140- The per-thread default stream is local to both the calling thread and
141- the CUDA context. Unlike the legacy default stream, it does not
142- synchronize with other streams and behaves like an explicitly created
143- non-blocking stream. This allows for better concurrency in multi-threaded
135+
136+ The per-thread default stream is local to both the calling thread and
137+ the CUDA context. Unlike the legacy default stream, it does not
138+ synchronize with other streams and behaves like an explicitly created
139+ non-blocking stream. This allows for better concurrency in multi-threaded
144140 applications.
145-
141+
146142 Returns
147143 -------
148144 Stream
149- The per-thread default stream instance for the current thread
145+ The per-thread default stream instance for the current thread
150146 and context.
151-
147+
152148 See Also
153149 --------
154150 legacy_default : Legacy default stream alternative.
155-
156- Examples
157- --------
158- >>> stream = Stream.per_thread_default()
159- >>> stream.sync() # Synchronize only this thread's operations
151+
160152 """
161153 return Stream._from_handle(cls , get_per_thread_stream())
162154
0 commit comments