This repository was archived by the owner on Jun 2, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed
Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,13 @@ static void global_init2(void)
222222 {
223223 if (p0.sub_type != p1.sub_type )
224224 {
225- if (p0_is_opencl_gpu)
225+
226+ if (!p0_is_opencl_gpu)
227+ {
228+ return false ;
229+ }
230+
231+ if (!p0_is_opencl_intel_gpu)
226232 {
227233 return true ;
228234 }
@@ -251,25 +257,19 @@ static void global_init2(void)
251257 return false ;
252258 }
253259
254- if (p0_is_opencl_intel_gpu)
260+ if (p0_is_opencl_intel_gpu && p1_host_avx )
255261 {
256- if (p1_host_avx)
257- {
258- return false ;
259- }
262+ return false ;
260263 }
261264
262- if (p1_is_opencl_intel_gpu)
265+ if (p1_is_opencl_intel_gpu && p0_host_avx )
263266 {
264- if (p0_host_avx)
265- {
266- return false ;
267- }
267+ return false ;
268268 }
269269
270270 if (p0_is_opencl_gpu)
271271 {
272- return true ;
272+ return true ;
273273 }
274274
275275 if (p1_is_opencl_gpu)
@@ -359,14 +359,15 @@ static int select_device(enum W2XConvGPUMode gpu)
359359 }
360360
361361 if (gpu == W2XCONV_GPU_AUTO)
362- {
362+ return 0 ;
363+ // {
363364 /* 1. CUDA
364- * 2. AMD GPU OpenCL
365+ * 2. AMD/NVIDIA GPU OpenCL
365366 * 3. FMA
366367 * 4. AVX
367368 * 5. Intel GPU OpenCL
368369 */
369-
370+ /*
370371 for (int i=0; i<n; i++)
371372 {
372373 if (processor_list[i].type == W2XCONV_PROC_CUDA)
@@ -377,7 +378,7 @@ static int select_device(enum W2XConvGPUMode gpu)
377378
378379 for (int i=0; i<n; i++)
379380 {
380- if ((processor_list[i].type == W2XCONV_PROC_OPENCL) && (processor_list[i].sub_type == W2XCONV_PROC_OPENCL_AMD_GPU))
381+ if ((processor_list[i].type == W2XCONV_PROC_OPENCL) && (( processor_list[i].sub_type == W2XCONV_PROC_OPENCL_AMD_GPU) || (processor_list[i].sub_type == W2XCONV_PROC_OPENCL_NVIDIA_GPU) ))
381382 {
382383 return i;
383384 }
@@ -398,6 +399,7 @@ static int select_device(enum W2XConvGPUMode gpu)
398399
399400 return host_proc;
400401 }
402+ */
401403
402404 /* (gpu == GPU_DISABLE) */
403405 for (int i=0 ; i<n; i++)
You can’t perform that action at this time.
0 commit comments