@@ -153,7 +153,8 @@ cpdef get_max_threads():
153
153
154
154
cpdef domain_get_max_threads(domain = ' all' ):
155
155
"""
156
- Gets the number of OpenMP* threads targeted for parallelism for a particular function domain.
156
+ Gets the number of OpenMP* threads targeted for parallelism for a particular
157
+ function domain.
157
158
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-domain-get-max-threads
158
159
"""
159
160
cdef int c_mkl_domain = __domain_to_mkl_domain(domain)
@@ -162,12 +163,47 @@ cpdef domain_get_max_threads(domain='all'):
162
163
163
164
cpdef get_dynamic():
164
165
"""
165
- Determines whether Intel(R) MKL is enabled to dynamically change the number of OpenMP* threads.
166
+ Determines whether Intel(R) MKL is enabled to dynamically change the number
167
+ of OpenMP* threads.
166
168
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-dynamic
167
169
"""
168
170
return bool (__get_dynamic())
169
171
170
172
173
+ cpdef int set_num_stripes(int num_stripes):
174
+ """
175
+ Specifies the number of stripes, or partitions along the leading dimension
176
+ of the output matrix, for the parallel ``?gemm`` functions.
177
+
178
+ Setting `num_stripes` argument to zero instructs Intel(R) MKL to default
179
+ partitioning algorithm. A positive `num_stripes` arguments specifies a hint,
180
+ and the library may actually use a smaller numbers.
181
+
182
+ Returns the number of stripes the library uses, or a zero.
183
+ """
184
+ if num_stripes < 0 :
185
+ raise ValueError (
186
+ " Expected non-negative number of stripes"
187
+ " , got {}" .format(num_stripes)
188
+ )
189
+ mkl.mkl_set_num_stripes(num_stripes)
190
+ return mkl.mkl_get_num_stripes()
191
+
192
+
193
+ cpdef int get_num_stripes():
194
+ """
195
+ Returns the number of stripes, or partitions along the leading dimension
196
+ of the output matrix, for the parallel ``?gemm`` functions.
197
+
198
+ Non-positive returned value indicates Intel(R) MKL uses default partitioning
199
+ algorithm.
200
+
201
+ Positive returned value is a hint, and the library may actually use a
202
+ smaller number.
203
+ """
204
+ return mkl.mkl_get_num_stripes()
205
+
206
+
171
207
# Timing
172
208
cpdef second():
173
209
"""
@@ -759,13 +795,20 @@ cdef object __cbwr_get_auto_branch():
759
795
cdef object __enable_instructions(isa = None ):
760
796
"""
761
797
Enables dispatching for new Intel architectures or restricts the set of Intel instruction sets available for dispatching.
798
+
762
799
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-enable-instructions
763
800
"""
764
801
__variables = {
765
802
' input' : {
803
+ ' single_path' : mkl.MKL_SINGLE_PATH_ENABLE,
804
+ ' avx512_e4' : mkl.MKL_ENABLE_AVX512_E4,
805
+ ' avx512_e3' : mkl.MKL_ENABLE_AVX512_E3,
806
+ ' avx512_e2' : mkl.MKL_ENABLE_AVX512_E2,
807
+ ' avx512_e1' : mkl.MKL_ENABLE_AVX512_E1,
766
808
' avx512_mic_e1' : mkl.MKL_ENABLE_AVX512_MIC_E1,
767
809
' avx512' : mkl.MKL_ENABLE_AVX512,
768
810
' avx512_mic' : mkl.MKL_ENABLE_AVX512_MIC,
811
+ ' avx2_e1' : mkl.MKL_ENABLE_AVX2_E1,
769
812
' avx2' : mkl.MKL_ENABLE_AVX2,
770
813
' avx' : mkl.MKL_ENABLE_AVX,
771
814
' sse4_2' : mkl.MKL_ENABLE_SSE4_2,
0 commit comments