Skip to content

Commit

Permalink
Merged xmrig-cuda v6.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Mar 24, 2024
2 parents 1f147c1 + 8a700b4 commit e821970
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v6.21.1
- The binary downloads now only support the latest version of each major CUDA release.
- Improved build speed with CUDA 11.3 or higher.

# v6.21.0
- [#167](https://github.com/xmrig/xmrig-cuda/pull/167) Removed deprecated AstroBWTv1 and v2.
- [#176](https://github.com/xmrig/xmrig-cuda/pull/176) Added CUDA 12 support.
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(xmrig-cuda)
include(cmake/CUDA-Version.cmake)

Expand Down
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# xmrig-cuda
This repository is NVIDIA CUDA plugin for XMRig miner v4.5+ and it adds support for NVIDIA GPUs in XMRig miner.
This repository contains the CUDA plugin for the XMRig miner, which provides support for NVIDIA GPUs.

Main reasons why this plugin is separated project is:
1. CUDA support is optional, not all users need it, but it is very heavy.
2. CUDA has very strict compiler version requirements, it may conflicts with CPU mining code, for example now possible build the miner with gcc on Windows (CUDA works only with MSVC).
This plugin is a separate project because of the main reasons listed below:
1. Not all users require CUDA support, and it is an optional feature.
2. CUDA has strict compiler version requirements that may conflict with the CPU mining code. For example, CUDA doesn't support GCC on Windows.


## Windows usage
## Windows

* [Download](https://github.com/xmrig/xmrig-cuda/releases) plugin, you must choose CUDA version, usually it recent version (CUDA 10.1), but builds with older CUDA version also provided, alternative you can build the plugin from source (requiring GCC 9).
* To [download](https://github.com/MoneroOcean/xmrig-cuda/releases) the plugin, you must choose the appropriate CUDA version. Generally, the latest version (12.4) is all you need, unless you have very old GPUs. Windows builds are available for every major CUDA release. Alternatively, you can [build](https://xmrig.com/docs/miner/build/windows) the plugin from the source.
* Place **`xmrig-cuda.dll`** and other dll files near to **`xmrig.exe`**.
* Edit **`config.json`** to enable CUDA support.
* Edit **`config.json`** enable the plugin.
```
{
...
Expand All @@ -22,7 +22,7 @@ Main reasons why this plugin is separated project is:
}
```
### Advanced
Path to plugin can be specified via `loader` option:
You can specify the path to the plugin using the `loader` option.
```
{
...
Expand All @@ -34,7 +34,10 @@ Path to plugin can be specified via `loader` option:
...
}
```
Due of restrictions of JSON format directory separator must be written in Linux style `/` or escaped `\\`.
Due to JSON format restrictions, the directory separator must be written in Linux style `/` or escaped `\\`.

## Linux usage
Linux usage almost same with Windows expept we don't provide binaries and you must build the plugin form source and name of plugin is different **`libxmrig-cuda.so`**.
## Linux
Linux usage is almost the same as Windows except we don't provide binaries and you must build the plugin from the source and the name of the plugin is different **`libxmrig-cuda.so`**.

## macOS
CUDA no longer supports macOS, which means that the plugin also does not support it.
4 changes: 4 additions & 0 deletions cmake/CUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ elseif("${CUDA_COMPILER}" STREQUAL "nvcc")

set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Wno-deprecated-gpu-targets")

if (NOT CUDA_VERSION VERSION_LESS 11.3)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "--threads 0")
endif()

foreach(CUDA_ARCH_ELEM ${CUDA_ARCH})
# set flags to create device code for the given architecture
if("${CUDA_ARCH_ELEM}" STREQUAL "21")
Expand Down
4 changes: 2 additions & 2 deletions cmake/flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)

elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)

set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE "/MP /MT /O2 /Ob2 /DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "/MP /MT /O2 /Ob2 /DNDEBUG")
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
add_definitions(/D_CRT_NONSTDC_NO_WARNINGS)
add_definitions(/DNOMINMAX)
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#define APP_ID "xmrig-cuda"
#define APP_NAME "XMRig"
#define APP_DESC "XMRig CUDA plugin"
#define APP_VERSION "6.21.0-mo1"
#define APP_VERSION "6.21.1-mo1"
#define APP_DOMAIN "xmrig.com"
#define APP_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"

#define APP_VER_MAJOR 6
#define APP_VER_MINOR 21
#define APP_VER_PATCH 0
#define APP_VER_PATCH 1

#define API_VERSION 4

Expand Down

0 comments on commit e821970

Please sign in to comment.