diff options
| author | ruki <waruqi@gmail.com> | 2019-06-02 20:12:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-02 20:12:58 +0800 |
| commit | b910c53c312dbed5ec7d6c680f8a6ca1fd56d537 (patch) | |
| tree | df6b5867ea6e2a8ee9e66914a85103f2f7b21c95 /manual.md | |
| parent | 57095aa985ac1526240563ae1845e360c81db708 (diff) | |
| parent | 94f53689aa201025bd7e384197320dcf0889c022 (diff) | |
| download | xmake-docs-b910c53c312dbed5ec7d6c680f8a6ca1fd56d537.tar.gz xmake-docs-b910c53c312dbed5ec7d6c680f8a6ca1fd56d537.zip | |
Merge pull request #6 from OpportunityLiu/cuda-doc
add docs for find_cudadevices; improve docs for cuda templates
Diffstat (limited to 'manual.md')
| -rw-r--r-- | manual.md | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -7549,6 +7549,7 @@ The interface of this module is spread across multiple module directories, try t | [detect.find_package](#detect-find_package) | Find package files, including library files and search paths | >= 2.1.5 | | [detect.find_tool](#detect-find_tool) | Find Tool | >= 2.1.5 | | [detect.find_toolname](#detect-find_toolname) | Find Tool Name | >= 2.1.5 | +| [detect.find_cudadevices](#detect-find_cudadevices) | Find CUDA devices of the host | >= 2.2.7 | | [detect.features](#detect-features) | Get all the features of the specified tool | >= 2.1.5 | | [detect.has_features](#detect-has_features) | Determine if the specified feature is supported | >= 2.1.5 | | [detect.has_flags](#detect-has_flags) | Determine if the specified parameter options are supported | >= 2.1.5 | @@ -8113,6 +8114,24 @@ example: Compared with program, toolname can uniquely mark a tool, and it is also convenient to find and load the corresponding script `find_xxx.lua`. +###### detect.find_cudadevices + +- Find CUDA devices of the host + +Enumerate CUDA devices through the CUDA Runtime API and query theirs properties. + +```lua +import("lib.detect.find_cudadevices") + +local devices = find_cudadevices({ skip_compute_mode_prohibited = true }) +local devices = find_cudadevices({ min_sm_arch = 35, order_by_flops = true }) +``` + +The result returned is: `{ { ['$id'] = 0, name = "GeForce GTX 960M", major = 5, minor = 0, ... }, ... }` + +The included properties will vary depending on the current CUDA version. +Please refer to [CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/cuda-runtime-api/structcudaDeviceProp.html#structcudaDeviceProp) and its historical version for more information. + ###### detect.features - Get all the features of the specified tool |
