-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24851 from isuruf/ensmallen_graph
Ensmallen graph
- Loading branch information
Showing
6 changed files
with
146 additions
and
0 deletions.
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
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,26 @@ | ||
From 53b57c79a209cd3ce3cd486f0a5864d27f3f6f0e Mon Sep 17 00:00:00 2001 | ||
From: Isuru Fernando <[email protected]> | ||
Date: Fri, 5 Jan 2024 17:23:52 +0530 | ||
Subject: [PATCH] No zig | ||
|
||
--- | ||
bindings/python/build.py | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/bindings/python/build.py b/bindings/python/build.py | ||
index 12c3ae73..73bf2840 100644 | ||
--- a/bindings/python/build.py | ||
+++ b/bindings/python/build.py | ||
@@ -117,6 +117,9 @@ def compile_target(target_name, target_settings, WHEELS_FOLDER, settings): | ||
"CFLAGS": "-stdlib=libc++" | ||
} | ||
|
||
+ zig = "" | ||
+ env = {} | ||
+ | ||
env["RUSTFLAGS"] = env.get("RUST_FLAGS", "") + " " + rust_flags | ||
|
||
environment = os.environ.copy() | ||
-- | ||
2.42.0 | ||
|
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,41 @@ | ||
From ff396cead32151e3013d6f05124c0602ce8b3e9c Mon Sep 17 00:00:00 2001 | ||
From: Isuru Fernando <[email protected]> | ||
Date: Thu, 18 Jan 2024 08:15:56 -0600 | ||
Subject: [PATCH] Use thin lto | ||
|
||
When fat lto is used, the compiler takes too much memory and the OS | ||
kills rustc. Thanks to @mbargull for the tip. | ||
--- | ||
bindings/python/Cargo.toml | 2 +- | ||
graph/Cargo.toml | 2 +- | ||
2 files changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml | ||
index 8efa26b4..c241c6c4 100644 | ||
--- a/bindings/python/Cargo.toml | ||
+++ b/bindings/python/Cargo.toml | ||
@@ -60,7 +60,7 @@ opt-level = 3 | ||
# time. | ||
# Perform "fat" LTO which attempts to perform optimizations across all crates | ||
# within the dependency graph | ||
-lto = "fat" | ||
+lto = "thin" | ||
|
||
# When a crate is split into multiple codegen units, LLVM is able to process | ||
# them in parallel. Increasing parallelism may speed up compile times, but may | ||
diff --git a/graph/Cargo.toml b/graph/Cargo.toml | ||
index bd43fe40..345662b9 100644 | ||
--- a/graph/Cargo.toml | ||
+++ b/graph/Cargo.toml | ||
@@ -73,7 +73,7 @@ windows = { version = "0.32.0", features = ["alloc", "Win32_System_Memory", "Wi | ||
|
||
[profile.release] | ||
opt-level = 3 | ||
-lto = "fat" | ||
+lto = "thin" | ||
overflow-checks = false # Disable integer overflow checks. | ||
debug = false # Include debug info. | ||
debug-assertions = false # Enables debug assertions. | ||
-- | ||
2.42.0 | ||
|
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,3 @@ | ||
azure: | ||
settings_linux: | ||
swapfile_size: "10GiB" |
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,2 @@ | ||
channel_sources: | ||
- conda-forge/label/rust_dev,conda-forge |
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,67 @@ | ||
{% set version = "0.8.96" %} | ||
|
||
package: | ||
name: ensmallen_graph | ||
version: {{ version }} | ||
|
||
source: | ||
# There's no github tag, but this is the commit used for PyPI publishing | ||
# See https://github.com/AnacletoLAB/ensmallen/issues/226 | ||
url: https://github.com/AnacletoLAB/ensmallen/archive/b2492e02dfdb9a7a10ca087d53b3207aadca3b9c.tar.gz | ||
sha256: 044e1ac0cd53f1ec39744f7984a341e27a6c7a80850e3d23934ff2a41e8159c4 | ||
patches: | ||
- 0001-No-zig.patch | ||
- 0001-Use-thin-lto.patch | ||
|
||
build: | ||
script: | ||
- cd bindings/python | ||
- cargo-bundle-licenses --format yaml --output ${SRC_DIR}/THIRDPARTY.yml | ||
- {{ PYTHON }} ./build.py --skip-repair | ||
- {{ PYTHON }} -m pip install wheels/*.whl | ||
number: 0 | ||
skip: True # [not linux64] | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
- {{ compiler('rust') }} | ||
- cargo-bundle-licenses | ||
host: | ||
- python | ||
- maturin | ||
- pip | ||
run: | ||
- python | ||
- toml >=0.10.0 | ||
- downloaders >=1.0.15 | ||
- compress_json >=1.0.7 | ||
- userinput >=1.0.19 | ||
- cache_decorator >=2.1.11 | ||
- bioregistry >=0.5.65 | ||
- tqdm | ||
- pandas | ||
- py-cpuinfo | ||
- environments_utils >=1.0.13 | ||
|
||
test: | ||
imports: | ||
- ensmallen | ||
commands: | ||
- pip check | ||
requires: | ||
- pip | ||
|
||
about: | ||
home: https://github.com/AnacletoLAB/ensmallen | ||
summary: Ensmallen is the Rust/Python high-performance graph processing submodule of the GRAPE library. | ||
license: MIT | ||
license_file: | ||
- LICENSE | ||
- THIRDPARTY.yml | ||
|
||
extra: | ||
recipe-maintainers: | ||
- isuruf | ||
- dillonroach |