Skip to content

Commit

Permalink
Remove unused code (#857)
Browse files Browse the repository at this point in the history
* Update doc URL. (#821)

* Support indexing 2-axes RaggedTensor, Support slicing for RaggedTensor (#825)

* Support index 2-axes RaggedTensor, Support slicing for RaggedTensor

* Fix compiling errors

* Fix unit test

* Change RaggedTensor.data to RaggedTensor.values

* Fix style

* Add docs

* Run nightly-cpu when pushing code to nightly-cpu branch

* Prune with max_arcs in IntersectDense (#820)

* Add checking for array constructor

* Prune with max arcs

* Minor fix

* Fix typo

* Fix review comments

* Fix typo

* Release v1.8

* Create a ragged tensor from a regular tensor. (#827)

* Create a ragged tensor from a regular tensor.

* Add tests for creating ragged tensors from regular tensors.

* Add more tests.

* Print ragged tensors in a way like what PyTorch is doing.

* Fix test cases.

* Trigger GitHub actions manually. (#829)

* Run GitHub actions on merging. (#830)

* Support printing ragged tensors in a more compact way. (#831)

* Support printing ragged tensors in a more compact way.

* Disable support for torch 1.3.1

* Fix test failures.

* Add levenshtein alignment (#828)

* Add levenshtein graph

* Contruct k2.RaggedTensor in python part

* Fix review comments, return aux_labels in ctc_graph

* Fix tests

* Fix bug of accessing symbols

* Fix bug of accessing symbols

* Change argument name, add levenshtein_distance interface

* Fix test error, add tests for levenshtein_distance

* Fix review comments and add unit test for c++ side

* update the interface of levenshtein alignment

* Fix review comments

* Release v1.9

* Support a[b[i]] where both a and b are ragged tensors. (#833)

* Display import error solution message on MacOS (#837)

* Fix installation doc. (#841)

* Fix installation doc.

Remove Windows support. Will fix it later.

* Fix style issues.

* fix typos in the install instructions (#844)

* make cmake adhere to the modernized way of finding packages outside default dirs (#845)

* import torch first in the smoke tests to preven SEGFAULT (#846)

* Add doc about how to install a CPU version of k2. (#850)

* Add doc about how to install a CPU version of k2.

* Remove property setter of Fsa.labels

* Update Ubuntu version in GitHub CI since 16.04 reaches end-of-life.

* Support PyTorch 1.10. (#851)

* Fix test cases for k2.union() (#853)

* Revert "Construct RaggedArc from unary function tensor (#30)" (#31)

This reverts commit cca7a54.

* Remove unused code.

* Fix github actions.

Avoid downloading all git LFS files.

* Enable github actions for v2.0-pre branch.

Co-authored-by: Wei Kang <[email protected]>
Co-authored-by: Piotr Żelasko <[email protected]>
Co-authored-by: Jan "yenda" Trmal <[email protected]>
  • Loading branch information
4 people authored Nov 1, 2021
1 parent f375a83 commit a07f168
Show file tree
Hide file tree
Showing 61 changed files with 765 additions and 3,050 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
push:
branches:
- master
- v2.0-pre
pull_request:
types: [labeled]

Expand All @@ -36,8 +37,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15]
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"]
# Python 3.9 is for PyTorch 1.7.1, 1.8.x, 1.9.0,
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"]
# Python 3.9 is for PyTorch 1.7.1, 1.8.x, 1.9.x, 1.10
python-version: [3.6, 3.7, 3.8, 3.9]
exclude:
- python-version: 3.9 # exclude Python 3.9 for [1.5.0, 1.5.1, 1.6.0, 1.7.0]
Expand Down
48 changes: 42 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
push:
branches:
- master
- v2.0-pre
pull_request:
types: [labeled]

Expand All @@ -37,19 +38,42 @@ jobs:
matrix:
os: [ubuntu-18.04]
# from https://download.pytorch.org/whl/torch_stable.html
# 1.9.0 supports: cuda10.2 (default), 11.1
# Note: There are no torch versions for CUDA 11.2
#
# 1.10 supports: cuda10.2 (default), 11.1, 11.3
# 1.9.x supports: cuda10.2 (default), 11.1
# PyTorch 1.8.x supports: cuda 10.1, 10.2 (default), 11.1
# PyTorch 1.7.x supports: cuda 10.1, 10.2 (default), 11.0
# PyTorch 1.6.0 supports: cuda 10.1, 10.2 (default)
# PyTorch 1.5.x supports: cuda 10.1, 10.2 (default)
# Other PyTorch versions are not tested
cuda: ["10.1", "10.2", "11.0", "11.1"]
# CUDA 11.3 is for torch 1.10
cuda: ["10.1", "10.2", "11.0", "11.1", "11.3"]
gcc: ["7"]
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"]
# Python 3.9 is for PyTorch 1.7.1, 1.8.0, 1.8.1, 1.9.0
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"]
#
# Python 3.9 is for PyTorch 1.7.1, 1.8.0, 1.8.1, 1.9.x, 1.10
python-version: [3.6, 3.7, 3.8, 3.9]
exclude:
- cuda: "11.0" # exclude 11.0 for [1.5.0, 1.5.1, 1.6.0, 1.8.0, 1.8.1, 1.9.0]
- cuda: "11.3" # exclude 11.3 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]
torch: "1.5.0"
- cuda: "11.3"
torch: "1.5.1"
- cuda: "11.3"
torch: "1.6.0"
- cuda: "11.3"
torch: "1.7.0"
- cuda: "11.3"
torch: "1.7.1"
- cuda: "11.3"
torch: "1.8.0"
- cuda: "11.3"
torch: "1.8.1"
- cuda: "11.3"
torch: "1.9.0"
- cuda: "11.3"
torch: "1.9.1"
- cuda: "11.0" # exclude 11.0 for [1.5.0, 1.5.1, 1.6.0, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10]
torch: "1.5.0"
- cuda: "11.0"
torch: "1.5.1"
Expand All @@ -61,6 +85,10 @@ jobs:
torch: "1.8.1"
- cuda: "11.0"
torch: "1.9.0"
- cuda: "11.0"
torch: "1.9.1"
- cuda: "11.0"
torch: "1.10"
- cuda: "11.1" # exclude 11.1 for [1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1]
torch: "1.5.0"
- cuda: "11.1"
Expand All @@ -71,8 +99,12 @@ jobs:
torch: "1.7.0"
- cuda: "11.1"
torch: "1.7.1"
- cuda: "10.1" # exclude CUDA 10.1 for [1.9.0]
- cuda: "10.1" # exclude CUDA 10.1 for [1.9.0, 1.9.1, 1.10]
torch: "1.9.0"
- cuda: "10.1"
torch: "1.9.1"
- cuda: "10.1"
torch: "1.10"
- 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
Expand Down Expand Up @@ -117,6 +149,10 @@ jobs:
echo "CXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
- name: Install git lfs
run: |
sudo apt-get install -y git-lfs
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/build_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,20 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04]
# anaconda does not support 3.9 as of 2021.05.08
os: [ubuntu-18.04]
python-version: [3.6, 3.7, 3.8, 3.9]
# python-version: [3.6, 3.7, 3.8]
cuda: ["10.1", "10.2", "11.0", "11.1"]
cuda: ["10.1", "10.2", "11.0", "11.1", "11.3"]
# from https://download.pytorch.org/whl/torch_stable.html
#
# PyTorch 1.9.0 supports: 10.2 (default), 11.1
# PyTorch 1.10 supports: 10.2 (default), 11.1, 11.3
# PyTorch 1.9.x supports: 10.2 (default), 11.1
# PyTorch 1.8.1 supports: cuda 10.1, 10.2 (default), 11.1
# PyTorch 1.8.0 supports: cuda 10.1, 10.2 (default), 11.1
# PyTorch 1.7.x supports: cuda 10.1, 10.2 (default), 11.0, 9.2 (not included in this setup)
# PyTorch 1.6.0 supports: cuda 10.1, 10.2 (default), 9.2 (not included in this setup)
# PyTorch 1.5.x supports: cuda 10.1, 10.2 (default), 9.2 (not included in this setup)
#
# PyTorch 1.8.x and 1.7.1 support 3.6, 3.7, 3.8, 3.9
# PyTorch 1.7.1, 1.8.x, 1.9.x, and 1.10 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
Expand All @@ -57,9 +56,9 @@ jobs:
# https://github.com/csukuangfj/k2/runs/2533830771?check_suite_focus=true
# and
# https://github.com/NVIDIA/apex/issues/805
torch: ["1.6.0", "1.7.0", "1.7.1", "1.8.0", "1.8.1", "1.9.0"]
torch: ["1.6.0", "1.7.0", "1.7.1", "1.8.0", "1.8.1", "1.9.0", "1.9.1", "1.10"]
exclude:
# - cuda: "11.0" # exclude 11.0 for [1.5.0, 1.5.1, 1.6.0, 1.8.0, 1.8.1, 1.9.0]
# - cuda: "11.0" # exclude 11.0 for [1.5.0, 1.5.1, 1.6.0, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10]
# torch: "1.5.0"
# - cuda: "11.0"
# torch: "1.5.1"
Expand All @@ -71,6 +70,10 @@ jobs:
torch: "1.8.1"
- cuda: "11.0"
torch: "1.9.0"
- cuda: "11.0"
torch: "1.9.1"
- cuda: "11.0"
torch: "1.10"
# - cuda: "11.1" # exclude 11.1 for [1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1]
# torch: "1.5.0"
# - cuda: "11.1"
Expand All @@ -81,8 +84,12 @@ jobs:
torch: "1.7.0"
- cuda: "11.1"
torch: "1.7.1"
- cuda: "10.1" # exclude 10.1 for [1.9.0]
- cuda: "10.1" # exclude 10.1 for [1.9.0, 1.9.1, 1.10]
torch: "1.9.0"
- cuda: "10.1"
torch: "1.9.1"
- cuda: "10.1"
torch: "1.10"
- 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
Expand Down Expand Up @@ -142,6 +149,10 @@ jobs:
conda info
nproc
- name: Install git lfs
run: |
sudo apt-get install -y git-lfs
- name: Download cudnn 8.0
shell: bash -l {0}
env:
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/build_conda_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,25 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, macos-10.15]
# anaconda does not support 3.9 as of 2021.05.08
# python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-18.04, macos-10.15]
python-version: [3.6, 3.7, 3.8, 3.9]
# from https://download.pytorch.org/whl/torch_stable.html
#
# PyTorch 1.9.0, 1.8.x, and 1.7.1 support 3.6, 3.7, 3.8, 3.9
# 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"]
# 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"
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"]
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"

steps:
# refer to https://github.com/actions/checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15]
# Python 3.9 is for PyTorch 1.7.1, 1.8.x, 1.9.0
# Python 3.9 is for PyTorch 1.7.1, 1.8.x, 1.9.x, 1.10
python-version: [3.6, 3.7, 3.8, 3.9]
torch: ["1.4.0", "1.5.0", "1.5.1", "1.6.0", "1.7.0", "1.7.1", "1.8.0", "1.8.1", "1.9.0"]
torch: ["1.4.0", "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"]
exclude:
- python-version: 3.9 # exclude Python 3.9 for [1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0]
torch: "1.4.0"
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: nightly

on:
push:
branches:
- nightly
schedule:
# minute (0-59)
# hour (0-23)
Expand Down Expand Up @@ -80,6 +83,10 @@ jobs:
./scripts/github_actions/install_torch.sh
python3 -c "import torch; print('torch version:', torch.__version__)"
- name: Install git lfs
run: |
sudo apt-get install -y git-lfs
- name: Download cudnn 8.0
env:
cuda: ${{ matrix.cuda }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-tests-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
push:
branches:
- master
- v2.0-pre
pull_request:
types: [labeled]

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
push:
branches:
- master
- v2.0-pre
pull_request:
types: [labeled]

Expand Down Expand Up @@ -91,6 +92,10 @@ jobs:
./scripts/github_actions/install_torch.sh
python3 -c "import torch; print('torch version:', torch.__version__)"
- name: Install git lfs
run: |
sudo apt-get install -y git-lfs
- name: Download cudnn 8.0
env:
cuda: ${{ matrix.cuda }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
push:
branches:
- master
- v2.0-pre
pull_request:
branches:
- master
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/wheel-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
./scripts/github_actions/install_torch.sh
python3 -c "import torch; print('torch version:', torch.__version__)"
- name: Install git lfs
run: |
sudo apt-get install -y git-lfs
- name: Download cudnn 8.0
env:
cuda: ${{ matrix.cuda }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
./scripts/github_actions/install_torch.sh
python3 -c "import torch; print('torch version:', torch.__version__)"
- name: Install git lfs
run: |
sudo apt-get install -y git-lfs
- name: Download cudnn 8.0
env:
cuda: ${{ matrix.cuda }}
Expand Down
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
if(POLICY CMP0111)
cmake_policy(SET CMP0111 OLD)
endif()
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()

set(languages CXX)
set(_K2_WITH_CUDA ON)
Expand Down Expand Up @@ -205,8 +208,14 @@ if(K2_WITH_CUDA)
# set(K2_COMPUTE_ARCHS 30 32 35 50 52 53 60 61 62 70 72)
# message(WARNING "arch 62/72 are not supported for now")

# refer to https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
# see https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
# https://www.myzhar.com/blog/tutorials/tutorial-nvidia-gpu-cuda-compute-capability/
set(K2_COMPUTE_ARCH_CANDIDATES 35 50 60 61 70 75)
if(CUDA_VERSION VERSION_GREATER "11.0")
list(APPEND K2_COMPUTE_ARCH_CANDIDATES 80 86)
endif()
message(STATUS "K2_COMPUTE_ARCH_CANDIDATES ${K2_COMPUTE_ARCH_CANDIDATES}")

set(K2_COMPUTE_ARCHS)

foreach(COMPUTE_ARCH IN LISTS K2_COMPUTE_ARCH_CANDIDATES)
Expand Down
Loading

0 comments on commit a07f168

Please sign in to comment.