Giter Site home page Giter Site logo

fastmerkle's People

Contributors

jonasfranz avatar leonardoinf avatar shilch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fastmerkle's Issues

CL_MEM_OBJECT_ALLOCATION_FAILURE on Nvidia GTX1070

I had to change merkle input argument types in merkle.cl

diff --git a/merkle.cl b/merkle.cl
index af4de86..f47b2da 100644
--- a/merkle.cl
+++ b/merkle.cl
@@ -233,7 +233,7 @@ static void sha256d_cat(global const uint* lhs, global const uint* rhs, global u

 #define EQUAL(lhs, rhs) (lhs[0] == rhs[0] && lhs[1] == rhs[1] && lhs[2] == rhs[2] && lhs[3] == rhs[3] && lhs[4] == rhs[4] && lhs[5] == rhs[5] && lhs[6] == rhs[6] && lhs[7] == rhs[7])

-kernel void merkle(global const uchar* data, const size_t leaves, const size_t round, global int* mutated){
+kernel void merkle(global const uchar* data, const ulong leaves, const ulong round, global int* mutated){
     size_t id = get_global_id(0);
     size_t size = get_global_size(0);

to be able to even start on GTX1070, because size_t is apparently restricted type from input arguments. ulong is required instead of uint because of CL_INVALID_ARG_SIZE error.

Unfortunately, this fix only partially helps (btw - still works for integrated GPU on my Intel CPU), because on 8388608 leaves I'm getting CL_MEM_OBJECT_ALLOCATION_FAILURE error. I'm guessing that some other values/data types should also be changed to ulong, but I'm not an expert in OpenCL and not sure what else should be changed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.