4 ms·
How hard would it be to reverse engineer CUDA and make something like WINE that translates all CUDA operations into OpenCL or directly into third-party GPU inst
by dheera 6y ago
How hard would it be to reverse engineer CUDA and make something like WINE that translates all CUDA operations into OpenCL or directly into third-party GPU instructions?
Obviously wouldn't be as fast as on NVIDIA hardware but it would potentially be much faster than the CPU versions of those pieces of software.
- bootloop 6y agoIt's easier to replace the CUDA kernels with probably designed OpenCL kernels instead. Edit: For third party: Thats what the driver does, compiles OpenGL and OpenCL code into GPU machine code. In case of mesa based on reverse engineering.
- dheera 6y ago> It's easier to replace the CUDA kernels If it's your software, yes. But not if you're trying to fix an already-written framework or run other peoples' machine learning models.
- my123 6y agoWhy reverse-engineering something that is very well documented? (and hell, PTX even has GCC and LLVM backends while we are at it) The issue here is manpower, and not obfuscation in any way.
- aspaceman 6y agoIt’s a lot of work. That’s actually it with the CUDA stuff. Nvidia made a massive investment, and is still doing so, so the work got done. OpenCL just doesn’t have the same cash backing it up. Oh also this is basically what AMDs HIP does. The issue is that the project hasn’t been moving very fast.
- namibj 6y agoPrepare for loads of reverse-engineering, as there are binary-only CUDA kernels in applications. This does tend to break when new GPUs come out, but a software update takes care of that. I assume some do that for obfuscation, while others are certainly using it for performance, see e.g. https://github.com/bryancatanzaro/nervana-lib-gpu-performance-preview https://github.com/bryancatanzaro/nervana-lib-gpu-performanc... for some practical-ish examples.