gat3way / hashkill

hashkill password recovery tool
www.gat3way.eu/hashkill
Other
196 stars 47 forks source link

nvidia support not build despite being told to build #39

Open ZeroChaos- opened 11 years ago

ZeroChaos- commented 11 years ago

On my build box which doesn't have an nvidia card it refuses to build nvidia support.

On my laptop that has an nvidia card with cuda support it refuses to build nvidia support (pretty sure the current nvidia driver is broken and doesn't recognize the cuda support on my 4200m)

I see this:

Could not find an NVidia platform. Exiting.

Nvidia support should always be built when requested, we should assume the user requested it for a reason.

gat3way commented 11 years ago

Well it depends on the nvidia opencl stack present in order to build the kernels (compilation calls clBuildProgram()). Without it, it would refuse to build them. Then the question is "should we fail the build in case no platform is available"...this can be done easily I think. Should we change that?

ZeroChaos- commented 11 years ago

the actual hardware should not be required to build. obviously I need the right software to build and that is fine.

gat3way commented 11 years ago

In the ideal case yes. However, both nvidia and amd stack require that the hardware is present. In the AMD case we can cross-compile for hardware that is not available, but at least one AMD device must be present. For the nvidia case it's worse: there are compute capabilities (1.0-3.0) and their opencl stack would refuse to build for compute capability higher than that of the available hardware. That's the reason I keep a cheap sm_30 gpu. In fact, you should not be able to install either nvidia's or amd drivers (thus their opencl implementation) without the hardware present, the installer will bail out.

ZeroChaos- commented 11 years ago

I have drivers and sdk installed for both amd and nvidia no problem on boxes without the respective hardware. Not being able to build without the hardware is a pretty severe limitation. Without a way around this, I'm not sure how I can distribute this software on a livecd, I'm not buying brand new videos cards every six months...

gat3way commented 11 years ago

Yes and no - it is a problem if you distribute prebuilt binaries and you target all kinds of hardware. It is not that much of a problem if you build from source - because you will have all the needed kernels built anyway. The only problem is when the owner of the system installs a new GPU. In the AMD case it's less problematic as the compiler builds binaries for any possible kind of AMD hardware supported by the driver, so installing another AMD GPU would work. For Nvidia though it's more of a problem - installing a new family of GPU adapter (newer compute capability) means it would not be supported unless hashkill is rebuilt.

The only way to deal with that is by doing run-time compilation instead of build-time. This was requested previously and I refused to implement it, but I guess that might be probably the right thing to do. Definitely though it won't happen in short term.

ZeroChaos- commented 11 years ago

my build box has no nvidia in it at all.... I guess that means no nvidia support in the binaries.... Pretty certain that the binary distros can't package this at all as the build hosts are extremely unlikely to have even one capable gpu, yet alone one of each type.

gat3way commented 11 years ago

OK, I will move to runtime compilation then (besides, I am planning changing the architecture so that GPU host code is organized as loadable plugins instead of being built in the binary, so both changes can be done together).

However, this won't happen in this release (0.3.2). The only things left to be implemented in 0.3.2 are androidpin/samsungpin plugins, the build scripts stuff we're improving, some bug fixes in the rule engine, some urgent fixes to problems introduced with Catalyst 13.4 and probably (but not 100% sure yet) an external hashkill tool I started a while ago but never finished.

ZeroChaos- commented 11 years ago

I really don't mean to dictate your architecture to you, but the current implementation does have some negatives. Being open source is fantastic but the fact of the matter is that if you can get prebuilt binaries into the distro repos then far more people will use your software and very few people will every build it. If you would like to close this bug and roll it into a bigger "runtime compilation" bug that's fine but I leave it to you.

gat3way commented 11 years ago

Yep, right now if you wish to distribute binaries, you have to own at least one AMD GPU and the newest possible Nvidia GPU and that sucks. This will change with runtime compilation.