1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 14:58:01 +00:00
Commit Graph

270 Commits

Author SHA1 Message Date
Noel Maersk
e8978db55f kernel: slight refactor, add warnings about new kernels, and known limitations of zuikkis.
Limitations of alexkar* kernels are not known to me.

Closes https://github.com/veox/sgminer/issues/28
2014-01-23 20:08:29 +02:00
Noel Maersk
5f326d64f5 kernel: allow choosing Alexey Karimov's kernels.
Am I the only one who gets a segfault?..
2014-01-21 10:36:55 +02:00
Noel Maersk
7950c10374 kernel: integrate Zuikkis' kernel, selectable with --kernel=zuikkis.
Kernel ckolivas is still the default. Needs documentation, too.

https://github.com/veox/sgminer/issues/4
2014-01-20 23:38:39 +02:00
Noel Maersk
9d1db95a28 misc: move scrypt130511.cl kernel file to kernel/ckolivas.cl
Prepare for more kernels. :)

Get rid of the kernel date, since this fudges up commit history.

Named after Con Kolivas, the most recent committer.
2014-01-20 16:04:43 +02:00
Martin Danielsen
7aeae40af2 EXPERIMENTAL: A new way of setting intensity; introducing xintensity!
All of this is credited to ArGee of RGMiner, he did the initial ground work for this setting.

This new setting allows for a much finer grained intensity setting and also opens up for dual gpu threads on devices not previously able to. Note: make sure to use lower thread-concurrency values when you increase cpu threads.

Intensity is currently used to spawn GPU threads as a simple 2^value setting.
  I:13 =    8192 threads
  I:15 =   32768 threads
  I:17 =  131072 threads
  I:18 =  262144 threads
  I:19 =  524288 threads
  I:20 = 1048576 threads
Notice how the higher settings increase thread count tremendously.

Now enter the xintensity setting (Yes, I am a genius with my naming convention!).
It is simply a shader multiplier, obviously based on the amount of shaders you got on a card, this should allow the same value to scale with different card models.
   6970 with 1536 shaders: xI:64 = 98304 threads
R9 280X with 2048 shaders: xI:64 = 131072 threads
 R9 290 with 2560 shaders: xI:64 = 180224 threads
R9 290X with 2816 shaders: xI:64 = 163840 threads

   6970 with 1536 shaders: xI:300 = 460800 threads
R9 280X with 2048 shaders: xI:300 = 614400 threads
 R9 290 with 2560 shaders: xI:300 = 768000 threads
R9 290X with 2816 shaders: xI:300 = 844800 threads

It's now much easier to control thread intensity and it potentially allows for a uniform way of setting the intensity on your system. I'm very interested in constructive feedback, as I do not have access to a lot of different card models.

This change has been tested on 6970, R9 290, R9 290X - all with equal or a little better speeds than regular intensity setting after a little tuning, but your mileage may vary. Don't fret it, if this doesn't work for you, the regular intensity setting is still available.

Conflicts:
	driver-opencl.c
	sgminer.c
2014-01-18 21:11:31 +02:00
Noel Maersk
50066cf3c7 misc: Replace all remaining instances of 'cgminer' with 'sgminer'.
sed again.
2014-01-15 16:36:48 +02:00
Noel Maersk
199cb10e18 HAVE_OPENCL is mandatory, remove checks form code an build system. 2013-12-05 20:49:18 +02:00
Noel Maersk
95586f72f0 Squash-merge branch dead-end with unnecessary check removals. 2013-11-24 16:18:10 +02:00
Noel Maersk
d0070c0424 HARD RESET to: Remove Bitcoin detection code.
I'm pretty sure no one was working on this but me.

The code was unusable (gave 100% hardware errors) due to me not
testing it sufficiently. I hope this will not happen again.

ADL doesn't work for some reason, too.
2013-11-19 02:32:58 +02:00
Con Kolivas
578fabe07c Do not perform bfi int patching for opencl1.2 or later. 2013-10-12 16:54:39 +11:00
Con Kolivas
466d3beca0 Provide a --disable-libcurl config option to build support for stratum mining only. 2013-09-21 22:49:28 +10:00
Kano
383eeabc71 ocl.c fix applog warnings on windows 2013-06-16 18:39:09 +10:00
Con Kolivas
b196d4fa0c Support more shares to be returned for scrypt mining. 2013-05-11 16:19:02 +10:00
Kano
54d5d26095 ocl correct applog typing 2013-05-02 23:41:51 +10:00
Con Kolivas
2643ad1b22 Use only the one jump in ocl.c to bypass binary saves for osx opencl. 2013-04-25 00:16:09 +10:00
Con Kolivas
0a8f584909 Initialise variables not set on OSX in ocl.c. 2013-04-25 00:09:09 +10:00
Con Kolivas
9aae2256d3 Bypass attempting to read and save binary files on OSX to avoid crashes on >1 GPU. 2013-04-24 23:53:44 +10:00
Con Kolivas
57e5bfbb25 Set default ocl work size for scrypt to 256. 2013-04-21 09:36:49 +10:00
ckolivas
6ffba7e9d8 Convert error getting device IDs in ocl code to info log level only since multiple platforms may be installed and the error is harmless there. 2013-04-17 22:03:00 +10:00
ckolivas
a797898fc3 Unnecessary extra array in ocl code. 2013-04-17 22:01:38 +10:00
Kano
ed480de9c1 LTC text typo 2013-04-03 09:57:16 +11:00
Con Kolivas
132ee4c981 Do not scan other gpu platforms if one is specified. 2013-03-21 14:56:07 +11:00
Con Kolivas
584fc013ab Use a new algorithm for choosing a thread concurrency when none or no shader value is specified for scrypt. 2013-03-15 22:31:46 +11:00
Con Kolivas
d0f18e83ad Do not round up the bufsize to the maximum allocable with scrypt. 2013-03-15 22:00:52 +11:00
Con Kolivas
3c3fbdce1c Remove the rounding-up of the scrypt padbuffer which was not effectual and counter-productive on devices with lots of ram, limiting thread concurrencies and intensities. 2013-03-15 21:48:48 +11:00
Con Kolivas
1c6d8a36d8 bufsize is an unsigned integer, make it so for debug. 2013-03-15 19:43:38 +11:00
Con Kolivas
767d6df1a5 Whitelist AMD APP SDK 2.8 for diablo kernel. 2013-03-09 16:45:58 +11:00
Con Kolivas
87b62bde43 Cope with the highest opencl platform not having usable devices. 2013-03-09 16:19:00 +11:00
Con Kolivas
266d31271a Make the numbuf larger to accept larger scrypt parameters. 2013-02-10 15:07:49 +11:00
Con Kolivas
69494c12ed BeaverCreek doesn't like BFI INT patching. 2012-12-10 15:38:21 +11:00
Con Kolivas
25c39c96bb Ease the checking on allocation of padbuffer8 in the hope it works partially anyway on an apparently failed call. 2012-10-15 12:31:57 +11:00
Con Kolivas
cc3b693c6d Minor warning fixes. 2012-10-07 12:27:02 +11:00
Con Kolivas
40b747bae6 Put scrypt warning on separate line to avoid 0 being shown on windows as bufsize. 2012-10-07 10:08:45 +11:00
Con Kolivas
d91af893c8 Use correct sdk version detection for SDK 2.7 2012-08-28 18:08:39 +10:00
Con Kolivas
69983b778b Revert "Pick worksize 256 with Cypress if none is specified."
This reverts commit 482322a4b7.

Worksize 256 was only helpful on cypress with ultra-low memory speeds with old SDKs and the new kernels require higher memory clocks, having the opposite net effect.
2012-08-28 17:19:38 +10:00
Con Kolivas
4fbe5bed15 OpenCL 1.0 does not have native atomic_add and extremely slow support with atom_add so detect opencl1.0 and use a non-atomic workaround. 2012-08-23 23:25:32 +10:00
Con Kolivas
482322a4b7 Pick worksize 256 with Cypress if none is specified. 2012-08-23 12:47:28 +10:00
Con Kolivas
be06cf7083 Give warning with sdk2.7 and phatk as well. 2012-08-23 12:44:42 +10:00
Con Kolivas
cce19d9005 Whitelist sdk2.7 for diablo kernel as well. 2012-08-23 12:42:10 +10:00
Con Kolivas
fc44b6d7a1 Use different variables for command line specified lookup gap and thread concurrency to differentiate user defined versus auto chosen values. 2012-08-05 15:32:44 +10:00
Con Kolivas
97aa6ea492 Fix build error without scrypt enabled. 2012-07-29 19:13:45 +10:00
Con Kolivas
43752ee58c Limit thread concurrency for scrypt to 5xshaders if shaders is specified. 2012-07-26 16:12:45 +10:00
Con Kolivas
da1b996a39 Simplify repeated use of gpus[gpu]. in ocl.c 2012-07-26 16:10:21 +10:00
Con Kolivas
ea10b08dce Find the nearest power of 2 maximum alloc size for the scrypt buffer that can successfully be allocated and is large enough to accomodate the thread concurrency chosen, thus mapping it to an intensity. 2012-07-25 22:02:14 +10:00
Con Kolivas
9a6c082ad1 Make the thread concurrency and lookup gap options hidden on the command line and autotune parameters with a newly parsed --shaders option. 2012-07-24 20:27:37 +10:00
Con Kolivas
3a0d60cfe1 Always create the largest possible padbuffer for scrypt kernels even if not needed for thread_concurrency, giving us some headroom for intensity levels. 2012-07-23 21:30:30 +10:00
Con Kolivas
d8f81c18ee Use the detected maximum allocable memory on a GPU to determine the optimal scrypt settings when lookup_gap and thread_concurrency parameters are not given. 2012-07-23 17:51:57 +10:00
Con Kolivas
89eb1fa393 Check the maximum allocable memory size per opencl device. 2012-07-23 17:41:31 +10:00
Con Kolivas
5087ff9069 Add debugging output if buffer allocation fails for scrypt and round up bufsize to a multiple of 256. 2012-07-23 16:37:13 +10:00
Con Kolivas
1711b4eb77 Display size of scrypt buffer used in debug. 2012-07-22 00:58:09 +10:00
Con Kolivas
39f7d2fa74 Allow lookup gap and thread concurrency to be passed per device and store details in kernel binary filename. 2012-07-21 17:31:06 +10:00
Con Kolivas
7d53fba1ad Reinstate GPU only opencl device detection. 2012-07-21 02:49:50 +10:00
Con Kolivas
d13a3f1d50 Decrease lookup gap to 1. Does not seem to help in any way being 2. 2012-07-21 02:47:27 +10:00
Con Kolivas
d72add9af3 Send correct values to scrypt kernel to get it finally working. 2012-07-20 16:16:18 +10:00
Con Kolivas
3e61db105d Create command queue before compiling program in opencl. 2012-07-18 21:58:27 +10:00
Con Kolivas
471daecb5f Initialise mdplatform. 2012-07-16 20:15:27 +10:00
Con Kolivas
428d5e5d4d Limit scrypt to 1 vector. 2012-07-16 13:22:35 +10:00
Con Kolivas
a9a0bba18b Set the correct data for cldata and prepare for pad8 fixes. 2012-07-16 11:53:18 +10:00
Con Kolivas
04edf4bfa2 Temporarily set opencl to use all devices to allow debugging of scrypt kernel rapidly. 2012-07-15 13:40:56 +10:00
Con Kolivas
53e9c61c02 Find the gpu platform with the most devices and use that if no platform option is passed. 2012-07-15 13:40:11 +10:00
Con Kolivas
884f83f313 Allow more platforms to be probed if first does not return GPUs. 2012-07-15 13:31:03 +10:00
Con Kolivas
243d005b1b Set scrypt settings and buffer size in ocl.c code to be future modifiable. 2012-07-14 16:21:27 +10:00
Con Kolivas
aabc723326 Make sure goffset is set for scrypt and drop padbuffer8 to something manageable for now. 2012-07-14 00:30:25 +10:00
Con Kolivas
e0296c411b Set up buffer8 for scrypt. 2012-07-13 21:35:25 +10:00
Con Kolivas
0f43eb5eb7 Don't test nonce with sha and various fixes for scrypt. 2012-07-13 20:35:44 +10:00
Con Kolivas
b085c338f6 Make scrypt buffers and midstate compatible with cgminer. 2012-07-13 20:28:36 +10:00
Con Kolivas
dd740caa98 Provide initial support for the scrypt kernel to compile with and mine scrypt with the --scrypt option. 2012-07-13 19:02:43 +10:00
Philip Kaufmann
f479be0700 add goffset support for diakgcn with -v 1 and update kernel version 2012-04-27 09:58:30 +02:00
Con Kolivas
9a3ae2660e Add support for latest ATI SDK on windows. 2012-04-27 10:22:53 +10:00
Con Kolivas
bb31988347 Detect poorly performing combination of SDK and phatk kernel and add verbose warning at startup. 2012-04-25 11:41:35 +10:00
Con Kolivas
9175e4f25c Display all OpenCL devices when -n is called as well to allow debugging of differential mapping of OpenCL to ADL. 2012-04-23 17:56:31 +10:00
Con Kolivas
6274fbe727 Change the preferred vector width to 1 for Tahiti only, not all poclbm kernels. 2012-03-30 09:32:42 +11:00
Con Kolivas
621bcca7f5 Use global offset parameter to diablo and poclbm kernel ONLY for 1 vector kernels. 2012-03-27 22:58:46 +11:00
Con Kolivas
39395eb1e0 Use poclbm preferentially on Tahiti now regardless of SDK. 2012-03-27 22:58:46 +11:00
Con Kolivas
edb070c833 Fixes. 2012-02-24 14:14:05 +11:00
Con Kolivas
fb077c6d59 Pass vectors * worksize to kernel to avoid one op. 2012-02-24 14:14:04 +11:00
Con Kolivas
709c4cd8e1 Use diablo kernel on all future SDKs for Tahiti and set preferred vector width to 1 on poclbm kernel only. 2012-02-23 20:24:32 +11:00
ckolivas
dfcb98debf Use the SDK and hardware information to choose good performing default kernels. 2012-02-23 00:45:40 +11:00
ckolivas
d3ad87f5d2 Allow writing of multiple worksizes to the configuration file. 2012-02-22 20:13:23 +11:00
ckolivas
1b1fa5cd89 Allow writing of multiple vector sizes to the configuration file. 2012-02-22 20:08:29 +11:00
ckolivas
994cd77501 Allow writing of multiple kernels to the configuration file. 2012-02-22 20:01:09 +11:00
ckolivas
93efb726bb Allow multiple different kernels to be chosen per device. 2012-02-22 19:38:01 +11:00
ckolivas
a54f76061b Fix multiple work size entry. 2012-02-22 19:00:44 +11:00
Con Kolivas
26c59fbf0f Allow the worksize to be set per-device. 2012-02-22 16:59:28 +11:00
Con Kolivas
deff55c640 Allow different vectors to be set per device. 2012-02-22 16:54:06 +11:00
Con Kolivas
bf3a9f94f1 Unintentionally dropped the device name from the binary filenames. Reinstate. 2012-02-22 14:42:20 +11:00
Con Kolivas
5d23d70f68 As all kernels will be new versions it's an opportunity to change the .bin format and make it simpler. Specifying bitalign is redundant and long can be
l.
2012-02-22 14:14:26 +11:00
Con Kolivas
d1cddf8bad Update licensing to GPL V3. 2012-02-21 22:23:07 +11:00
Con Kolivas
00290a3e02 Select diablo kernel on all but GCN+SDK 2.6. 2012-02-21 21:48:10 +11:00
Con Kolivas
e9c3d7309a Tahiti prefers worksize 64 with poclbm. 2012-02-19 18:32:56 +11:00
Con Kolivas
30936f17e3 No need to expressly retain the opencl program now that the zero binary issue is fixed. 2012-02-18 23:28:41 +11:00
Con Kolivas
810ad04578 More copyright updates. 2012-02-18 23:16:08 +11:00
Con Kolivas
22d3034e10 Show error code on any opencl failure status. 2012-02-18 23:13:45 +11:00
Con Kolivas
be9db9ce63 Copyright updates. 2012-02-18 23:00:21 +11:00
Con Kolivas
0b6e35cda9 Add detection for version 898.1 SDK as well but only give SDK 2.6 warning once on startup instead of with each device initialisation. 2012-02-18 22:49:49 +11:00
Con Kolivas
67c4ada1b7 Provide warning on each startup about sdk 2.6 and decrease poclbm kernel selection to LOG_INFO. 2012-02-16 01:10:11 +11:00
Con Kolivas
b4c86ba615 Give SDK 2.6 warning only on building a kernel for !GCN bitalign devices. 2012-02-16 00:48:34 +11:00
Con Kolivas
728e3d4398 Revert "Automatically choose phatk kernel for bitalign non-gcn ATI cards, and then only select poclbm if SDK2.6 is detected."
This reverts commit e7fdadfc8f.

Broke kernel loading.
2012-02-16 00:45:08 +11:00
ckolivas
e7fdadfc8f Automatically choose phatk kernel for bitalign non-gcn ATI cards, and then only select poclbm if SDK2.6 is detected. 2012-02-15 14:52:29 +11:00
ckolivas
6a78594618 Make SDK 2.6 warning and advice big and bold. 2012-02-15 14:47:02 +11:00