@@ -331,6 +331,12 @@ class MinerCLI
331
331
332
332
#if ETH_ETHASHCL
333
333
334
+ app.add_option (" --cl-kernel" , m_clKernel,
335
+ " Ignored parameter. Kernel is auto-selected." , true )
336
+ ->group (OpenCLGroup)
337
+ ->check (CLI::Range (2 ));
338
+
339
+
334
340
app.add_option (" --opencl-platform" , m_openclPlatform,
335
341
" Use OpenCL platform n" , true )
336
342
->group (OpenCLGroup);
@@ -340,27 +346,21 @@ class MinerCLI
340
346
->group (OpenCLGroup);
341
347
342
348
app.add_set (" --cl-parallel-hash" , m_openclThreadsPerHash, {1 , 2 , 4 , 8 },
343
- " Set the number of threads per hash " , true )
349
+ " ignored parameter " , true )
344
350
->group (OpenCLGroup);
345
351
346
- app.add_option (" --cl-kernel" , m_openclSelectedKernel,
347
- " Select kernel. 0 stable kernel, 1 experimental kernel, 2 binary kernel" , true )
348
- ->group (OpenCLGroup)
349
- ->check (CLI::Range (2 ));
350
-
351
352
app.add_option (" --cl-iterations" , m_openclIterations,
352
353
" Number of outer iterations to perform before enqeueing on a new nonce" , true )
353
354
->group (OpenCLGroup)
354
355
->check (CLI::Range (1 ,99999 ));
355
356
356
357
app.add_option (" --cl-global-work" , m_globalWorkSizeMultiplier,
357
- " Set the global work size multipler. Specify negative value for automatic scaling based on # of compute units " , true )
358
+ " Set the global work size multipler." , true )
358
359
->group (OpenCLGroup);
359
360
360
- app.add_option (" --cl-local-work" , m_localWorkSize,
361
+ app.add_set (" --cl-local-work" , m_localWorkSize, { 64 , 128 , 192 , 256 } ,
361
362
" Set the local work size" , true )
362
- ->group (OpenCLGroup)
363
- ->check (CLI::Range (64 , 256 ));
363
+ ->group (OpenCLGroup);
364
364
365
365
#endif
366
366
@@ -564,14 +564,6 @@ class MinerCLI
564
564
}
565
565
566
566
#if ETH_ETHASHCL
567
- if ((m_localWorkSize != 64 ) &&
568
- (m_localWorkSize != 128 ) &&
569
- (m_localWorkSize != 192 ) &&
570
- (m_localWorkSize != 256 ))
571
- {
572
- cerr << endl << " opencl local work must be 64, 128, 192 or 256." << " \n\n " ;
573
- exit (-1 );
574
- }
575
567
m_openclDeviceCount = m_openclDevices.size ();
576
568
#endif
577
569
@@ -629,7 +621,6 @@ class MinerCLI
629
621
m_miningThreads = m_openclDeviceCount;
630
622
}
631
623
632
- CLMiner::setCLKernel (m_openclSelectedKernel);
633
624
CLMiner::setNumberIterations (m_openclIterations);
634
625
CLMiner::setThreadsPerHash (m_openclThreadsPerHash);
635
626
@@ -641,7 +632,8 @@ class MinerCLI
641
632
m_dagLoadMode,
642
633
m_dagCreateDevice,
643
634
m_noEval,
644
- m_exit
635
+ m_exit,
636
+ m_clKernel
645
637
)) {
646
638
stop_io_service ();
647
639
exit (1 );
@@ -904,13 +896,13 @@ class MinerCLI
904
896
unsigned m_miningThreads = UINT_MAX;
905
897
bool m_shouldListDevices = false ;
906
898
#if ETH_ETHASHCL
907
- unsigned m_openclSelectedKernel = 0 ; // /< A numeric value for the selected OpenCL kernel
908
899
unsigned m_openclIterations = 1 ; // /< A numeric value for the number of iterations
909
900
unsigned m_openclDeviceCount = 0 ;
910
901
vector<unsigned > m_openclDevices;
911
- unsigned m_openclThreadsPerHash = 8 ;
912
- int m_globalWorkSizeMultiplier = CLMiner::c_defaultGlobalWorkSizeMultiplier;
902
+ int m_openclThreadsPerHash = - 1 ;
903
+ unsigned m_globalWorkSizeMultiplier = CLMiner::c_defaultGlobalWorkSizeMultiplier;
913
904
unsigned m_localWorkSize = CLMiner::c_defaultLocalWorkSize;
905
+ int m_clKernel = -1 ;
914
906
#endif
915
907
#if ETH_ETHASHCUDA
916
908
unsigned m_cudaDeviceCount = 0 ;
0 commit comments