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

138 Commits

Author SHA1 Message Date
Noel Maersk
bc9b313e9c opencl: check if gpus.kernelname has to be free()'d before setting.
In this case it doesn't, since the function is only used for config
parsing (I hope). Add the check to prevent a memory leak, just in
case this changes in the future.

TODO: Option parsing functions should really be moved elsewhere and
renamed appropriately, like set_opt_kernel() or config_set_kernel(),
if config parsing is to remain as-is. It will probably change
drastically, so leaving as-is for now.
2014-03-27 17:37:18 +02:00
Noel Maersk
e0736b1d5b misc: suggest checking configuration in log message. 2014-03-17 21:57:00 +02:00
Noel Maersk
87801c2578 opencl: rename cgpu_info->kname to cgpu_info->kernelname. 2014-03-17 21:57:00 +02:00
Noel Maersk
4ea508850e opencl: rename queue_scrypt_kernel() to queue_kernel().
There are no other kernels, and differentiating kernels in the future
should be done in a universal way, preferably not by choosing a function.

Note how queue_kernel() is used (passed as function reference).
2014-03-17 21:57:00 +02:00
Noel Maersk
1333ed576d core: simplify kernel selection code.
WIP!

Use a string instead of a state-machine-ey kernel selection mechanism
where kernel names have to be predefined. This should allow just dropping
new kernels into dir `kernel` without bloating the code in three other
places.

Is in dire need of a cleanup, function parameter check, edge case check -
all the usual testing.

In particular, checking these definitions/keywords:

* enum cl_kernels
* kname
* [c]gpu[s]->kernel (and similar)
* memory cleanup after strdup()?..
* chosen_kernel
* queue_scrypt_kernel
* strbuf
* initCl
2014-03-17 21:56:43 +02:00
Noel Maersk
44aed3570e Merge branch 'build-msvs2010-upd' into build-msvs2010-merge
Test in separate branch before merging into master.

Conflicts (resolved):
	api.c
	util.c
2014-02-22 17:05:07 +02:00
Noel Maersk
dc9f270d3a log: disable spammy log message. 2014-02-14 13:55:42 +02:00
Noel Maersk
dff7876b7a Merge branch 'master' into build-msvs2010-upd 2014-02-07 21:45:26 +02:00
Noel Maersk
8043af5ec7 core: write gpu-threads to config when using ncurses menu. 2014-02-07 00:52:49 +02:00
Noel Maersk
b5b20c19f6 core: make errors on reading experimental options from config less scary.
The config file is written poorly: first off, not all available options
are written (they have to be written manually, since there's no struct
enumeration); then, default values are not commented out.
2014-02-07 00:34:56 +02:00
Noel Maersk
23eb242a5f kernel: make psw usable, reorder cases alphabetically.
Closes https://github.com/veox/sgminer/issues/30
2014-02-01 16:01:37 +02:00
Brandon Tuomela
bda1070259 kernel: add psw kernel. 2014-02-01 15:51:03 +02:00
Sanjin Trošelj
8c0e250db2 VS2010 build: Prepare driver-opencl.c.
Cherry-picked by veox.

Changes from troky: struct device_drv opencl_drv tab alignment.
2014-01-27 23:16:57 +02:00
Noel Maersk
b56e65aa77 misc: line wrap. 2014-01-27 19:06:52 +02:00
Noel Maersk
cae071b837 Merge branch 'kernels' 2014-01-27 00:48:25 +02:00
Noel Maersk
5f795be64a core: use kernel name defines now that version date is not in the filenames.
Ideally, even this should not be needed, and specifying a kernel name string
should search for the appropriate file in kernel-path.
2014-01-23 11:46:47 +02:00
Noel Maersk
d04a8d174b tui: display line getting off-screen on narrow terminals. 2014-01-22 18:43:22 +02:00
Martin Danielsen
d11df698d1 --rawintensity option, by request of Dead2.
This setting allows to set the GPU intensity value directly without any modifiers, it does not
get any more raw than this! Look at the xintensity description raw for examples of regular
intensity values. You can also set this value through the ncurses interface by pressing:
G -> A -> select device id -> enter value.

Minor xintensity code cleanup as well.

Conflicts:
	driver-opencl.c
	miner.h
	sgminer.c
2014-01-22 18:24:43 +02:00
Noel Maersk
35a23942b1 kernel: fix alexkar* kernel crashes due to missing case in switch.
Fixes https://github.com/veox/sgminer/issues/27
2014-01-21 21:46:59 +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
Noel Maersk
99fa25c27f core: don't use magic numbers to set xintensity. 2014-01-19 20:06:55 +02:00
Noel Maersk
463668b878 core: initial implementation of user-settable xintensity. Has a bug.
Changing `intensity` and to it from `xintensity` works fine.

Changing `xintensity` sometimes fails to enqueue kernel.

For example, starting with --xintensity=128 (on a 5850) and
then changing to 64, 42, or 100 is reliable. However, changing to 127 is
not, and produces

    [04:13:01] Error -54: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [04:13:01] GPU 0 failure, disabling!

Manually enabling the disabled GPU is successful, but the GPU no longer
submits shares.

This might be a hardware limitation.
2014-01-19 05:14:17 +02:00
Noel Maersk
9d0b7f9658 core: Accidentally left a part of a previously non-merged commit (thread display).
IMO threads don't change dynamically, so they shouldn't be displayed
in the main window, but in "GPU settings" menu instead.
2014-01-19 02:46:21 +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
2f0fac6c66 core: Allow setting kernel.
https://github.com/veox/sgminer/issues/14
2014-01-17 17:44:18 +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
b11ca3650a Remove remaining references to have_opencl. 2014-01-11 20:57:15 +02:00
Noel Maersk
744e819117 Remove last references to opt_nogpu. 2014-01-11 20:51:54 +02:00
Martin Danielsen
31123de410 -g or --gpu-threads now support comma separated values, yaaay!
It is exactly what it says, now you can finally put that Frankenrig configuration in one file.
The parameter follows the same design as gpu-engine and gpu-memclock.
2014-01-11 18:11:14 +02:00
Noel Maersk
d53b329f18 core: Revert printing threads for every GPU, this setting is not modifiable at run-time. 2014-01-11 17:42:37 +02:00
Martin Danielsen
89663c7e94 Display reject percentage instead of absolute accepted/rejected values
Changed GPU status line from "A:xxxxx R:xxx" to "R:0.0%". It shows (rejected/(accepted+rejected))*100, which is the percentage of rejections for a GPU. Total accepted and rejected in top status is unchanged.

GPU status lines now show both threads and intensity.
2014-01-11 17:41:30 +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
533f16aeb1 Increase MAX_INTENSITY to 42.
Untested, since I do not have the hardware that supports such high a setting.

Requested by yellowz06 on Litecoin Forum:
https://forum.litecoin.net/index.php/topic,6925.msg54952.html#msg54952
2013-11-27 14:08:27 +02:00
Noel Maersk
664fc33b0c Remove code for Bitcoin GPU kernel execution. 2013-11-24 22:16:16 +02:00
Noel Maersk
323af83fdb Remove define-clauses for USE_SCRYPT. 2013-11-24 19:52:14 +02:00
Noel Maersk
95586f72f0 Squash-merge branch dead-end with unnecessary check removals. 2013-11-24 16:18:10 +02:00
Noel Maersk
37cd3fb04c Get rid of several opt_scrypt checks.
--scrypt will eventually become a default, and is the only reason to use this
version of cgminer.
2013-11-24 15:28:53 +02:00
ckolivas
6d7471237d Use macro expansion to iterate over all device drivers without needing to explicitly code in support in all places. Pass a hotplug bool to the detect() function to prevent opencl trying to hogplug GPUs. 2013-09-28 15:11:06 +10:00
ckolivas
741b74309e Forward declare all device drivers in miner.h avoiding the need to export them everywhere else. 2013-09-28 14:00:18 +10:00
ckolivas
8875197466 Create a macro list of drivers to enable easier addition of further drivers. 2013-09-28 10:25:48 +10:00
Con Kolivas
3e84a19cda Fix --scrypt being required before scrypt intensities on command line or not working at all via config files. 2013-08-11 15:10:27 +10:00
Con Kolivas
2b171f7fae Limit intensity range according to whether scrypt is in use or not. 2013-08-09 15:12:57 +10:00
ckolivas
837c7319f1 Fix extra argument passed to statline before. 2013-07-19 19:15:01 +10:00
Kano
ad1572f77f size check get_datestamp/get_timestamp and remove unused cgpu->init 2013-07-06 20:17:17 +10:00
Kano
385a70bea7 make all statline overflow safe 2013-07-06 19:15:59 +10:00
Kano
2d8cc36b82 GPU fan rpm display 9999 when it overflows 2013-06-28 23:19:09 +10:00
Kano
b5bf34dc85 applog/quit fix GPU errors created 2013-06-16 16:54:42 +10:00
Kano
7eba963477 remove varargs from logging/quit/in general as much as possible 2013-06-15 22:03:56 +10:00