@@ -153,7 +153,8 @@ cpdef get_max_threads():
153153
154154cpdef domain_get_max_threads(domain = ' all' ):
155155 """
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.
157158 https://software.intel.com/en-us/mkl-developer-reference-c-mkl-domain-get-max-threads
158159 """
159160 cdef int c_mkl_domain = __domain_to_mkl_domain(domain)
@@ -162,12 +163,47 @@ cpdef domain_get_max_threads(domain='all'):
162163
163164cpdef get_dynamic():
164165 """
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.
166168 https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-dynamic
167169 """
168170 return bool (__get_dynamic())
169171
170172
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+
171207# Timing
172208cpdef second():
173209 """
@@ -759,13 +795,20 @@ cdef object __cbwr_get_auto_branch():
759795cdef object __enable_instructions(isa = None ):
760796 """
761797 Enables dispatching for new Intel architectures or restricts the set of Intel instruction sets available for dispatching.
798+
762799 https://software.intel.com/en-us/mkl-developer-reference-c-mkl-enable-instructions
763800 """
764801 __variables = {
765802 ' 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,
766808 ' avx512_mic_e1' : mkl.MKL_ENABLE_AVX512_MIC_E1,
767809 ' avx512' : mkl.MKL_ENABLE_AVX512,
768810 ' avx512_mic' : mkl.MKL_ENABLE_AVX512_MIC,
811+ ' avx2_e1' : mkl.MKL_ENABLE_AVX2_E1,
769812 ' avx2' : mkl.MKL_ENABLE_AVX2,
770813 ' avx' : mkl.MKL_ENABLE_AVX,
771814 ' sse4_2' : mkl.MKL_ENABLE_SSE4_2,
0 commit comments