Bitcoin Forum
May 19, 2022, 05:40:29 PM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 25, 2013, 07:53:14 PM
@dbabo
Try this:
in salsa_kernel.cu find line:
Code:
cudaSetDeviceFlags(cudaDeviceScheduleYield);
and change it to
Code:
cudaSetDeviceFlags(cudaDeviceScheduleBlockingSync);

On my setup it doesn't help much, as most cpu time is spent in sha256_transformx4 function, but it may help on your setup.
2  Other / Beginners & Help / Re: Workaround for Nvidia OpenCL 100% CPU usage on linux. on: April 25, 2013, 11:45:58 AM
I'm only guessing here:

During executing the opencl program nvidia opencl library enters loop which checks if the execution of opencl program has ended. At the end of each iteration of the loop sched_yield function is called to move the tasks to the end of system tasks queue, to allow other tasks to run unaffected. But if there are no other tasks scheduled to run it just spins in this loop, eating CPU for nothing - not really a big problem, but eats power and heats up CPU.

In CUDA you can control weather it behaves like this, or use some kind of conditional wait, not spinning in a loop, till the CUDA program finishes.

Probably nvidia could've implemented this mode for OpenCL too, without much effort.
3  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 22, 2013, 11:18:01 PM
Great, now it works out-of-box for me (salsa_kernel), thanks.
4  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 22, 2013, 10:48:47 PM
Yes, without this on 64bit it kernel dies due to Warp Misaligned Address on compute_10.
5  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 22, 2013, 10:04:43 PM
Additionally shared buffers for 64bit builds must be 64bit aligned.

If it's worth to save some memory for 32bit builds something like this can be done:

Code:
#if __x86_64__
#define _64BIT_ALIGN 1
#else
#define _64BIT_ALIGN 0
#endif

And for each buffer:

Code:
__shared__ uint32_t X[WARPS_PER_BLOCK][WU_PER_WARP][32+1+_64BIT_ALIGN];
6  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 22, 2013, 09:18:41 PM
Any suggestion for a portable 32 bit type among 32 bit and 64 bit builds?  I thought int changed size depending on architecture, long is always 32 bits, and long long is always 64 bits.

EDIT: I've been reading up on the differences between Microsoft's LLP64 model vs. Unix/Linux LP64 model. I will have to change a few things in the code, then.

Christian

For general purpose vars use uint*_t from <stdint.h>

I'm not sure what should be used for CUDA vector types for portability.

On 64bit linux:
sizeof(ulong2): 16, sizeof(uint2): 8

On 32bit linux it's probably 8 for both.
7  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 22, 2013, 08:45:53 PM
Isn't ulong the same as uint on 32 bit builds?
On 64bit linux it breaks things, because ulong is 64bit and uint is 32bit.
8  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 22, 2013, 08:26:04 PM
My mistake, it shouldn't be there - at the moment -O1 for ld only turns on some optimizations for shared libraries, not the program binary.
9  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 22, 2013, 12:42:05 PM
I've just run into the same compiler issue that borked the Titan kernels when I tried to compile salsa_kernel.cu for sm_30. The kernel will just crash.

Maybe using the NSight debugger I can figure out why this occurs.

Does the crash produce: CUDA_EXCEPTION_6, Warp Misaligned Address ?

I've been able to compile & run salsa_kernel for sm_21, without tex-cache, when accesses to X variable are 128-bit aligned,

ie. when it's declared like this:
Code:
_shared__ uint32_t X[WARPS_PER_BLOCK][WU_PER_WARP][16+4];
10  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 21, 2013, 12:51:51 AM
@K1773R: check out patch for 64bit systems, a few post above yours.
11  Bitcoin / Mining software (miners) / Workaround for Nvidia OpenCL 100% CPU usage on linux. on: April 20, 2013, 10:07:41 AM
Little workaround for nvidia eating 100% CPU when running OpenCL apps on linux.

Download link:

http://mk.junkyard.one.pl/libsleep.c

To compile run:
gcc -O2 -fPIC -shared -Wl,-soname,libsleep.so -o libsleep.so libsleep.c

To use:
LD_PRELOAD="./libsleep.so" ./cgminer

You can configure sleep time by setting
YIELD_SLEEP_TIME environment variable (in microseconds)
Default is 1000usec
Example:
YIELD_SLEEP_TIME="1500" LD_PRELOAD="./libsleep.so" ./cgminer

How does it work:
It overrides sched_yield function called during running OpenCL program with call to usleep.
Expect a little performance drop (less than 5%) - adjust YIELD_SLEEP_TIME for your needs.
The longer opencl program running time (ie. higher agression), the lower the performance drop is.

Does someone who is affected by similar problem with ATI cards would be willing to give me access to their system, so i could look up how to resolve this issue with ATI?
12  Alternate cryptocurrencies / Mining (Altcoins) / Re: [ANN] cudaMiner - a new litecoin mining application [Windows/Linux] on: April 20, 2013, 09:40:24 AM
Little patch to 2013.04.17 version for compiling & running cudaminer on native 64bit linux.

http://mk.junkyard.one.pl/cudaminer-2013.04.17-64bit.patch.gz

To apply to cudaMiner source download the file & issue command:
Code:
zcat cudaminer-2013.04.17-64bit.patch.gz | patch -p1

I only tested the salsa kernel, and i'm not sure if titan kernel will work.
13  Other / Beginners & Help / Re: cudaMiner patch for x86_64 linux on: April 20, 2013, 09:19:15 AM
@dbabo: the patch is for 2013.04.17, not 2013.04.14 version.
14  Other / Beginners & Help / Workaround for Nvidia OpenCL 100% CPU usage on linux. on: April 19, 2013, 02:57:36 PM
Little workaround for nvidia eating 100% CPU when running OpenCL apps.

mk.junkyard.one.pl/libsleep.c

To compile run:
gcc -O2 -fPIC -shared -Wl,-soname,libsleep.so -o libsleep.so libsleep.c

To use:
LD_PRELOAD="./libsleep.so" ./cgminer

You can configure sleep time by setting
YIELD_SLEEP_TIME environment variable (in microseconds)
Default is 1000usec
Example:
YIELD_SLEEP_TIME="1500" LD_PRELOAD="./libsleep.so" ./cgminer

How does it work:
It overrides sched_yield function called during running OpenCL program with call to usleep.
Expect a little performance drop (less than 5%) - adjust YIELD_SLEEP_TIME for your needs.
The longer opencl program running time (ie. higher agression), the lower the performance drop is.

Does someone who is affected by similar problem with ATI cards would be willing to give me access to their system, so i could look up how to resolve this issue with ATI?
15  Other / Beginners & Help / Re: Why bitcoin doesn't need a password? on: April 19, 2013, 02:37:53 PM
Malware will likely include a keylogger, but password serves well for unprotected backups.
16  Other / Beginners & Help / Re: cgminer - all I care about is hashrate? on: April 19, 2013, 07:06:32 AM
If you're paying for electricity you should basically care about hash rate/power consumption factor.
17  Other / Beginners & Help / cudaMiner patch for x86_64 linux on: April 18, 2013, 11:22:37 PM
Little patch for compiling & running cudaminer on native 64bit linux.

mk.junkyard.one.pl/cudaminer-2013.04.17-64bit.patch.gz

To apply to cudaMiner source download the file & issue command:
Code:
zcat cudaminer-2013.04.17-64bit.patch.gz | patch -p1

I only tested the salsa kernel, and i'm not sure if titan kernel will work.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!