Skip to content
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

update v2.0-pre #953

Merged
merged 65 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
9ac1e78
Update doc URL. (#821)
csukuangfj Sep 8, 2021
bbe0ded
Support indexing 2-axes RaggedTensor, Support slicing for RaggedTenso…
pkufool Sep 14, 2021
2c28070
Prune with max_arcs in IntersectDense (#820)
pkufool Sep 14, 2021
210175c
Release v1.8
pkufool Sep 14, 2021
33a212c
Create a ragged tensor from a regular tensor. (#827)
csukuangfj Sep 15, 2021
971af7d
Trigger GitHub actions manually. (#829)
csukuangfj Sep 16, 2021
646704e
Run GitHub actions on merging. (#830)
csukuangfj Sep 16, 2021
8030001
Support printing ragged tensors in a more compact way. (#831)
csukuangfj Sep 17, 2021
d73a5b5
Add levenshtein alignment (#828)
pkufool Sep 19, 2021
f2fd997
Release v1.9
pkufool Sep 19, 2021
601d663
Support a[b[i]] where both a and b are ragged tensors. (#833)
csukuangfj Sep 25, 2021
8694fee
Display import error solution message on MacOS (#837)
pzelasko Sep 30, 2021
86e5479
Fix installation doc. (#841)
csukuangfj Oct 8, 2021
b72589c
fix typos in the install instructions (#844)
jtrmal Oct 13, 2021
6ac9795
make cmake adhere to the modernized way of finding packages outside d…
jtrmal Oct 13, 2021
2537a3f
import torch first in the smoke tests to preven SEGFAULT (#846)
jtrmal Oct 14, 2021
cae610a
Add doc about how to install a CPU version of k2. (#850)
csukuangfj Oct 23, 2021
d061bc6
Support PyTorch 1.10. (#851)
csukuangfj Oct 24, 2021
7178d67
Fix test cases for k2.union() (#853)
csukuangfj Oct 26, 2021
e6db5dc
Fix out-of-boundary access (read). (#859)
csukuangfj Nov 2, 2021
e8c589a
Update all the example codes in the docs (#861)
luomingshuang Nov 4, 2021
fd5565d
Fix compilation errors with CUB 1.15. (#865)
csukuangfj Nov 10, 2021
bdcaaf8
Update README. (#873)
csukuangfj Nov 12, 2021
31e1307
Fix ctc graph (make aux_labels of final arcs -1) (#877)
pkufool Nov 19, 2021
12f5915
Fix LICENSE location to k2 folder (#880)
lumaku Nov 24, 2021
a0d75c8
Release v1.11. (#881)
csukuangfj Nov 29, 2021
2cb3eea
Update documentation for hash.h (#887)
danpovey Dec 5, 2021
aab2dd7
Wrap MonotonicLowerBound (#883)
pkufool Dec 14, 2021
5517b3e
Remove extra commas after 'TOPSORTED' properity and fix RaggedTensor …
drawfish Dec 25, 2021
5f4cc79
Fix small typos (#896)
danpovey Jan 6, 2022
e799928
Fix k2.ragged.create_ragged_shape2 (#901)
csukuangfj Jan 13, 2022
d6323d5
Add rnnt loss (#891)
pkufool Jan 17, 2022
d3fbb1b
Use more efficient way to fix boundaries (#906)
pkufool Jan 25, 2022
9a91ec6
Release v1.12 (#907)
pkufool Jan 25, 2022
3367c7f
Change the sign of the rnnt_loss and add reduction argument (#911)
pkufool Jan 29, 2022
779a9bd
Fix building doc. (#908)
csukuangfj Jan 29, 2022
47c4b75
Fix building doc (#912)
pkufool Jan 29, 2022
cf32e2d
Support torch 1.10.x (#914)
csukuangfj Feb 8, 2022
9e7b2a9
Update INSTALL.rst (#915)
alexei-v-ivanov Feb 8, 2022
43ed450
Fix torch/cuda/python versions in the doc. (#918)
csukuangfj Feb 10, 2022
f4fefe4
Fix building for CUDA 11.6 (#917)
csukuangfj Feb 10, 2022
56edc82
Implement Unstack (#920)
pkufool Feb 20, 2022
854b792
SubsetRagged & PruneRagged (#919)
pkufool Feb 20, 2022
3cc74f1
Add Hash64 (#895)
pkufool Feb 22, 2022
0feefc7
Modified rnnt (#902)
pkufool Feb 25, 2022
2239c39
Fix Stack (#925)
wgb14 Feb 25, 2022
5ee082e
Fix 'TypeError' of rnnt_loss_pruned function. (#924)
drawfish Feb 27, 2022
36e2b8d
Support torch 1.11.0 and CUDA 11.5 (#931)
csukuangfj Mar 15, 2022
f4b4247
Implement Rnnt decoding (#926)
pkufool Mar 16, 2022
9a0d72c
fix building docs (#933)
pkufool Mar 16, 2022
6833270
Release v1.14
pkufool Mar 16, 2022
613e03d
Remove unused DiscountedCumSum. (#936)
csukuangfj Mar 17, 2022
281378f
Fix compiler warnings. (#937)
csukuangfj Mar 17, 2022
10b9423
Minor fixes for RNN-T decoding. (#938)
csukuangfj Mar 19, 2022
846c39c
Removes arcs with label 0 from the TrivialGraph. (#939)
csukuangfj Mar 29, 2022
0f65420
Implement linear_fsa_with_self_loops. (#940)
csukuangfj Mar 29, 2022
a830c60
Fix the pruning with max-states (#941)
pkufool Mar 30, 2022
8c28c86
Rnnt allow different encoder/decoder dims (#945)
danpovey Apr 3, 2022
d977865
Supporting building k2 on Windows (#946)
csukuangfj Apr 6, 2022
a4d76d2
Fix nightly windows CPU build (#948)
csukuangfj Apr 7, 2022
4fb6b88
Check the versions of PyTorch and CUDA at the import time. (#949)
csukuangfj Apr 8, 2022
9ebd757
More straightforward message when CUDA support is missing (#950)
nshmyrev Apr 11, 2022
3b83183
Implement ArrayOfRagged (#927)
LvHang Apr 12, 2022
1b29f0a
Fix precision (#951)
pkufool Apr 13, 2022
93d528a
Merge branch 'master' into v2.0
pkufool Apr 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Supporting building k2 on Windows (#946)
  • Loading branch information
csukuangfj authored Apr 6, 2022
commit d9778653fab7a3a121463174c1816a270a3d14f2
117 changes: 117 additions & 0 deletions .github/workflows/build-conda-cpu-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)

# See ../../LICENSE for clarification regarding multiple authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# refer to https://github.com/actions/starter-workflows/pull/47/files


# Note, we have to set
#
# export DYLD_LIBRARY_PATH=$CONDA_PREFIX/lib/python3.8/site-packages:$DYLD_LIBRARY_PATH
#
# before running `python3 -m k2.version`
#
# See https://github.com/openPMD/openPMD-api/issues/593#issuecomment-552690470


name: build_conda_cpu_macos

on:
push:
tags:
- '*'

env:
K2_BUILD_TYPE: Release

jobs:
generate_build_matrix:
# see https://github.com/pytorch/pytorch/pull/50633
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generating build matrix
id: set-matrix
run: |
# outputting for debugging purposes
python scripts/github_actions/generate_build_matrix.py
MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
echo "::set-output name=matrix::${MATRIX}"

build_conda_cpu_macos:
needs: generate_build_matrix
runs-on: macos-10.15
strategy:
fail-fast: false
matrix:
${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}

steps:
# refer to https://github.com/actions/checkout
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: k2

- name: Display Python version
shell: bash -l {0}
run: |
python3 -c "import sys; print(sys.version)"
which python3

- name: Install conda dependencies
shell: bash -l {0}
run: |
conda install -y -q anaconda-client
conda install -y -q conda-build
conda install -y -q -c pytorch pytorch=${{ matrix.torch }} cpuonly

- name: Display conda info
shell: bash -l {0}
run: |
which conda
conda env list
conda info

- name: Build k2
shell: bash -l {0}
env:
K2_PYTHON_VERSION: ${{ matrix.python-version}}
K2_TORCH_VERSION: ${{ matrix.torch }}
K2_CONDA_TOKEN: ${{ secrets.K2_CONDA_TOKEN}}
K2_IS_GITHUB_ACTIONS: 1
K2_IS_FOR_CONDA: 1
run: |
export K2_BUILD_TYPE=$K2_BUILD_TYPE
./scripts/build_conda_cpu.sh

- name: Display generated files
run: |
ls -lh /usr/local/miniconda/envs/k2/conda-bld/osx-64

- name: Upload generated files
uses: actions/upload-artifact@v2
with:
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-${{ matrix.os }}
path: /usr/local/miniconda/envs/k2/conda-bld/osx-64/*.tar.bz2
Original file line number Diff line number Diff line change
Expand Up @@ -26,68 +26,41 @@
# See https://github.com/openPMD/openPMD-api/issues/593#issuecomment-552690470


name: build_conda_cpu
name: build_conda_cpu_ubuntu

on:
push:
branches:
- conda-cpu
tags:
- '*'

env:
K2_BUILD_TYPE: Release

jobs:
build_conda_cpu:
runs-on: ${{ matrix.os }}
generate_build_matrix:
# see https://github.com/pytorch/pytorch/pull/50633
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generating build matrix
id: set-matrix
run: |
# outputting for debugging purposes
python scripts/github_actions/generate_build_matrix.py
MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
echo "::set-output name=matrix::${MATRIX}"

build_conda_cpu_ubuntu:
needs: generate_build_matrix
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
# from https://download.pytorch.org/whl/torch_stable.html
#
# PyTorch 1.11.x supports 3.7, 3.8, 3.9, 3.10
# PyTorch 1.10, 1.9.x, 1.8.x, and 1.7.1 support 3.6, 3.7, 3.8, 3.9
# PyTorch 1.7.0, 1.6.0, and 1.5.x support 3.6, 3.7, 3.8
#
# Other PyTorch versions are not tested
#
torch: ["1.5.0", "1.5.1", "1.6.0", "1.7.0", "1.7.1", "1.8.0", "1.8.1", "1.9.0", "1.9.1", "1.10.0", "1.10.1", "1.10.2", "1.11.0"]
exclude:
- python-version: "3.9" # exclude Python 3.9 for [1.5.0, 1.5.1, 1.6.0, 1.7.0]
torch: "1.5.0"
- python-version: "3.9"
torch: "1.5.1"
- python-version: "3.9"
torch: "1.6.0"
- python-version: "3.9"
torch: "1.7.0"
- python-version: "3.10" # exclude Python 3.10 for [1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2]
torch: "1.5.0"
- python-version: "3.10"
torch: "1.5.1"
- python-version: "3.10"
torch: "1.6.0"
- python-version: "3.10"
torch: "1.7.0"
- python-version: "3.10"
torch: "1.7.1"
- python-version: "3.10"
torch: "1.8.0"
- python-version: "3.10"
torch: "1.8.1"
- python-version: "3.10"
torch: "1.9.0"
- python-version: "3.10"
torch: "1.9.1"
- python-version: "3.10"
torch: "1.10.0"
- python-version: "3.10"
torch: "1.10.1"
- python-version: "3.10"
torch: "1.10.2"
- python-version: "3.6" # exclude Python 3.6 for [1.11.0]
torch: "1.11.0"
${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}

steps:
# refer to https://github.com/actions/checkout
Expand Down Expand Up @@ -134,25 +107,11 @@ jobs:
./scripts/build_conda_cpu.sh

- name: Display generated files
if: startsWith(matrix.os, 'ubuntu')
run: |
ls -lh /usr/share/miniconda/envs/k2/conda-bld/linux-64

- name: Display generated files
if: startsWith(matrix.os, 'macos')
run: |
ls -lh /usr/local/miniconda/envs/k2/conda-bld/osx-64

- name: Upload generated files
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v2
with:
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-${{ matrix.os }}
path: /usr/share/miniconda/envs/k2/conda-bld/linux-64/*.tar.bz2

- name: Upload generated files
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v2
with:
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-${{ matrix.os }}
path: /usr/local/miniconda/envs/k2/conda-bld/osx-64/*.tar.bz2
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,42 @@
# limitations under the License.


name: build-windows-conda
name: build_conda_cpu_windows

on:
push:
branches:
- conda-win
tags:
- '*'

env:
BUILD_TYPE: Release

jobs:
build-windows-conda:
generate_build_matrix:
# see https://github.com/pytorch/pytorch/pull/50633
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generating build matrix
id: set-matrix
run: |
# outputting for debugging purposes
python scripts/github_actions/generate_build_matrix.py
MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
echo "::set-output name=matrix::${MATRIX}"

build_conda_cpu_windows:
# see https://github.com/actions/virtual-environments/blob/win19/20210525.0/images/win/Windows2019-Readme.md
runs-on: ${{ matrix.os }}
needs: generate_build_matrix
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
os: [windows-2019]
# Python 3.9 is for PyTorch 1.7.1, 1.8.x, 1.9.0,
python-version: [3.6, 3.7, 3.8, 3.9]
torch: ["1.5.0", "1.5.1", "1.6.0", "1.7.0", "1.7.1", "1.8.0", "1.8.1", "1.9.0"]
exclude:
- python-version: 3.9 # exclude Python 3.9 for [1.5.0, 1.5.1, 1.6.0, 1.7.0]
torch: "1.5.0"
- python-version: 3.9
torch: "1.5.1"
- python-version: 3.9
torch: "1.6.0"
- python-version: 3.9
torch: "1.7.0"
${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}

steps:
- uses: actions/checkout@v2
Expand Down
Loading