-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clRNG #3236
Merged
Merged
Add clRNG #3236
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
mkdir build_release | ||
cd build_release | ||
|
||
if "%ARCH%" == "64" ( | ||
set BUILD64=ON | ||
) else ( | ||
set BUILD64=OFF | ||
) | ||
|
||
cmake ^ | ||
-G "NMake Makefiles" ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^ | ||
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ | ||
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY="%LIBRARY_LIB%" ^ | ||
-DBUILD64="%BUILD64%" ^ | ||
-DSUFFIX_BIN="" ^ | ||
-DSUFFIX_LIB="" ^ | ||
-DBUILD_TEST=OFF ^ | ||
-DBUILD_CLIENT=OFF ^ | ||
-DOPENCL_ROOT="%LIBRARY_PREFIX%" ^ | ||
"%SRC_DIR%\src" | ||
nmake | ||
nmake install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
mkdir build_release | ||
cd build_release | ||
|
||
|
||
OPENCL_ROOT_FLAG="-DOPENCL_ROOT=${PREFIX}" | ||
if [[ "`uname`" == "Darwin" ]] && [[ "${OSX_VARIANT}" == "native" ]] | ||
then | ||
OPENCL_ROOT_FLAG=""; | ||
fi | ||
|
||
cmake \ | ||
-G "Unix Makefiles" \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_PREFIX_PATH="${PREFIX}" \ | ||
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \ | ||
-DSUFFIX_BIN="" \ | ||
-DSUFFIX_LIB="" \ | ||
-DBUILD_TEST=0 \ | ||
-DBUILD_CLIENT=0 \ | ||
"${OPENCL_ROOT_FLAG}" \ | ||
"${SRC_DIR}/src" | ||
make | ||
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{% set name = "clRNG" %} | ||
{% set version = "1.0.0-beta" %} | ||
{% set sha256 = "12e46c89a577ea26ea8af2b11176b1c503c2b0a28a3766178f317f21f27324f4" %} | ||
|
||
{% set OSX_VARIANT = os.environ.get("OSX_VARIANT", "native") %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version.replace("-", "").replace("beta", "b") }} | ||
|
||
source: | ||
fn: {{ name }}-{{ version }}.tar.gz | ||
url: https://github.com/clMathLibraries/{{ name }}/archive/v{{ version }}.tar.gz | ||
sha256: {{ sha256 }} | ||
|
||
build: | ||
number: 0 | ||
script_env: | ||
- OSX_VARIANT | ||
|
||
{% if OSX_VARIANT != "native" %} | ||
skip: True # [not osx] | ||
{% else %} | ||
############################################################# | ||
# Skip Visual Studio 2015 32-bit builds due to a bug. # | ||
# # | ||
# xref: https://github.com/clMathLibraries/clRNG/issues/11 # | ||
############################################################# | ||
skip: True # [(win and py35) or (win32 and py36)] | ||
{% endif %} | ||
|
||
features: | ||
{% if OSX_VARIANT == "pocl" %} | ||
- osx_pocl_opencl # [osx] | ||
{% endif %} | ||
- vc9 # [win and py27] | ||
- vc10 # [win and py34] | ||
- vc14 # [win and py35] | ||
- vc14 # [win and py36] | ||
|
||
requirements: | ||
build: | ||
- toolchain | ||
- python # [win] | ||
- msinttypes # [win and py<35] | ||
- cmake | ||
- ocl-icd # [linux] | ||
- khronos-opencl-icd-loader # [win] | ||
{% if OSX_VARIANT == "pocl" %} | ||
- osx-pocl-opencl # [osx] | ||
- pocl >=0.14 # [unix] | ||
{% endif %} | ||
|
||
run: | ||
- khronos-opencl-icd-loader # [win] | ||
- ocl-icd # [linux] | ||
{% if OSX_VARIANT == "pocl" %} | ||
- osx-pocl-opencl # [osx] | ||
- pocl >=0.14 # [unix] | ||
{% endif %} | ||
|
||
test: | ||
requires: | ||
- python {{ environ['PY_VER'] + '*' }} # [win] | ||
|
||
commands: | ||
# Check files | ||
- test -f "${PREFIX}/include/clRNG.h" # [unix] | ||
- test -f "${PREFIX}/lib/libclRNG.so" # [linux] | ||
- test -f "${PREFIX}/lib/libclRNG.dylib" # [osx] | ||
- if not exist %LIBRARY_INC%\\clRNG.h exit 1 # [win] | ||
- if not exist %LIBRARY_BIN%\\clRNG.dll exit 1 # [win] | ||
- if not exist %LIBRARY_LIB%\\clRNG.lib exit 1 # [win] | ||
|
||
about: | ||
home: https://github.com/clMathLibraries/{{ name }} | ||
license: BSD 3-Clause | ||
license_file: LICENSE | ||
summary: A library for uniform random number generation in OpenCL | ||
|
||
extra: | ||
recipe-maintainers: | ||
- jakirkham |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping Python 3.5 as Python 3.5 and Python 3.6 use the same VC runtime version. So either will work for our purposes here. This is typical.
What is worth noting is that VS 2015 32-bit builds fail. This log demonstrates the build failure. An issue has already been raised about this upstream. ( clMathLibraries/clRNG#11 ) As there doesn't seem to be a patch we can use to fix this, we merely disable those builds. VS 2015 64-bit builds seem to build fine.