Pages:
Author

Topic: A slightly more open approach to bitcoin on the GPU - page 2. (Read 18942 times)

full member
Activity: 307
Merit: 102
This new patch has been tested and is generating (at least in a test network), and the move of scratch space into thread local memory has improved performance quite a bit, from ~1880kh/s to ~3000kh/s on my system.

Did anyone succeed in building and testing on other platforms / GPUs?

I've tried to compile it under Ubuntu 64bit, but have run into issues with it. I would greatly appreciate it if you could give me some info about compiling for CUDA or a link to such information.
member
Activity: 73
Merit: 10
I am interested in maybe getting something going for windows...
legendary
Activity: 1540
Merit: 1001
This new patch has been tested and is generating (at least in a test network), and the move of scratch space into thread local memory has improved performance quite a bit, from ~1880kh/s to ~3000kh/s on my system.

Did anyone succeed in building and testing on other platforms / GPUs?
member
Activity: 61
Merit: 10
As of now, yes. It depends on how efficient we can implement the miner in the GPUs. If the entire control structure of the miner with the rest of the system in the cpu(ideally), then no you wouldn't. As of now, it will definitely impact how fast it is. This will take a bit to come to fruition, but when it does... dedicated systems would be quite easy to build.
member
Activity: 73
Merit: 10
I have one question: Do you need to have a good CPU to take full advantage of your GPU when generating bitcoins? I ask because I want to create a bitcoin mining rig with just pure GPU power. I don't want to spend extra on a CPU that I'm not going to use fully.
full member
Activity: 307
Merit: 102
Nelisky, thank you for your work. I think that it's in the network's best interest that the fastest possible methods of generating blocks are freely available (see tcatm's 4-way SSE2).
legendary
Activity: 1540
Merit: 1001
I am also working on a version of the BitCoin CUDA Client and will do all that I can to help this project. It will be opensourced as well, for the same reasons nelisky stated. I will test this first version out on my GTX 460(borrowing from a friend  Grin) as soon as I can. Also, the pseudocode I've been writing up should be quite a bit faster than this currently is because it is incorporating FPGA styling and CUDA programming.

I should have something up pf my code up after the weekend.

Nice! I've wanted to get into FPGA's too, and bitcoin seems very fitting, but unfortunately time doesn't stretch that much.

BTW, the code I posted is slightly broken Wink If the cuda thread generates a valid block it will die, for where it reads in main.cpp:


          if (DEBUG || hash <= hashTarget) {
            pblock->nNonce = keep+i;
            break;
          }

it shoudl read

          if (DEBUG || hash <= hashTarget) {
            pblock->nNonce = tmp.block.nNonce = keep+i;
            break;
          }

member
Activity: 61
Merit: 10
I am also working on a version of the BitCoin CUDA Client and will do all that I can to help this project. It will be opensourced as well, for the same reasons nelisky stated. I will test this first version out on my GTX 460(borrowing from a friend  Grin) as soon as I can. Also, the pseudocode I've been writing up should be quite a bit faster than this currently is because it is incorporating FPGA styling and CUDA programming.

I should have something up of my code up after the weekend.
legendary
Activity: 1540
Merit: 1001
I think the big secret thing with cuda or opencl clients is that they give one person a decisive advantage over everyone else running only a cpu. Add that with the fact that most users don't know cuda programing (me included) makes for a situation where a cuda client can be valuable to the author... For example artforz has made his own cuda client that has not been released. It has been rumored that he makes up 25% of the generation power on the network. It give him a huge advantage and one I think artforz would like to keep.

The down side to opening up a GPU client to the masses is that it completely kills CPU based generation unless you have a lot of cpus.... On my windows client I went from 4500Khash to 29000khashes.

I don't think that the bias should be towards the ones with better printers having more money Smiley The Bitcoins are a whole ecosystem, and mining for them is a small part of it, I guess. If lots of people start running GPU based mining, then the advantage that was owned by artforz and a handful of others will blend into more hands and pockets, thus making the mining less efficient for everyone. But mining is part statistics, part luck. I recently generated 3 blocks, running a machine that has been mining non stop for over a month. These 3 blocks are the only blocks it ever generated.

Of course artforz would like to keep the advantage. Heck, I could use this to my advantage too, but I'd rather take the open source business approach and say "here, take it, my treat" but expect you to do the same for me and others (yes, trust is the base for this), and if you like it, I'll take whatever you feel fair. You want me to do something specific? need suport? Well, priority and special attention comes with a cost.

I may never get as many coins as artforz created, but I hope I did my share on helping to spread them Wink

I will give this a try here in a few days or so on my 8800gtx hackintosh and see how it runs. What GPU does your mac have in it?
I have no cuda or MAC OS X programming knowledge but, I have done some c in BSD and will have a go at the code to see what I might be able to do. Thank you for your efforts!

I've got a GT330M, really basic entry level thing. And you are most welcome.
newbie
Activity: 39
Merit: 0
I think the big secret thing with cuda or opencl clients is that they give one person a decisive advantage over everyone else running only a cpu. Add that with the fact that most users don't know cuda programing (me included) makes for a situation where a cuda client can be valuable to the author... For example artforz has made his own cuda client that has not been released. It has been rumored that he makes up 25% of the generation power on the network. It give him a huge advantage and one I think artforz would like to keep.

The down side to opening up a GPU client to the masses is that it completely kills CPU based generation unless you have a lot of cpus.... On my windows client I went from 4500Khash to 29000khashes.

I will give this a try here in a few days or so on my 8800gtx hackintosh and see how it runs. What GPU does your mac have in it?
I have no cuda or MAC OS X programming knowledge but, I have done some c in BSD and will have a go at the code to see what I might be able to do. Thank you for your efforts!
member
Activity: 73
Merit: 10
I have a feeling this is going to be very controversial.
legendary
Activity: 1540
Merit: 1001
Honestly, I can't understand all the secrecy on the CUDA / OpenCL / Whatever GPU enabled versions of bitcoin. Sure, it's nice to take advantage of the extra edge you get if you want to build an efficient mining farm, but really, what's up with everyone on this regard?

So, not really having the time to do it, I decided to take my first cup of CUDA (as all I have as hw to test is a macbook pro with a nvidia inside), and I'm attaching the initial version here. Yes, the source, for you to do as you please! Just remember the reason you got it in the first place, which was that someone didn't take it and hide! Smiley

Anyways, it's *really* crude, has static compile instructions on the makefile, only for osx and with the cuda dev sdk in the default place, compiled for x86_64. But I'm sure you can quickly tweak it to compile for your system, though...

The code that runs in the GPU is a 1:1 copy of the Cryptopp source, only slightly tweaked. There's a lot of room for improvement, I have some 20 hours total of working with CUDA so I don't have the faintest idea of what optimizations I could achieve, but at least in the memory layout there's a lot to do. I compared the resulting hashes with Cryptopp and it matches, so I'm assuming it can generate blocks. I'm tired and thus haven't tried a local network, but I will soon.

I get 1400khs from the CPU with all cores combined, and 1800khs from the GPU alone, so it's pretty nice. It does take a lot of cpu still, for some reason, so run it with cores-1 or you'll loose performance. I *think* the hashes per second calculation is correct, but may not be.

The first processor is always the cuda, it will not run if you don't have the GPU / kernel, no error handling, ugly hackish code throughout, but it serves as a start. Lets get this production grade to include in the main clients, shall we?

Now, if you want to thank me for doing this just head to http://taabl.datlatec.com and place a few bets. I'm starting to think the time I spent developing the lottery wasn't worth it, as it got too little interest so far, so it would be super if you all gave it a try.

If you want me to continue to pursue this, then toss a good amount of coins my way Smiley or send me some hardware. I have linux and windows machines, but not the GPU for them, so *wink* *wink*

Most of all, share your code!
Pages:
Jump to: