Skip to content

Commit f111d39

Browse files
author
Matthew A Johnson
committed
v2.1.0 - Support for boolean tensors
Signed-off-by: Matthew A Johnson <matjoh@microsoft.com>
1 parent 310c483 commit f111d39

6 files changed

Lines changed: 35 additions & 51 deletions

File tree

‎.github/workflows/prgate.yaml‎

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,11 @@ jobs:
6666
- name: Checkout
6767
uses: actions/checkout@v4
6868

69-
- name: Git config for fetching pull requests
70-
run: |
71-
git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/*
72-
7369
- name: CMake config
7470
working-directory: ${{github.workspace}}/examples/images
7571
run: cmake -B ${{github.workspace}}/examples/images/build
7672
env:
77-
LIBNPY_REPO: https://github.com/${{github.repository}}
78-
LIBNPY_TAG: ${{github.sha}}
73+
LIBNPY_REPO: LOCAL
7974

8075
- name: CMake build
8176
working-directory: ${{github.workspace}}/examples/images/build
@@ -92,16 +87,11 @@ jobs:
9287
- name: Checkout
9388
uses: actions/checkout@v4
9489

95-
- name: Git config for fetching pull requests
96-
run: |
97-
git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/*
98-
9990
- name: CMake config
10091
working-directory: ${{github.workspace}}/examples/custom_tensors
10192
run: cmake -B ${{github.workspace}}/examples/custom_tensors/build
10293
env:
103-
LIBNPY_REPO: https://github.com/${{github.repository}}
104-
LIBNPY_TAG: ${{github.sha}}
94+
LIBNPY_REPO: LOCAL
10595

10696
- name: CMake build
10797
working-directory: ${{github.workspace}}/examples/custom_tensors/build
@@ -181,16 +171,11 @@ jobs:
181171
- name: Checkout
182172
uses: actions/checkout@v4
183173

184-
- name: Git config for fetching pull requests
185-
run: |
186-
git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/*
187-
188174
- name: CMake config
189175
working-directory: ${{github.workspace}}/examples/images
190176
run: cmake -B ${{github.workspace}}/examples/images/build
191177
env:
192-
LIBNPY_REPO: https://github.com/${{github.repository}}
193-
LIBNPY_TAG: ${{github.sha}}
178+
LIBNPY_REPO: LOCAL
194179

195180
- name: CMake build
196181
working-directory: ${{github.workspace}}/examples/images/build
@@ -207,16 +192,11 @@ jobs:
207192
- name: Checkout
208193
uses: actions/checkout@v4
209194

210-
- name: Git config for fetching pull requests
211-
run: |
212-
git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/*
213-
214195
- name: CMake config
215196
working-directory: ${{github.workspace}}/examples/custom_tensors
216197
run: cmake -B ${{github.workspace}}/examples/custom_tensors/build
217198
env:
218-
LIBNPY_REPO: https://github.com/${{github.repository}}
219-
LIBNPY_TAG: ${{github.sha}}
199+
LIBNPY_REPO: LOCAL
220200

221201
- name: CMake build
222202
working-directory: ${{github.workspace}}/examples/custom_tensors/build
@@ -266,16 +246,11 @@ jobs:
266246
- name: Checkout
267247
uses: actions/checkout@v4
268248

269-
- name: Git config for fetching pull requests
270-
run: |
271-
git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/*
272-
273249
- name: CMake config
274250
working-directory: ${{github.workspace}}/examples/images
275251
run: cmake -B ${{github.workspace}}/examples/images/build
276252
env:
277-
LIBNPY_REPO: https://github.com/${{github.repository}}
278-
LIBNPY_TAG: ${{github.sha}}
253+
LIBNPY_REPO: LOCAL
279254

280255
- name: CMake build
281256
working-directory: ${{github.workspace}}/examples/images/build
@@ -292,16 +267,11 @@ jobs:
292267
- name: Checkout
293268
uses: actions/checkout@v4
294269

295-
- name: Git config for fetching pull requests
296-
run: |
297-
git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/*
298-
299270
- name: CMake config
300271
working-directory: ${{github.workspace}}/examples/custom_tensors
301272
run: cmake -B ${{github.workspace}}/examples/custom_tensors/build
302273
env:
303-
LIBNPY_REPO: https://github.com/${{github.repository}}
304-
LIBNPY_TAG: ${{github.sha}}
274+
LIBNPY_REPO: LOCAL
305275

306276
- name: CMake build
307277
working-directory: ${{github.workspace}}/examples/custom_tensors/build
@@ -351,16 +321,11 @@ jobs:
351321
- name: Checkout
352322
uses: actions/checkout@v4
353323

354-
- name: Git config for fetching pull requests
355-
run: |
356-
git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/*
357-
358324
- name: CMake config
359325
working-directory: ${{github.workspace}}/examples/images
360326
run: cmake -B ${{github.workspace}}/examples/images/build
361327
env:
362-
LIBNPY_REPO: https://github.com/${{github.repository}}
363-
LIBNPY_TAG: ${{github.sha}}
328+
LIBNPY_REPO: LOCAL
364329

365330
- name: CMake build
366331
working-directory: ${{github.workspace}}/examples/images/build
@@ -377,16 +342,11 @@ jobs:
377342
- name: Checkout
378343
uses: actions/checkout@v4
379344

380-
- name: Git config for fetching pull requests
381-
run: |
382-
git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/*
383-
384345
- name: CMake config
385346
working-directory: ${{github.workspace}}/examples/custom_tensors
386347
run: cmake -B ${{github.workspace}}/examples/custom_tensors/build
387348
env:
388-
LIBNPY_REPO: https://github.com/${{github.repository}}
389-
LIBNPY_TAG: ${{github.sha}}
349+
LIBNPY_REPO: LOCAL
390350

391351
- name: CMake build
392352
working-directory: ${{github.workspace}}/examples/custom_tensors/build

‎CHANGELOG.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## [2026-02-11 - Version 2.1.0](https://github.com/matajoh/libnpy/releases/tag/v2.1.0)
4+
5+
Minor version adding support for boolean tensors.
6+
7+
Improvements
8+
- New `boolean` type which acts like a `bool` but is stored in vectors as a byte
9+
(instead of a bitmask, see https://cppreference.net/cpp/container/vector_bool.html)
10+
- Support for numpy boolean tensors (using the above `boolean` type)
11+
- Updating the CI to deal with intermittent failures on Github
12+
13+
Thanks!!
14+
- https://github.com/olokobayusuf for this feature suggestion and the PR
15+
316
## [2026-01-14 - Version 2.0.0](https://github.com/matajoh/libnpy/releases/tag/v2.0.0)
417

518
Major version with breaking changes.

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0
1+
2.1.0

‎examples/custom_tensors/CMakeLists.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ else ()
1919
set(LIBNPY_TAG "main")
2020
endif()
2121

22+
if(LIBNPY_REPO STREQUAL LOCAL)
23+
set(FETCHCONTENT_SOURCE_DIR_LIBNPY "${CMAKE_SOURCE_DIR}/../..")
24+
message("LIBNPY_REPO=LOCAL: Using ${FETCHCONTENT_SOURCE_DIR_LIBNPY} as source directory")
25+
endif()
26+
27+
2228
FetchContent_Declare(
2329
libnpy
2430
GIT_REPOSITORY ${LIBNPY_REPO}

‎examples/images/CMakeLists.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ else ()
1919
set(LIBNPY_TAG "main")
2020
endif()
2121

22+
if(LIBNPY_REPO STREQUAL LOCAL)
23+
set(FETCHCONTENT_SOURCE_DIR_LIBNPY "${CMAKE_SOURCE_DIR}/../..")
24+
message("LIBNPY_REPO=LOCAL: Using ${FETCHCONTENT_SOURCE_DIR_LIBNPY} as source directory")
25+
endif()
26+
2227
FetchContent_Declare(
2328
libnpy
2429
GIT_REPOSITORY ${LIBNPY_REPO}

‎include/npy/npy.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#include <vector>
3131

3232
#define NPY_VERSION_MAJOR 2
33-
#define NPY_VERSION_MINOR 0
33+
#define NPY_VERSION_MINOR 1
3434
#define NPY_VERSION_PATCH 0
35-
#define NPY_VERSION_STRING "2.0.0"
35+
#define NPY_VERSION_STRING "2.1.0"
3636

3737
const int STATIC_HEADER_LENGTH = 10;
3838

0 commit comments

Comments
 (0)