Skip to content

Commit

Permalink
Merge xmrig-cuda v6.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Oct 3, 2020
2 parents e20b759 + 43dca99 commit 064fe3f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v6.3.2
- [#65](https://github.com/xmrig/xmrig-cuda/pull/65) Fixed broken AstroBWT.

# v6.3.1
- [#62](https://github.com/xmrig/xmrig-cuda/pull/62) Fixed broken RandomX (regression since v6.2.1).

# v6.3.0
- [#59](https://github.com/xmrig/xmrig-cuda/pull/59) Added support for upcoming Haven offshore fork.
- Fixed build with recent CUDA 11.
Expand Down
1 change: 1 addition & 0 deletions src/cryptonight.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ void cryptonight_extra_cpu_prepare(nvid_ctx *ctx, uint32_t startNonce, const xmr
void cryptonight_gpu_hash(nvid_ctx *ctx, const xmrig::Algorithm &algorithm, uint64_t height, uint32_t startNonce);
void cryptonight_extra_cpu_final(nvid_ctx *ctx, uint32_t startNonce, uint64_t target, uint32_t *rescount, uint32_t *resnonce, const xmrig::Algorithm &algorithm);

void cuda_extra_cpu_set_data(nvid_ctx *ctx, const void *data, size_t len);
void randomx_prepare(nvid_ctx *ctx, const void *dataset, size_t dataset_size, uint32_t batch_size);

namespace RandomX_Arqma { void hash(nvid_ctx *ctx, uint32_t nonce, uint64_t target, uint32_t *rescount, uint32_t *resnonce, uint32_t batch_size); }
Expand Down
7 changes: 7 additions & 0 deletions src/cuda_extra.cu
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@ void cryptonight_extra_cpu_set_data(nvid_ctx *ctx, const void *data, size_t len)
}


void cuda_extra_cpu_set_data(nvid_ctx *ctx, const void *data, size_t len)
{
ctx->inputlen = static_cast<unsigned int>(len);
CUDA_CHECK(ctx->device_id, cudaMemcpy(ctx->d_input, data, len, cudaMemcpyHostToDevice));
}


int cryptonight_extra_cpu_init(nvid_ctx *ctx, const xmrig::Algorithm &algorithm, size_t hashMemSize)
{
using namespace xmrig;
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
#define APP_ID "xmrig-cuda"
#define APP_NAME "XMRig"
#define APP_DESC "XMRig CUDA plugin"
#define APP_VERSION "6.3.0-mo1"
#define APP_VERSION "6.3.2-mo1"
#define APP_DOMAIN "xmrig.com"
#define APP_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com"

#define APP_VER_MAJOR 6
#define APP_VER_MINOR 3
#define APP_VER_PATCH 0
#define APP_VER_PATCH 2

#define API_VERSION 3

Expand Down
18 changes: 16 additions & 2 deletions src/xmrig-cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,14 @@ bool setJob_v2(nvid_ctx *ctx, const void *data, size_t size, const char *algo)
}

try {
cryptonight_extra_cpu_set_data(ctx, data, size);
const xmrig::Algorithm::Family f = xmrig::Algorithm::family(ctx->algorithm);

if ((f == xmrig::Algorithm::RANDOM_X) || (f == xmrig::Algorithm::ASTROBWT)) {
cuda_extra_cpu_set_data(ctx, data, size);
}
else {
cryptonight_extra_cpu_set_data(ctx, data, size);
}
}
catch (std::exception &ex) {
saveError(ctx->device_id, ex);
Expand All @@ -407,7 +414,14 @@ bool setJob(nvid_ctx *ctx, const void *data, size_t size, int32_t algo)
ctx->algorithm = algo;

try {
cryptonight_extra_cpu_set_data(ctx, data, size);
const xmrig::Algorithm::Family f = xmrig::Algorithm::family(ctx->algorithm);

if ((f == xmrig::Algorithm::RANDOM_X) || (f == xmrig::Algorithm::ASTROBWT)) {
cuda_extra_cpu_set_data(ctx, data, size);
}
else {
cryptonight_extra_cpu_set_data(ctx, data, size);
}
}
catch (std::exception &ex) {
saveError(ctx->device_id, ex);
Expand Down

0 comments on commit 064fe3f

Please sign in to comment.