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

5924 Commits

Author SHA1 Message Date
gacheson
1eacb3f1c2 Fixes for "--pools" flag and fatal JSON error 2014-01-25 10:50:18 -06:00
Noel Maersk
e0ca8ebc2f doc: Simplify paths for cross-compiling instructions in windows-build.txt 2014-01-25 00:57:47 +02:00
Angus Gratton
f321a0211b Add clarification on Windows cross-build, out of tree is possible 2014-01-24 15:16:00 +02:00
Noel Maersk
47d83df892 doc: revert some formatting changes made by Drogean to windows-build.txt 2014-01-24 15:15:36 +02:00
Angus Gratton
1ceedd562d Add some notes about cross-compiling cgminer for Windows from Linux 2014-01-24 15:13:49 +02:00
Noel Maersk
06240b91a6 cross-compile: comment out sleep().
Reported as unneded:
https://github.com/veox/sgminer/issues/37

When is this true? Which IDEs, Windows/MinGW versions?
2014-01-24 14:46:05 +02:00
Noel Maersk
6089dfbbac adl: code cleanup after last commit. 2014-01-24 00:08:34 +02:00
Joe4782
712385160b Added the stratum port to the status print 2014-01-23 21:54:40 +00:00
Joe4782
a7bca56633 Getting some extra log messages in the adl handling code 2014-01-23 23:33:35 +02:00
Noel Maersk
08abb9e417 build: reorder ADL checks.
If `--disable-adl-checks` is given, enable ADL immediately.
2014-01-23 23:17:15 +02:00
Noel Maersk
de08e71ea2 core: write xintensity and rawintensity to config, add vectors back as a hidden option; a little whitespace for readability. 2014-01-23 21:43:22 +02:00
Noel Maersk
dda62843fd core: Add -v as an shorthand for --verbose. 2014-01-23 20:42:14 +02:00
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
7a69044cff doc: update KERNEL.md 2014-01-23 18:25:12 +02:00
Noel Maersk
abf1b940b5 doc: update README.md to point to KERNEL.md 2014-01-23 12:05:49 +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
68f0a45034 doc: BUGS.md
Outline on bug reporting.
2014-01-23 03:15:31 +02:00
Noel Maersk
e9af2109c3 doc: change bog reporting address. 2014-01-22 22:39:00 +02:00
Noel Maersk
45848edff4 misc: Add Kalroth's bitcoin donation address. 2014-01-22 18:45:23 +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
Martin Danielsen
967c757cdf Cleaned a few messages up after pool naming feature. 2014-01-22 17:42:09 +02:00
Noel Maersk
0c38db6393 build: Add --disable-adl-checks
Requested in https://github.com/veox/sgminer/issues/26

configure.ac needs an overhaul (see SDMINER_SDK).
2014-01-22 12:56:06 +02:00
Martin Danielsen
cb174d433a Failover pool switching back delay is now configurable.
--failover-switch-delay sets the delay in seconds before switching back to a failed pool,
default is 60 seconds.
2014-01-22 12:06:04 +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
45bf2f2335 doc: Add debug compilation instructions. 2014-01-21 21:03:04 +02:00
Noel Maersk
2f1fafedb9 doc: skeleton KERNEL documentation.
On how to submit new kernels. This should allow a broad community review.
2014-01-21 16:28:43 +02:00
Noel Maersk
629f7b15e2 kernel/zuikkis: remove unneeded comments and change defines.
I thought I've already fixed and committed this before. It probably got
merged back in when I wasn't looking.
2014-01-21 16:04:47 +02:00
Noel Maersk
4de27856af misc: add ozbenh and gdevenyi to AUTHORS.md. 2014-01-21 15:05:20 +02:00
Noel Maersk
4ac17b03f6 misc: Add Zuikkis and Alex Karimov to authors. 2014-01-21 15:04:08 +02:00
Noel Maersk
8bb66adc48 Merge remote-tracking branch 'origin/kernels' into kernels 2014-01-21 10:46:09 +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
9545c143e8 Merge pull request #25 from gdevenyi/kernels
Replace multiply by 2 (i*2) with left shift.
2014-01-21 00:34:01 -08:00
Noel Maersk
81337e0064 kernel: vanilla Alexey Karimov kernels (alexkarnew and alexkarold).
alexkarnew: (for driver 13.4 and newer, and cgminer 3.3.1)
alexkarold: (for older drivers than 13.4, and cgminer 3.3.1)

https://litecointalk.org/index.php?topic=4082.0

> I was able to optimize the code of cgminer's scrypt.cl.
> It gives 0-3% increase, depending on the drivers and hardware.

> 1. Without optimization, when "CO" is used, every time
> z+x*zSIZE+y*xSIZE*zSIZE is calculated.

> I have created "CO" variable, and made so that x*SIZE is calculated only
> once. Now, when "CO" is used, every time z+y*xSIZE*zSIZE is calculated.

> In one case, variable y is incremented by 1 after 8 "CO" calculations.
> I have created "CO_tmp" variable, where contains result of xSIZE*zSIZE.
> And after 8 "CO" calculations I add "CO_tmp" to "CO".

> Now, when "CO" is used, every time only z is calculated. It is faster as
> z+x*zSIZE+y*xSIZE*zSIZE :)

> In other case when "CO" is used, every time z+y*xSIZE*zSIZE is
> calculated, but it faster than z+x*zSIZE+y*xSIZE*zSIZE too.

> 2. I have replaced multiplication by 2 with bit rotation - it is faster.

> For 7xxx cards you can try to set --thread-concurrency equal to (2^n + 1).
> It may give a little more mining speed.
> For example: 16385 (it is 2^14 + 1), 8193 (2^13 + 1), or 4097 (2^12 + 1).
> I have almost no information, how it works on other series.

> LMqRcHdwnZtTMH6c2kWoxSoKM5KySfaP5C
2014-01-21 09:45:10 +02:00
Gabriel A. Devenyi
a6ccc05e5f Replace multiply by 2 (i*2) with left shift. This should be slightly faster. Can't use OpenCL rotate becase of bit carry overs 2014-01-20 17:13:18 -05:00
Noel Maersk
f796aa51ca kernel/misc: change ckolivas.cl encoding to UTF-8. 2014-01-20 23:47:24 +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
afdc8b5ffb kernel: zuikkis' vanilla kernel added.
Changed encoding to UTF-8.

Will not build with sgminer (fix in next commit).

http://www.reddit.com/r/dogecoin/comments/1ui3bx/increase_such_hashrate_1_to_5_scrypt_tweaking/ceir5na

> It is pretty much stock, except that I have removed all the #pragma
> unrolls, and optimized the inner scrypt_core loop. #pragma unroll does
> not give any speedup here.

> The idea is to move the "if (j&1)" comparison to outside of the lookup
> loops. Then, if j&1 happens to be zero, the V[z] and X[z] loops can be
> combined to a single loop, which gives the speedup!

> This loop and the salsa function are the most important places in the
> entire source, it probably spends over 90% of time in here.. There's
> very little to be gained outside of these, I think.

> Donations: DQj4t2DFMQtXofhstouyZw1sYUKWUJn4wv

https://github.com/veox/sgminer/issues/4#issuecomment-32753290

> Most of these optimized kernels (including mine), have fixed
> lookup-gap=2. However, I have never seen anyone use any other value, for
> any GPU, so I think you could just remove the configurable value.

> Or with some #if LOOKUP_GAP==2 magic it is of course possible to make
> such source that allows any value.

> Some users have reported slightly slower hashrate with my kernel as
> well, but this could be some misconfiguration also.. If scrypt kernel
> becomes faster, you may need to lower the GPU engine clock to get full
> speed. Same as if you increase GPU clock too high, you will get a drop
> in hash rate.

> My source is free to use in sgminer. And if you diff to original you
> will see that the changes are not very big.

> Removing of #pragma unrolls helps in any GPU, in my opinion.. Current
> compilers know better when unrolling helps.
2014-01-20 23:36:58 +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
875db702b3 adl: unambiguosly check if FanSpeedInfo specifies support for either mechanism to set FanSpeed.
Reported by olejr: https://github.com/veox/sgminer/issues/15#issuecomment-32715082

Related issue: https://github.com/veox/sgminer/issues/15
2014-01-19 21:12:13 +02:00
Luke Dashjr
74fb5ab4b8 adl: Set iSpeedType to RPM for get-fanspeed requests
...and ensure we don't change do something weird with the fan when initially setting user-defined speed flag.

Fixes crash on R9 cards. Thanks to tkg for hints on what was wrong!
RPM preferred over percent since writing RPM back is always supported (while percent is not in some cases).

Conflicts:
	adl.c
2014-01-19 20:58:02 +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
Noel Maersk
1049af3a04 misc: Add Luke-jr back to AUTHORS.md and reorder a bit. 2014-01-19 02:05:53 +02:00
Luke Dashjr
3faf4dd4a6 Use lround instead of llround, since it has better compatibility with older MingW and Cygwin versions 2014-01-19 01:46:09 +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
Martin Danielsen
d7e469bd76 Stratum servers can now be named.
The names will be used throughout the display in the program, when not set "Pool 1" will
simply be used instead. The names are not exposed through API yet, it's on my TODO list.

Use "poolname" like this:

	{
		"poolname" : "Example pool",
		"url" : "stratum+tcp://example.com:8080",
		"user" : "y",
		"pass" : "x"
	},

Conflicts:
	sgminer.c
	util.c
2014-01-18 21:05:26 +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
b16a05aa0e core: lower maximum intensity to 31.
Intensity determines the number of threads started, is an unsigned int and
is used as (1 << intensity), so anything over 31 is meaningless.
2014-01-17 16:00:20 +02:00