@@ -564,6 +564,7 @@ char *set_intensity(char *arg)
564
564
tt = & gpus [device ].intensity ;
565
565
* tt = val ;
566
566
gpus [device ].xintensity = 0 ; // Disable shader based intensity
567
+ gpus [device ].rawintensity = 0 ; // Disable raw intensity
567
568
}
568
569
569
570
device ++ ;
@@ -580,6 +581,7 @@ char *set_intensity(char *arg)
580
581
tt = & gpus [device ].intensity ;
581
582
* tt = val ;
582
583
gpus [device ].xintensity = 0 ; // Disable shader based intensity
584
+ gpus [device ].rawintensity = 0 ; // Disable raw intensity
583
585
}
584
586
device ++ ;
585
587
}
@@ -588,6 +590,7 @@ char *set_intensity(char *arg)
588
590
gpus [i ].dynamic = gpus [0 ].dynamic ;
589
591
gpus [i ].intensity = gpus [0 ].intensity ;
590
592
gpus [i ].xintensity = 0 ; // Disable shader based intensity
593
+ gpus [i ].rawintensity = 0 ; // Disable raw intensity
591
594
}
592
595
}
593
596
@@ -604,10 +607,11 @@ char *set_xintensity(char *arg)
604
607
return "Invalid parameters for shader based intensity" ;
605
608
val = atoi (nextptr );
606
609
if (val < MIN_XINTENSITY || val > MAX_XINTENSITY )
607
- return "Invalid value passed to set shader intensity" ;
610
+ return "Invalid value passed to set shader-based intensity" ;
608
611
609
612
gpus [device ].dynamic = false; // Disable dynamic intensity
610
613
gpus [device ].intensity = 0 ; // Disable regular intensity
614
+ gpus [device ].rawintensity = 0 ; // Disable raw intensity
611
615
gpus [device ].xintensity = val ;
612
616
device ++ ;
613
617
@@ -617,13 +621,54 @@ char *set_xintensity(char *arg)
617
621
return "Invalid value passed to set shader based intensity" ;
618
622
gpus [device ].dynamic = false; // Disable dynamic intensity
619
623
gpus [device ].intensity = 0 ; // Disable regular intensity
624
+ gpus [device ].rawintensity = 0 ; // Disable raw intensity
620
625
gpus [device ].xintensity = val ;
621
626
device ++ ;
622
627
}
623
628
if (device == 1 )
624
629
for (i = device ; i < MAX_GPUDEVICES ; i ++ ) {
625
- gpus [i ].dynamic = gpus [0 ].dynamic ; // Disable dynamic intensity
626
- gpus [i ].intensity = gpus [0 ].intensity ; // Disable regular intensity
630
+ gpus [i ].dynamic = gpus [0 ].dynamic ;
631
+ gpus [i ].intensity = gpus [0 ].intensity ;
632
+ gpus [i ].rawintensity = gpus [0 ].rawintensity ;
633
+ gpus [i ].xintensity = gpus [0 ].xintensity ;
634
+ }
635
+
636
+ return NULL ;
637
+ }
638
+
639
+ char * set_rawintensity (char * arg )
640
+ {
641
+ int i , device = 0 , val = 0 ;
642
+ char * nextptr ;
643
+
644
+ nextptr = strtok (arg , "," );
645
+ if (nextptr == NULL )
646
+ return "Invalid parameters for raw intensity" ;
647
+ val = atoi (nextptr );
648
+ if (val < MIN_RAWINTENSITY || val > MAX_RAWINTENSITY )
649
+ return "Invalid value passed to set raw intensity" ;
650
+
651
+ gpus [device ].dynamic = false; // Disable dynamic intensity
652
+ gpus [device ].intensity = 0 ; // Disable regular intensity
653
+ gpus [device ].xintensity = 0 ; // Disable xintensity
654
+ gpus [device ].rawintensity = val ;
655
+ device ++ ;
656
+
657
+ while ((nextptr = strtok (NULL , "," )) != NULL ) {
658
+ val = atoi (nextptr );
659
+ if (val < MIN_RAWINTENSITY || val > MAX_RAWINTENSITY )
660
+ return "Invalid value passed to set raw intensity" ;
661
+ gpus [device ].dynamic = false; // Disable dynamic intensity
662
+ gpus [device ].intensity = 0 ; // Disable regular intensity
663
+ gpus [device ].xintensity = 0 ; // Disable xintensity
664
+ gpus [device ].rawintensity = val ;
665
+ device ++ ;
666
+ }
667
+ if (device == 1 )
668
+ for (i = device ; i < MAX_GPUDEVICES ; i ++ ) {
669
+ gpus [i ].dynamic = gpus [0 ].dynamic ;
670
+ gpus [i ].intensity = gpus [0 ].intensity ;
671
+ gpus [i ].rawintensity = gpus [0 ].rawintensity ;
627
672
gpus [i ].xintensity = gpus [0 ].xintensity ;
628
673
}
629
674
@@ -693,10 +738,10 @@ void manage_gpu(void)
693
738
mhash_base = false;
694
739
}
695
740
696
- wlog ("GPU %d: %.1f / %.1f %sh/s | A:%d R:%d HW:%d U:%.2f/m I:%d xI:%d\n" ,
741
+ wlog ("GPU %d: %.1f / %.1f %sh/s | A:%d R:%d HW:%d U:%.2f/m I:%d xI:%d rI:%d \n" ,
697
742
gpu , displayed_rolling , displayed_total , mhash_base ? "M" : "K" ,
698
743
cgpu -> accepted , cgpu -> rejected , cgpu -> hw_errors ,
699
- cgpu -> utility , cgpu -> intensity , cgpu -> xintensity );
744
+ cgpu -> utility , cgpu -> intensity , cgpu -> xintensity , cgpu -> rawintensity );
700
745
#ifdef HAVE_ADL
701
746
if (gpus [gpu ].has_adl ) {
702
747
int engineclock = 0 , memclock = 0 , activity = 0 , fanspeed = 0 , fanpercent = 0 , powertune = 0 ;
@@ -764,7 +809,7 @@ void manage_gpu(void)
764
809
wlog ("\n" );
765
810
}
766
811
767
- wlogprint ("[E]nable [D]isable [I]ntensity [x]Intensity [R]estart GPU %s\n" ,adl_active ? "[C]hange settings" : "" );
812
+ wlogprint ("[E]nable [D]isable [I]ntensity [x]Intensity R[a]w Intensity [R]estart GPU %s\n" ,adl_active ? "[C]hange settings" : "" );
768
813
769
814
wlogprint ("Or press any other key to continue\n" );
770
815
logwin_update ();
@@ -850,7 +895,8 @@ void manage_gpu(void)
850
895
}
851
896
gpus [selected ].dynamic = false;
852
897
gpus [selected ].intensity = intensity ;
853
- gpus [selected ].xintensity = 0 ; // disable
898
+ gpus [selected ].xintensity = 0 ; // Disable xintensity when enabling intensity
899
+ gpus [selected ].rawintensity = 0 ; // Disable raw intensity when enabling intensity
854
900
wlogprint ("Intensity on gpu %d set to %d\n" , selected , intensity );
855
901
pause_dynamic_threads (selected );
856
902
goto retry ;
@@ -877,11 +923,41 @@ void manage_gpu(void)
877
923
goto retry ;
878
924
}
879
925
gpus [selected ].dynamic = false;
880
- gpus [selected ].intensity = 0 ; // disable
926
+ gpus [selected ].intensity = 0 ; // Disable intensity when enabling xintensity
927
+ gpus [selected ].rawintensity = 0 ; // Disable raw intensity when enabling xintensity
881
928
gpus [selected ].xintensity = xintensity ;
882
929
wlogprint ("Experimental intensity on gpu %d set to %d\n" , selected , xintensity );
883
930
pause_dynamic_threads (selected );
884
931
goto retry ;
932
+ } else if (!strncasecmp (& input , "a" , 1 )) {
933
+ int rawintensity ;
934
+ char * intvar ;
935
+
936
+ if (selected )
937
+ selected = curses_int ("Select GPU to change raw intensity on" );
938
+ if (selected < 0 || selected >= nDevs ) {
939
+ wlogprint ("Invalid selection\n" );
940
+ goto retry ;
941
+ }
942
+
943
+ intvar = curses_input ("Set raw GPU scan intensity (" MIN_RAWINTENSITY_STR " -> " MAX_RAWINTENSITY_STR ")" );
944
+ if (!intvar ) {
945
+ wlogprint ("Invalid input\n" );
946
+ goto retry ;
947
+ }
948
+ rawintensity = atoi (intvar );
949
+ free (intvar );
950
+ if (rawintensity < MIN_RAWINTENSITY || rawintensity > MAX_RAWINTENSITY ) {
951
+ wlogprint ("Invalid selection\n" );
952
+ goto retry ;
953
+ }
954
+ gpus [selected ].dynamic = false;
955
+ gpus [selected ].intensity = 0 ; // Disable intensity when enabling raw intensity
956
+ gpus [selected ].xintensity = 0 ; // Disable xintensity when enabling raw intensity
957
+ gpus [selected ].rawintensity = rawintensity ;
958
+ wlogprint ("Raw intensity on gpu %d set to %d\n" , selected , rawintensity );
959
+ pause_dynamic_threads (selected );
960
+ goto retry ;
885
961
} else if (!strncasecmp (& input , "r" , 1 )) {
886
962
if (selected )
887
963
selected = curses_int ("Select GPU to attempt to restart" );
@@ -942,11 +1018,13 @@ static cl_int queue_scrypt_kernel(_clState *clState, dev_blk_ctx *blk, __maybe_u
942
1018
}
943
1019
944
1020
static void set_threads_hashes (unsigned int vectors , unsigned int compute_shaders , int64_t * hashes , size_t * globalThreads ,
945
- unsigned int minthreads , __maybe_unused int * intensity , __maybe_unused int * xintensity )
1021
+ unsigned int minthreads , __maybe_unused int * intensity , __maybe_unused int * xintensity , __maybe_unused int * rawintensity )
946
1022
{
947
1023
unsigned int threads = 0 ;
948
1024
while (threads < minthreads ) {
949
- if (* xintensity > 0 ) {
1025
+ if (* rawintensity > 0 ) {
1026
+ threads = * rawintensity ;
1027
+ } else if (* xintensity > 0 ) {
950
1028
threads = compute_shaders * * xintensity ;
951
1029
} else {
952
1030
threads = 1 << * intensity ;
@@ -1145,7 +1223,9 @@ static void get_opencl_statline_before(char *buf, size_t bufsiz, struct cgpu_inf
1145
1223
1146
1224
static void get_opencl_statline (char * buf , size_t bufsiz , struct cgpu_info * gpu )
1147
1225
{
1148
- if (gpu -> xintensity > 0 )
1226
+ if (gpu -> rawintensity > 0 )
1227
+ tailsprintf (buf , bufsiz , " rI:%3d" , gpu -> rawintensity );
1228
+ else if (gpu -> xintensity > 0 )
1149
1229
tailsprintf (buf , bufsiz , " xI:%3d" , gpu -> xintensity );
1150
1230
else
1151
1231
tailsprintf (buf , bufsiz , " I:%2d" , gpu -> intensity );
@@ -1314,7 +1394,7 @@ static int64_t opencl_scanhash(struct thr_info *thr, struct work *work,
1314
1394
gpu -> intervals = 0 ;
1315
1395
}
1316
1396
1317
- set_threads_hashes (clState -> vwidth , clState -> compute_shaders , & hashes , globalThreads , localThreads [0 ], & gpu -> intensity , & gpu -> xintensity );
1397
+ set_threads_hashes (clState -> vwidth , clState -> compute_shaders , & hashes , globalThreads , localThreads [0 ], & gpu -> intensity , & gpu -> xintensity , & gpu -> rawintensity );
1318
1398
if (hashes > gpu -> max_hashes )
1319
1399
gpu -> max_hashes = hashes ;
1320
1400
0 commit comments