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

153 Commits

Author SHA1 Message Date
Con Kolivas
a7707a26cb Rename the poclbm file to ensure a new binary is built since. 2011-07-18 10:42:24 +10:00
Con Kolivas
eea05c05b8 Update kernel with a shorter output path, and use 4k output buffer to match OS page sizes. 2011-07-15 13:04:25 +10:00
Con Kolivas
857902a13d Commit a new phatk kernel renamed to force new binary building and add proper support in makefiles. 2011-07-12 22:23:03 +10:00
Con Kolivas
0c910673b2 Set max preferred size to 256 to prevent lying cards from crashing when no worksize is set. 2011-07-10 00:30:12 +10:00
Con Kolivas
826cc4800e Opcode should be ULL. 2011-07-08 11:58:04 +10:00
Rusty Russell
efebee5ab8 Fix the case where there are no GPUs, and exit if they give errors.
If there are no GPUs, set nDevs to 0 not -1 (status is set to an
unhelpful -1001 here on my laptop, so we can't rely on a particular
status value).

Also, if nDevs is -1, exit rather than screwing up later.
2011-07-06 16:47:29 +09:30
Ycros
a636a6744f Merge branch 'cgminer' of git://github.com/ckolivas/cgminer into cgminer 2011-07-05 21:31:41 +10:00
Ycros
52d6e7ca37 Fixed fread issues under Windows. 2011-07-05 21:31:24 +10:00
Con Kolivas
a93b22c630 Make it possible to build without GPU mining by picking up HAVE_OPENCL from config.h. 2011-07-05 17:34:54 +10:00
Con Kolivas
821da37c84 Add hardware name to binary kernel name allowing for unique kernels for different cards on the same machine. 2011-07-04 19:56:27 +10:00
Con Kolivas
13b43cfad1 Update copyright and authors. 2011-07-04 19:56:27 +10:00
Con Kolivas
594b38b8cb Fix redefinition of gnu source. 2011-07-04 19:56:27 +10:00
Ycros
ec8319176e Build on windows using mingw32. 2011-07-04 19:56:27 +10:00
Ycros
5d301c8ba0 Make a binary load failure build from source. 2011-07-04 19:56:27 +10:00
Con Kolivas
3aa5be4fcf Reinstate binary kernel loading with fixes.
Build binaries with unique filenames from the kernel generated and save them.
Try to load this cached binary if it matches on next kernel instantiation.
This speeds up start-up dramatically, and has a unique kernel binary for different kernel configurations.
2011-07-04 19:47:46 +10:00
Con Kolivas
60f0bb19de Temporarily back out binary building till it's working more reliably. 2011-07-04 19:47:46 +10:00
Con Kolivas
a095f0fae2 Broke source generated program. Fix. 2011-07-04 19:47:46 +10:00
Con Kolivas
4d73057772 Build binaries with unique filenames from the kernel generated and save them.
Try to load this cached binary if it matches on next kernel instantiation.
This speeds up start-up dramatically, and has a unique kernel binary for different kernel configurations.
2011-07-04 19:47:46 +10:00
Con Kolivas
973b2199e1 Tidy. 2011-07-04 19:47:46 +10:00
Con Kolivas
2b6e841673 Use a buffer of up to 512 * 4 integers when retrieving work from the GPU.
This allows each local thread id to have one slot to put any positive results into, thus making overlapping results far less likely.
Thus races will be much rarer, allowing more threads.
It should also pick up blocks close to each other more reliably and hopefully decrease the number of rejects and opencl errors.
Do the search over the buffer entirely in a separate thread to allow the GPU to stay as busy as possible.
Detach threads from themselves to prevent unlucky even where dereferencing occurs by freeing the data that stores the thread info.
2011-07-04 19:47:46 +10:00
ckolivas
1dfbe60353 Put sanity limit on work size since some nvidia fail :( 2011-07-04 19:47:45 +10:00
Con Kolivas
6374e0fafe Import the phatk kernel. Enable it only for hardware with amd media ops for now since it crashes nvidia et. al.
Fallback to the poclbm kernel for the rest. Try harder to avoid stale blocks around longpoll detecting new blocks.
2011-07-04 19:47:45 +10:00
Con Kolivas
2dbb39444d Base was being set wrongly meaning we were repeating searches and the rate was actually lower than displayed :(
Tweak Ma with new changes.
Change default vectors to 2 since it's faster than 4 even when 4 is reported as preferred.
2011-07-04 19:47:45 +10:00
Con Kolivas
c566605195 Tab dainbramage. 2011-07-04 19:47:45 +10:00
Con Kolivas
11c8818558 32 bit only builds one elf, not an elf in an elf, so account for it to be able to bfi int patch properly. 2011-07-04 19:47:45 +10:00
Con Kolivas
623b9b9fd8 Patch bitalign separately from bfi_int.
Recover from failing to patch for bfi int.
2011-07-04 19:47:45 +10:00
Con Kolivas
06f3950658 Fix typo which prevented BFI INT patch working on multi-GPUs. 2011-07-04 19:47:45 +10:00
Con Kolivas
30e38e2ef8 Typo i - gpu 2011-07-04 19:47:45 +10:00
Con Kolivas
fdb46f2d9b 32bit fixes. 2011-07-04 19:47:45 +10:00
Con Kolivas
656b485d80 Make the worksize and vector width configurable. 2011-07-04 19:47:45 +10:00
Con Kolivas
401586f92a Only try to patch GPU referenced. 2011-07-04 19:47:45 +10:00
Con Kolivas
ac4ab6afdc Fix mutli-gpu initialisation when BFI_INT patching. 2011-07-04 19:47:45 +10:00
ckolivas
64f268c8c7 Display correct worksize. 2011-07-04 19:47:44 +10:00
Con Kolivas
808d5b07f9 Make output debug. 2011-07-04 19:47:20 +10:00
ckolivas
feb8cfc8fa applog fixes. 2011-07-04 19:47:19 +10:00
ckolivas
26546ad5b9 Make the optimisations per-gpu card and update code to work properly with multiple cards. 2011-07-04 19:47:19 +10:00
Con Kolivas
afc83cb25b Need gnu_source for memmem to work properly. 2011-07-04 19:47:19 +10:00
Con Kolivas
4cd5f47efa Revert "Multiple compiler warning fixes."
This reverts commit a5cbfbde2610e9f60e14b41a4e0595bcb34c772a.

Broke.
2011-07-04 19:47:19 +10:00
Con Kolivas
88761e6cf2 Multiple compiler warning fixes. 2011-07-04 19:47:19 +10:00
ckolivas
d28f526b1e Need memmem in advance() to work properly for patching. 2011-07-04 19:47:19 +10:00
ckolivas
19eea9067f Implement code detecting max work size and optimal vector width.
Use this to patch the kernel to suit the idea values for the card.
Then use these values when invoking the kernel.
2011-07-04 19:47:19 +10:00
ckolivas
33352213eb Report preferred vector width. 2011-07-04 19:47:19 +10:00
Con Kolivas
407df0f4b1 Use correct boolean testing and long enough string for cl_amd_media ops testing and kernel changing. 2011-07-04 19:47:19 +10:00
ckolivas
c2e4165590 Detect platforms that support cl_amd_media_ops and decide whether to BFI_INT patch or not.
Remove unused kernels.
2011-07-04 19:47:19 +10:00
ckolivas
b4d2733cfc Convert to poclbm kernel. 2011-07-04 19:47:19 +10:00
ckolivas
79fec01a46 Remove the input buffer and just pass args to the kernel as per plugin design. 2011-07-04 19:47:19 +10:00
Con Kolivas
f05270b8c8 Optimise loop and make debug debug only. 2011-07-04 19:47:19 +10:00
Con Kolivas
91e5cef3a5 Actually get first BFI_INT patch working. 2011-07-04 19:47:19 +10:00
Con Kolivas
a40003ab62 More bfi_int patching. 2011-07-04 19:47:19 +10:00
Con Kolivas
c548dea848 First BFI_INT patch changes. 2011-07-04 19:47:19 +10:00
Con Kolivas
910e6943b2 Increase baseline threads to 1<<22. Make total counter regularly update every 5 seconds.
Only write the blank buffer when it needs to be blanked.
2011-07-04 19:47:19 +10:00
ckolivas
6b77d8500d Fixes. 2011-07-04 19:47:19 +10:00
Con Kolivas
dde7039726 Merge gpumining from oclmine. Unstable. 2011-07-04 19:46:39 +10:00