From 375cb2048ed9c9c0347cab447e952d9a756d643a Mon Sep 17 00:00:00 2001 From: Lijun Zhu Date: Mon, 6 Jan 2025 19:57:58 -0800 Subject: [PATCH 1/6] add pbcuda --- recipes/pbcuda/meta.yaml | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 recipes/pbcuda/meta.yaml diff --git a/recipes/pbcuda/meta.yaml b/recipes/pbcuda/meta.yaml new file mode 100644 index 0000000000000..4d60fc0793a8e --- /dev/null +++ b/recipes/pbcuda/meta.yaml @@ -0,0 +1,61 @@ +{% set version = "0.1.0" %} + +package: + name: pbcuda + version: {{ version }} + +source: + url: https://github.com/lijun99/pbcuda/archive/refs/tags/v{{ version }}.tar.gz + sha256: 97c02ffa7a5e2b9b572d11c8fd929f8ca151e696e68786617642cef7b2898a51 + +build: + script: | + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DPYTHON_EXECUTABLE=$PYTHON + cmake --build . --target install + number: 0 + skip: true # [cuda_compiler_version == "None" or osx or win] + ignore_run_exports_from: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + +requirements: + build: + - cmake + - make + - pybind11 + - {{ stdlib('c') }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} + + host: + - python + - pybind11 + - cuda-version {{ cuda_compiler_version }} + + run: + - python + +test: + imports: + - pbcuda + commands: + - python -c "import pbcuda" + +about: + home: https://github.com/lijun99/pbcuda + summary: 'A Python Interface to CUDA with pybind11' + description: | + pbcuda - a Python interface to CUDA libraries and routines using pybind11. + It simplifies hybrid Python/C++/CUDA development by providing seamless bindings + to CUDA functionalities, enabling efficient and flexible development workflows + for high-performance computing and GPU-accelerated applications. + license: MIT + license_family: MIT + license_file: LICENSE + +extra: + recipe-maintainers: + - lijun99 From b94495ab48c1136563a265328695919f6b7c4089 Mon Sep 17 00:00:00 2001 From: Lijun Zhu Date: Mon, 6 Jan 2025 20:22:29 -0800 Subject: [PATCH 2/6] pbcuda: try to fix the PYTHON env var --- recipes/pbcuda/meta.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/pbcuda/meta.yaml b/recipes/pbcuda/meta.yaml index 4d60fc0793a8e..82bb77a77bbac 100644 --- a/recipes/pbcuda/meta.yaml +++ b/recipes/pbcuda/meta.yaml @@ -12,7 +12,7 @@ build: script: | mkdir build cd build - cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DPYTHON_EXECUTABLE=$PYTHON + cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX cmake --build . --target install number: 0 skip: true # [cuda_compiler_version == "None" or osx or win] @@ -25,6 +25,7 @@ requirements: - cmake - make - pybind11 + - python - {{ stdlib('c') }} - {{ compiler('c') }} - {{ compiler('cxx') }} @@ -33,7 +34,7 @@ requirements: host: - python - pybind11 - - cuda-version {{ cuda_compiler_version }} + - cuda-version {{ cuda_compiler_version | default("12.6") }} run: - python @@ -42,7 +43,7 @@ test: imports: - pbcuda commands: - - python -c "import pbcuda" + - {{ PYTHON }} -c "import pbcuda" about: home: https://github.com/lijun99/pbcuda From 82de0f6bdcbd0fba9fb04898cf31e25b0ba92ce3 Mon Sep 17 00:00:00 2001 From: Lijun Zhu Date: Mon, 6 Jan 2025 20:58:35 -0800 Subject: [PATCH 3/6] pbcuda: try to use skbuild for the empty package issue --- recipes/pbcuda/meta.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/recipes/pbcuda/meta.yaml b/recipes/pbcuda/meta.yaml index 82bb77a77bbac..5bff7df913ae9 100644 --- a/recipes/pbcuda/meta.yaml +++ b/recipes/pbcuda/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "0.1.0" %} +{% set version = "0.1.1" %} package: name: pbcuda @@ -6,14 +6,10 @@ package: source: url: https://github.com/lijun99/pbcuda/archive/refs/tags/v{{ version }}.tar.gz - sha256: 97c02ffa7a5e2b9b572d11c8fd929f8ca151e696e68786617642cef7b2898a51 + sha256: 64666f453553f8e90a951d4b22db07a87deb8671a7d9c6bef3f7f2c533f49350 build: - script: | - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX - cmake --build . --target install + script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv" number: 0 skip: true # [cuda_compiler_version == "None" or osx or win] ignore_run_exports_from: @@ -25,7 +21,8 @@ requirements: - cmake - make - pybind11 - - python + - ninja + - scikit-build - {{ stdlib('c') }} - {{ compiler('c') }} - {{ compiler('cxx') }} @@ -34,6 +31,7 @@ requirements: host: - python - pybind11 + - pip - cuda-version {{ cuda_compiler_version | default("12.6") }} run: @@ -43,7 +41,7 @@ test: imports: - pbcuda commands: - - {{ PYTHON }} -c "import pbcuda" + - python -c "import pbcuda; print('Success')" about: home: https://github.com/lijun99/pbcuda From 86198ed83fc2053b27648efde46f987c6fd8ee14 Mon Sep 17 00:00:00 2001 From: Lijun Zhu Date: Mon, 6 Jan 2025 21:16:34 -0800 Subject: [PATCH 4/6] pbcuda: fix skbuild requirement --- recipes/pbcuda/meta.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/pbcuda/meta.yaml b/recipes/pbcuda/meta.yaml index 5bff7df913ae9..d4c5912ebc0a7 100644 --- a/recipes/pbcuda/meta.yaml +++ b/recipes/pbcuda/meta.yaml @@ -22,7 +22,6 @@ requirements: - make - pybind11 - ninja - - scikit-build - {{ stdlib('c') }} - {{ compiler('c') }} - {{ compiler('cxx') }} @@ -32,10 +31,13 @@ requirements: - python - pybind11 - pip - - cuda-version {{ cuda_compiler_version | default("12.6") }} + - setuptools + - scikit-build + - cuda-version {{ cuda_compiler_version }} run: - python + - cuda-version {{ cuda_compiler_version }} test: imports: From f9a6ac5cad213bb867ca3741a78c89d534c9354a Mon Sep 17 00:00:00 2001 From: Lijun Zhu Date: Mon, 6 Jan 2025 21:35:11 -0800 Subject: [PATCH 5/6] pbcuda: try to fix overlinking --- recipes/pbcuda/meta.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/pbcuda/meta.yaml b/recipes/pbcuda/meta.yaml index d4c5912ebc0a7..6008635fc0b08 100644 --- a/recipes/pbcuda/meta.yaml +++ b/recipes/pbcuda/meta.yaml @@ -12,9 +12,6 @@ build: script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv" number: 0 skip: true # [cuda_compiler_version == "None" or osx or win] - ignore_run_exports_from: - - {{ compiler('c') }} - - {{ compiler('cxx') }} requirements: build: @@ -37,7 +34,6 @@ requirements: run: - python - - cuda-version {{ cuda_compiler_version }} test: imports: From 845106690135a3c43371ac319dbdbca196ba43c9 Mon Sep 17 00:00:00 2001 From: Lijun Zhu Date: Mon, 6 Jan 2025 22:32:41 -0800 Subject: [PATCH 6/6] pbcuda: modify cmake and setup.py to fix the install path --- recipes/pbcuda/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/pbcuda/meta.yaml b/recipes/pbcuda/meta.yaml index 6008635fc0b08..855ec96acdad5 100644 --- a/recipes/pbcuda/meta.yaml +++ b/recipes/pbcuda/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "0.1.1" %} +{% set version = "0.1.2" %} package: name: pbcuda @@ -6,7 +6,7 @@ package: source: url: https://github.com/lijun99/pbcuda/archive/refs/tags/v{{ version }}.tar.gz - sha256: 64666f453553f8e90a951d4b22db07a87deb8671a7d9c6bef3f7f2c533f49350 + sha256: 72efca5ea46a1ec4877b52eac3d1b55ba07acfca1935285a34b3749e626bbd6f build: script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv"