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

[Lang] Update stable branch to the latest release v1.0.3 #5158

Merged
merged 176 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
e346e9f
[Build] Switch to scikit-build as the build backend (#4624)
frostming Apr 27, 2022
5bb28e2
[build] Install export core library to build dir (#4866)
frostming Apr 27, 2022
5d20a1d
[misc] Bump version to v1.0.2 (#4867)
taichi-gardener Apr 27, 2022
92f8464
[Bug] Remove redundant AllocStmt when lowering FrontendWhileStmt (#4870)
jim19930609 Apr 27, 2022
5bb3b0e
[build] [bug] Fix a bug of skbuild that loses the root package_dir (#…
frostming Apr 27, 2022
477c996
[ci] Add libtaichi_export_core build for desktop in CI (#4871)
ailzhang Apr 27, 2022
6e055f0
[Build] [refactor] Define runtime build target (#4838)
qiao-bo Apr 27, 2022
0abd24b
[Doc] Add limitation about TLS optimization (#4877)
ailzhang Apr 28, 2022
a9bd5c9
[ci] Use the updated docker image for libtaichi_export_core (#4881)
qiao-bo Apr 28, 2022
3291be6
[refactor] Add ASTSerializer and use it to generate offline-cache-key…
PGZXB Apr 28, 2022
850c8c7
[build] Change the library output dir for export core (#4880)
frostming Apr 28, 2022
eae8339
[vulkan] Device API explicit semaphores (#4852)
bobcao3 Apr 28, 2022
d096f15
[metal] Complete Device API (#4862)
k-ye Apr 28, 2022
ca81ba3
[Doc] Updated links that may break. (#4874)
writinwaters Apr 28, 2022
e4eea27
[error] [lang] Improved error messages for illegal slicing or indexin…
jim19930609 Apr 28, 2022
8a3a2d7
[metal] Migrate runtime's MTLBuffer allocation to unified device API …
k-ye Apr 28, 2022
c2a44d8
[Build] [refactor] Use keywords instead of plain target_link_librarie…
qiao-bo Apr 29, 2022
b9bb482
[bug] Fixed type promotion rule for bit-shift operations (#4884)
jim19930609 Apr 29, 2022
de08a27
[aot] [vulkan] Expose symbols for AOT (#4879)
k-ye Apr 29, 2022
b3446e9
[Build] [refactor] Define Cmake OpenGL runtime target (#4887)
qiao-bo Apr 30, 2022
6d223da
[vulkan] Fix typo for waitSemaphoreCount (#4892)
ghuau-innopeak Apr 30, 2022
e583b2d
[vulkan] Add new VMA vulkan functions. (#4893)
bobcao3 Apr 30, 2022
eedf20d
Use Ninja generator on Windows and skip generator test (#4896)
frostming May 3, 2022
3d6fcb0
[Lang] [test] Copy-free interaction between Taichi and PaddlePaddle (…
0xzhang May 4, 2022
9a0f32a
[test] Cancel tests for Paddle on GPU (#4914)
0xzhang May 6, 2022
894727d
remove debug print (#4883)
BillXu2000 May 6, 2022
64e0ba8
[Doc] Updated broken links (#4912)
writinwaters May 6, 2022
92bb359
[test] Exit on error during Paddle windows test (#4910)
qiao-bo May 6, 2022
abd0136
[build] Warning Suppression PR #2: Fixed codebase warnings (#4909)
jim19930609 May 6, 2022
e3d58c6
[SIMT] Add syncwarp warp intrinsics (#4917)
galeselee May 6, 2022
a951d05
[refactor] Create MatrixImpl to differentiate Taichi and Python scope…
k-ye May 6, 2022
cebee89
[build] Warning Suppression PR #1: Turned on -Wno-ignored-attributes …
jim19930609 May 7, 2022
72a1517
[SIMT] Add activemask warp intrinsics (#4918)
galeselee May 7, 2022
7324903
[build] Warning Suppression PR #3: Eliminate warnings from third-part…
jim19930609 May 7, 2022
37c47b7
[build] Warning Suppression PR #4: Fixed warnings with MacOS (#4926)
jim19930609 May 7, 2022
278b4be
[refactor] Simplify Matrix's initializer (#4923)
k-ye May 7, 2022
b485bde
[Doc] Updated relative path (#4929)
writinwaters May 8, 2022
736ebd5
[Lang] Support sparse matrix datatype and storage format configuratio…
FantasyVR May 9, 2022
a627ceb
[lang] Fix type check warnings for ti.Mesh (#4930)
g1n0st May 9, 2022
407ff73
[SIMT] Add uni_sync warp intrinsics (#4927)
0xzhang May 9, 2022
a210807
[build] Enable -Werror on Linux & Mac (#4941)
jim19930609 May 10, 2022
faad1e2
[build] Turn on -Werror on Linux and Mac platforms (#4928)
jim19930609 May 10, 2022
7657185
[doc] Updated documentations for implicit type casting rules (#4885)
jim19930609 May 10, 2022
2586a9f
[refactor] Remove unused snode_trees in ProgramImpl interface (#4942)
k-ye May 10, 2022
d10c3e3
[build] Turned off -Werror temporarily for issues with performance-bo…
jim19930609 May 10, 2022
390ccac
[refactor] [llvm] Remove struct_compiler_ as a member variable (#4945)
k-ye May 10, 2022
d01aa12
[build] Limit -Werror to Clang-compiler only (#4947)
jim19930609 May 10, 2022
fbed595
[ci] Fix Nightly (#4948)
qiao-bo May 10, 2022
6d538e1
[Build] Improved building on Windows (#4925)
PENGUINLIONG May 10, 2022
c3631c0
[Lang] Add more functions to math module (#4939)
neozhaoliang May 11, 2022
0795c74
[lang] [bug] Implement Expression serializing and fix some bugs (#4931)
PGZXB May 11, 2022
e21a4e3
[refactor] Add ArrayMetadata to store the array runtime size (#4950)
k-ye May 11, 2022
80f20f2
[refactor] Some renamings (#4959)
k-ye May 11, 2022
acedc0e
[lang] Add reference type support on real functions (#4889)
lin-hitonami May 12, 2022
3c89f4d
[llvm] Move cache directory to dump() (#4963)
k-ye May 12, 2022
a7b9d2b
[RFC] AOT for all SNodes (#4806)
k-ye May 12, 2022
1b6797c
[ci] Add new buildbot with latest driver for Linux/Vulkan test (#4953)
qiao-bo May 12, 2022
7c4de03
[vulkan] Set kApiVersion to VK_API_VERSION_1_3 (#4970)
turbo0628 May 12, 2022
22d1895
[bug] [simt] Fix the problem that some intrinsics are never called (#…
strongoier May 12, 2022
f4a14f3
[llvm] Create ModuleToFunctionConverter (#4962)
k-ye May 13, 2022
ab96782
[build] Fixed Ilegal Instruction Error when importing PaddlePaddle mo…
jim19930609 May 13, 2022
9959ee3
[test] Add an ndarray test in C++. (#4972)
ailzhang May 13, 2022
93daf98
[llvm] Make codegen produce static llvm::Module (#4975)
k-ye May 13, 2022
055b0c7
[ci] [build] Containerize Windows CPU build and test (#4933)
qiao-bo May 13, 2022
3fbff4b
[llvm] Make cache writer support BC format (#4978)
k-ye May 13, 2022
c189fc6
[Build] Improve Windows build script (#4955)
PENGUINLIONG May 13, 2022
9e89c58
[refactor] Improve serializer and cleanup utils (#4980)
k-ye May 14, 2022
6bbaf52
[llvm] Support both BC and LL cache format (#4979)
k-ye May 14, 2022
368f3b3
[misc] Add ASTSerializer::visit(ReferenceExpression *) (#4984)
PGZXB May 16, 2022
e047ec5
[bug] Fix infinite recursion of get_offline_cache_key_of_snode_impl()…
PGZXB May 16, 2022
17f9056
[cuda] Add block and grid level intrinsic for cuda backend (#4977)
YuCrazing May 16, 2022
ea40be9
[Workflow] Update release_test.sh (#4960)
chuandongyan May 16, 2022
09de043
Provision of prebuilt LLVM 10 for VS2022 (#4987)
PENGUINLIONG May 16, 2022
70d45ba
[llvm] Use serializer for LLVM cache (#4982)
k-ye May 17, 2022
6764b88
[Doc] Fix docs deploy netlify test configuration (#4991)
Justinterest May 17, 2022
ac1f06f
[Doc] Updated URL (#4990)
writinwaters May 17, 2022
ed22d64
[Doc] Update trouble shooting URL in bug report template (#4988)
turbo0628 May 17, 2022
84b6c89
[Lang] [type] Refactor quantized_types module and make quant APIs pub…
strongoier May 17, 2022
b236c6a
Update README.md
writinwaters May 17, 2022
101590d
[test] Fix a few mis-configured ndarray tests (#5000)
ailzhang May 18, 2022
19c89b9
[Doc] Fix netlify cache & sync doc without pr content (#5003)
Justinterest May 18, 2022
2c7c1cc
[refactor] Program owns allocated ndarrays.
May 18, 2022
237dcd1
[test] Add test for Ndarray from DeviceAllocation
May 18, 2022
62332fc
[refactor] Construct ndarray from existing DeviceAllocation.
May 18, 2022
058f436
[refactor] Free ndarray's memory when python GC triggers
May 18, 2022
9606e03
[refactor] Move ndarray fast fill methods to Program
May 18, 2022
b42a09f
[refactor] Get rid of data_ptr_ in Ndarray
May 18, 2022
9cb36ac
[Doc] Branding updates. Also tests netlify. (#4994)
writinwaters May 18, 2022
21ca242
[AOT] Supported inclusion of taichi as subdirectory for AOT modules (…
PENGUINLIONG May 18, 2022
a0a8059
[misc] Version bump: v1.0.2 -> v1.0.3 (#5008)
turbo0628 May 18, 2022
d27217a
[Lang] [type] Fix parameter name 'range' for ti.types.quant.fixed (#5…
strongoier May 18, 2022
66f41a9
[SIMT] Add match_any warp intrinsics (#4921)
galeselee May 19, 2022
9db0351
[doc] Update community section (#4943)
gingerkidney May 19, 2022
c535c53
[llvm] Add serializable LlvmLaunchArgInfo (#4992)
k-ye May 19, 2022
8c936ef
[bug] Fixed numerical error for Atomic-Sub between unsigned values wi…
jim19930609 May 19, 2022
7157b13
[refactor] Move get ndarray data ptr to program (#5012)
FantasyVR May 19, 2022
5dffaa0
[ci] [build] Enable ccache for windows docker (#5001)
frostming May 20, 2022
15b278a
[test] Unify kernel setup for ndarray related tests
May 20, 2022
963b1c3
[aot] Build and run graph without serialization
May 20, 2022
f1bc909
[Llvm] Add AOT builder and loader (#5013)
k-ye May 21, 2022
6051020
[ci] Fix nightly macos (#5018)
qiao-bo May 21, 2022
eba326f
[bug] Revert freeing ndarray memory when python GC triggers (#5019)
ailzhang May 21, 2022
25644e3
[SIMT] Add match_all warp intrinsics (#4961)
galeselee May 21, 2022
fba92cf
[AOT] Support importing external Vulkan buffers (#5020)
PENGUINLIONG May 21, 2022
504f619
[Bug] [type] Fix frontend type check for reading a whole bit_struct (…
strongoier May 23, 2022
1532d9f
fix fast_gui rgba bug (#5031)
neozhaoliang May 23, 2022
bdc9545
[doc] Update OS names (#5030)
qiao-bo May 24, 2022
686deb1
[ci] Disable win cpu docker job test (#5033)
qiao-bo May 24, 2022
97e9b39
[aot] Serialize built graph, deserialize and run.
May 23, 2022
c39f539
[aot] Move ArgKind as first argument in Arg class
May 23, 2022
9fd390b
[aot] Bind graph APIs to python and add mpm88 example (#5034)
ailzhang May 24, 2022
b73da31
[Lang] [type] Refactor quant type definition APIs (#5036)
strongoier May 25, 2022
d034586
[Metal] Support Ndarray (#4720)
k-ye May 25, 2022
296b720
[Lang] Fix potential precision bug when using math vector and matrix …
neozhaoliang May 25, 2022
63f2d2c
[Vulkan] Fixed vulkan backend crash on AOT examples (#5047)
PENGUINLIONG May 25, 2022
cdc07a5
Exit CI builds when download of prebuilt packages fails (#5043)
PENGUINLIONG May 26, 2022
64b8c2a
[ci] Run cpp tests via run_tests.py (#5035)
k-ye May 26, 2022
e8a9732
Set host_write to false for opengl ndarray (#5038)
ailzhang May 26, 2022
da2b332
[Lang] Build sparse matrix from ndarray (#4841)
FantasyVR May 26, 2022
5cea449
[bug] Added type promotion support for atan2 (#5037)
jim19930609 May 26, 2022
235c9bb
[Doc] Updated type system (#5054)
writinwaters May 27, 2022
8966069
[bug] Ndarray type should include primitive dtype as well (#5052)
ailzhang May 27, 2022
78a0139
[Lang] [ir] Add short-circuit if-then-else operator (#5022)
re-xyr May 29, 2022
359afd2
[Lang] Struct Classes implementation (#4989)
bsavery May 29, 2022
0f4c950
[Lang] [type] Disallow reading a whole bit_struct (#5061)
strongoier May 30, 2022
2197fad
[bug] Remove operator ! for Expr (#5062)
strongoier May 30, 2022
69a53fe
[build] [bug] Ensure the assets folder is copied to the project direc…
frostming May 31, 2022
e6cb288
[refactor] Split GraphBuilder out of Graph class (#5064)
ailzhang May 31, 2022
e5b6639
[aot] [CUDA-AOT PR #0] Refactored compile_module_to_executable() to C…
jim19930609 May 31, 2022
5704111
[refactor] Specialized Ndarray Type is (element_type, shape, layout)
May 31, 2022
f42a849
[refactor] Pass element_shape and layout to C++ Ndarray
May 31, 2022
2faf489
[Lang] Support constructing vector and matrix ndarray from ti.ndarray()
May 31, 2022
e360191
[refactor] Resolve comments from #5065 (#5074)
ailzhang Jun 1, 2022
564dcea
[Example] Update mass_spring_3d_ggui.py to v2 (#3879)
AlexBrown42 Jun 1, 2022
a2a9b44
[doc] Fix broken link for github action status badge (#5076)
ailzhang Jun 1, 2022
c985372
[llvm] Specialize element shape for LLVM backend (#5071)
turbo0628 Jun 1, 2022
1514d4b
[spirv] Specialize element shape for spirv codegen. (#5068)
turbo0628 Jun 1, 2022
f53e351
[Lang] Add more initialization routines for glsl matrix types (#5069)
neozhaoliang Jun 1, 2022
31f9bfb
[cuda] [simt] Add assertions for warp intrinsics on old GPUs (#5077)
qiao-bo Jun 1, 2022
4b0ea28
[refactor] Correctly set ndarray element_size and nelement (#5080)
ailzhang Jun 1, 2022
530fa2a
[infra] Refactor Vulkan runtime into true Common Runtime (#5058)
bobcao3 Jun 1, 2022
3983d85
[llvm] [aot] CUDA-AOT PR #1: Extracted common logics from CPUAotModul…
jim19930609 Jun 1, 2022
41c9736
[llvm] [refactor] Merge AtomicOpStmt codegen in CPU and CUDA backends…
strongoier Jun 2, 2022
4c42fc9
[refactor] Make sure Ndarray shape is field shape (#5085)
ailzhang Jun 2, 2022
a645b99
[autodiff] Allocate dual and adjoint snode (#5083)
erizmr Jun 2, 2022
094c47f
[build] [refactor] Change CMake global include_directories to target …
qiao-bo Jun 2, 2022
98e6cec
[Doc] Add documentation of Taichi Struct Classes. (#5075)
bsavery Jun 2, 2022
8dc598d
[llvm] [aot] Add LLVM-CPU AOT tests (#5079)
jim19930609 Jun 2, 2022
52a7cd8
[autodiff] Extract shared components for reverse and forward mode (#5…
erizmr Jun 2, 2022
fb7de6d
[llvm] [refactor] Use LLVM native atomic ops if possible (#5091)
strongoier Jun 6, 2022
45870ec
[bug] Minor fix for ndarray element_shape in graph mode (#5093)
ailzhang Jun 6, 2022
e1ae06e
Use pre-calculated runtime size array for gfx runtime. (#5094)
turbo0628 Jun 6, 2022
8ab9b9f
[Doc] Improve ODOP doc structure (#5089)
strongoier Jun 6, 2022
8e8a792
[llvm] [aot] CUDA-AOT PR #2: Implemented AOTModuleLoader & AOTModuleB…
jim19930609 Jun 6, 2022
f0d7d69
clean hidden override functions (#5097)
erizmr Jun 6, 2022
3d95396
[refactor] Update Ndarray constructor used in AOT runtime. (#5095)
ailzhang Jun 6, 2022
fe250ac
[refactor] Remove ndarray element shape from extra arg buffer (#5100)
turbo0628 Jun 7, 2022
4f2b9e3
[llvm] [refactor] Move load_bit_pointer() to CodeGenLLVM (#5099)
strongoier Jun 8, 2022
66cc852
[test] Save mpm88 graph in python and load in C++ test. (#5104)
ailzhang Jun 8, 2022
d95e6b0
[Example] Update visual effects of mass_spring_3d_ggui.py (#5081)
neozhaoliang Jun 8, 2022
8791cda
[type] [refactor] Remove redundant promotion for custom int in type_c…
strongoier Jun 8, 2022
9c4fa73
[llvm] [refactor] Replace cast_int() with LLVM native integer cast (#…
strongoier Jun 8, 2022
130e37c
[type] [llvm] [refactor] Fix function names in codegen_llvm_quant (#5…
strongoier Jun 9, 2022
f3786e5
[bug] Fix build without llvm backend crash (#5113)
qiao-bo Jun 9, 2022
1acb8d1
[build] [refactor] Move Vulkan runtime out of backends dir (#5106)
qiao-bo Jun 9, 2022
928aef1
[autodiff] Add forward mode pipeline for autodiff pass (#5098)
erizmr Jun 9, 2022
88f75a9
[aot] [llvm] LLVM AOT Field #0: Implemented FieldCacheData & refactor…
jim19930609 Jun 10, 2022
31ec9c3
[aot][bug] Use cached compiled kernel pointer when it's added to grap…
ailzhang Jun 10, 2022
9c3da65
[aot] [llvm] LLVM AOT Field #1: Adjust serialization/deserialization …
jim19930609 Jun 10, 2022
a01c373
Editorial update (#5119)
Olinaaaloompa Jun 10, 2022
e10a11b
[lang] Texture support 0/n: IR changes (#5134)
bobcao3 Jun 11, 2022
573f89e
fix mass_spring_3d_ggui backend (#5127)
neozhaoliang Jun 12, 2022
a0bdb66
[Example] Fix block_dim warning in ggui (#5128)
neozhaoliang Jun 13, 2022
aba2871
[ci] Enable yapf and isort on example files (#5140)
ailzhang Jun 13, 2022
6349d60
[type] [refactor] Misc improvements to quant codegen (#5129)
strongoier Jun 13, 2022
fae94a2
[aot] [llvm] LLVM AOT Field #2: Updated LLVM AOTModuleLoader & AOTMod…
jim19930609 Jun 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

<!-- We've collected some common issue solutions in https://docs.taichi-lang.org/lang/articles/install. Make sure you've check them out first. Hopefully they could address your problem. -->
<!-- We've collected some common issue solutions in https://docs.taichi-lang.org/docs/install. Make sure you've check them out first. Hopefully they could address your problem. -->

**Describe the bug**
A clear and concise description of what the bug is, ideally within 20 words.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
blank_issues_enabled: true
contact_links:
- name: Contributor Guideline
url: https://docs.taichi-lang.org/lang/articles/contributor_guide
url: https://docs.taichi-lang.org/docs/contributor_guide
about: Please check this out if you'd like to contribute by opening a PR :)
- name: Taichi Forum
url: https://forum.taichi.graphics
Expand Down
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Related issue = #
Thank you for your contribution!

If it is your first time contributing to Taichi, please read our Contributor Guidelines:
https://docs.taichi-lang.org/lang/articles/contributor_guide
https://docs.taichi-lang.org/docs/contributor_guide

- Please always prepend your PR title with tags such as [CUDA], [Lang], [Doc], [Example]. For a complete list of valid PR tags, please check out https://github.com/taichi-dev/taichi/blob/master/misc/prtags.json.
- Use upper-case tags (e.g., [Metal]) for PRs that change public APIs. Otherwise, please use lower-case tags (e.g., [metal]).
- More details: https://docs.taichi-lang.org/lang/articles/contributor_guide#pr-title-format-and-tags
- More details: https://docs.taichi-lang.org/docs/contributor_guide#pr-title-format-and-tags

- Please fill in the issue number that this PR relates to.
- If your PR fixes the issue **completely**, use the `close` or `fixes` prefix so that GitHub automatically closes the issue when the PR is merged. For example,
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:
echo '::set-output name=matrix_osx::{"include":[{"name":"taichi","python":"3.8"},{"name":"taichi","python":"3.9"},{"name":"taichi","python":"3.10"}]}"'
else
# For nightly release, we run on three python versions.
echo '::set-output name=matrix::{"include":[{"name":"taichi-nightly","python":"3.6","conda_python":"py36"},{"name":"taichi-nightly","python":"3.8","conda_python":"py38"},{"name":"taichi-nightly","python":"3.10","conda_python":"py310"}]}"'
echo '::set-output name=matrix::{"include":[{"name":"taichi-nightly","python":"3.6","conda_python":"py36"},{"name":"taichi-nightly","python":"3.7","conda_python":"py37"},{"name":"taichi-nightly","python":"3.8","conda_python":"py38"},{"name":"taichi-nightly","python":"3.9","conda_python":"py39"},{"name":"taichi-nightly","python":"3.10","conda_python":"py310"}]}"'

# M1 only supports py38 and py310(conda), so change matrix.
echo '::set-output name=matrix_osx::{"include":[{"name":"taichi-nightly","python":"3.8"},{"name":"taichi-nightly","python":"3.10"}]}"'
echo '::set-output name=matrix_osx::{"include":[{"name":"taichi-nightly","python":"3.8"},{"name":"taichi-nightly","python":"3.9"},{"name":"taichi-nightly","python":"3.10"}]}"'
fi

build_and_test_linux:
Expand Down Expand Up @@ -402,6 +402,7 @@ jobs:
. venv\Scripts\activate.ps1
python -c "import taichi"
pip install torch
pip install -r requirements_test.txt
ti diagnose
python tests/run_tests.py -vr2 -t2
env:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/scripts/check_clang_tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ CI_SETUP_CMAKE_ARGS=$1
cd taichi
python3 -m pip install -r requirements_dev.txt

rm -rf build && mkdir build && cd build
cmake $CI_SETUP_CMAKE_ARGS ..

cd ..
python3 ./scripts/run_clang_tidy.py $PWD/taichi -clang-tidy-binary clang-tidy-10 -checks=-*,performance-inefficient-string-concatenation,readability-identifier-naming -header-filter=$PWD/taichi -p $PWD/build -j2
export CI_SETUP_CMAKE_ARGS
python3 ./scripts/run_clang_tidy.py $PWD/taichi -clang-tidy-binary clang-tidy-10 -checks=-*,performance-inefficient-string-concatenation,readability-identifier-naming -header-filter=$PWD/taichi -j2
19 changes: 14 additions & 5 deletions .github/workflows/scripts/unix_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ setup_python() {
python3 -m pip install -r requirements_dev.txt
}

build() {
build_taichi_wheel() {
git fetch origin master
PROJECT_TAGS=""
EXTRA_ARGS=""
Expand All @@ -69,12 +69,21 @@ build() {
sccache -s
}

build_libtaichi_export() {
git fetch origin master
python3 setup.py build_ext
}

setup_sccache
setup_python
build
cat "$SCCACHE_ERROR_LOG" || true
NUM_WHL=$(ls dist/*.whl | wc -l)
if [ $NUM_WHL -ne 1 ]; then echo "ERROR: created more than 1 whl." && exit 1; fi

if [ "$EXPORT_CORE" == "1" ]; then
build_libtaichi_export
else
build_taichi_wheel
NUM_WHL=$(ls dist/*.whl | wc -l)
if [ $NUM_WHL -ne 1 ]; then echo "ERROR: created more than 1 whl." && exit 1; fi
fi

chmod -R 777 "$SCCACHE_DIR"
rm -f python/CHANGELOG.md
40 changes: 30 additions & 10 deletions .github/workflows/scripts/unix_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,63 @@ python3 -m pip install dist/*.whl
if [ -z "$GPU_TEST" ]; then
python3 -m pip install -r requirements_test.txt
python3 -m pip install "torch; python_version < '3.10'"
# Paddle's develop package doesn't support CI's MACOS machine at present
if [[ $OSTYPE == "linux-"* ]]; then
python3 -m pip install "paddlepaddle==2.3.0; python_version < '3.10'"
fi
else
## Only GPU machine uses system python.
export PATH=$PATH:$HOME/.local/bin
# pip will skip packages if already installed
python3 -m pip install -r requirements_test.txt
# Import Paddle's develop GPU package will occur error `Illegal Instruction`.

# Log hardware info for the current CI-bot
# There's random CI failure caused by "import paddle" (Linux)
# Top suspect is an issue with MKL support for specific CPU
echo "CI-bot CPU info:"
if [[ $OSTYPE == "linux-"* ]]; then
lscpu | grep "Model name"
elif [[ $OSTYPE == "darwin"* ]]; then
sysctl -a | grep machdep.cpu
fi
fi

ti diagnose
ti changelog
echo "wanted archs: $TI_WANTED_ARCHS"

TI_PATH=$(python3 -c "import taichi;print(taichi.__path__[0])" | tail -1)
TI_LIB_DIR="$TI_PATH/_lib/runtime" ./build/taichi_cpp_tests
python3 tests/run_tests.py --cpp

if [ -z "$GPU_TEST" ]; then
if [[ $PLATFORM == *"m1"* ]]; then
# Split per arch to avoid flaky test
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a cpu
python3 tests/run_tests.py -vr2 -t4 -k "not torch and not paddle" -a cpu
# Run metal and vulkan separately so that they don't use M1 chip simultaneously.
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a vulkan
python3 tests/run_tests.py -vr2 -t2 -k "not torch" -a metal
python3 tests/run_tests.py -vr2 -t4 -k "not torch and not paddle" -a vulkan
python3 tests/run_tests.py -vr2 -t2 -k "not torch and not paddle" -a metal
python3 tests/run_tests.py -vr2 -t1 -k "torch" -a "$TI_WANTED_ARCHS"
else
python3 tests/run_tests.py -vr2 -t4 -a "$TI_WANTED_ARCHS"
# Fail fast, give priority to the error-prone tests
if [[ $OSTYPE == "linux-"* ]]; then
python3 tests/run_tests.py -vr2 -t1 -k "paddle" -a "$TI_WANTED_ARCHS"
fi
python3 tests/run_tests.py -vr2 -t4 -k "not paddle" -a "$TI_WANTED_ARCHS"
fi
else
# Split per arch to increase parallelism for linux GPU tests
if [[ $TI_WANTED_ARCHS == *"cuda"* ]]; then
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a cuda
python3 tests/run_tests.py -vr2 -t4 -k "not torch and not paddle" -a cuda
fi
if [[ $TI_WANTED_ARCHS == *"cpu"* ]]; then
python3 tests/run_tests.py -vr2 -t8 -k "not torch" -a cpu
python3 tests/run_tests.py -vr2 -t8 -k "not torch and not paddle" -a cpu
fi
if [[ $TI_WANTED_ARCHS == *"vulkan"* ]]; then
python3 tests/run_tests.py -vr2 -t8 -k "not torch" -a vulkan
python3 tests/run_tests.py -vr2 -t8 -k "not torch and not paddle" -a vulkan
fi
if [[ $TI_WANTED_ARCHS == *"opengl"* ]]; then
python3 tests/run_tests.py -vr2 -t4 -k "not torch" -a opengl
python3 tests/run_tests.py -vr2 -t4 -k "not torch and not paddle" -a opengl
fi
python3 tests/run_tests.py -vr2 -t1 -k "torch" -a "$TI_WANTED_ARCHS"
# Paddle's paddle.fluid.core.Tensor._ptr() is only available on develop branch, and CUDA version on linux will get error `Illegal Instruction`
fi
4 changes: 3 additions & 1 deletion .github/workflows/scripts/win_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ Push-Location $libsDir
if (-not (Test-Path "taichi_llvm")) {
WriteInfo("Download and extract LLVM")
curl.exe --retry 10 --retry-delay 5 https://github.com/taichi-dev/taichi_assets/releases/download/llvm10/taichi-llvm-10.0.0-msvc2019.zip -LO
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE; }
7z x taichi-llvm-10.0.0-msvc2019.zip -otaichi_llvm
}
if (-not (Test-Path "taichi_clang")) {
WriteInfo("Download and extract Clang")
curl.exe --retry 10 --retry-delay 5 https://github.com/taichi-dev/taichi_assets/releases/download/llvm10/clang-10.0.0-win.zip -LO
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE; }
7z x clang-10.0.0-win.zip -otaichi_clang
}
$env:LLVM_DIR = "$libsDir\taichi_llvm"
Expand All @@ -60,6 +62,7 @@ if ($installVulkan) {
WriteInfo("Download and install Vulkan")
if (-not (Test-Path "VulkanSDK")) {
curl.exe --retry 10 --retry-delay 5 https://sdk.lunarg.com/sdk/download/1.2.189.0/windows/VulkanSDK-1.2.189.0-Installer.exe -Lo VulkanSDK.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE; }
$installer = Start-Process -FilePath VulkanSDK.exe -Wait -PassThru -ArgumentList @("/S");
$installer.WaitForExit();
}
Expand All @@ -76,7 +79,6 @@ python -m venv venv
. venv\Scripts\activate.ps1
python -m pip install wheel
python -m pip install -r requirements_dev.txt
python -m pip install -r requirements_test.txt
if (-not $?) { exit 1 }
WriteInfo("Building Taichi")
$env:TAICHI_CMAKE_ARGS += " -DCLANG_EXECUTABLE=$libsDir\\taichi_clang\\bin\\clang++.exe"
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/scripts/win_build_test_cpu.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Build script for windows CPU
# TODO unify this with the other Win scripts

param (
[switch]$clone = $false,
[switch]$install = $false,
[string]$libsDir = "C:\"
)

$ErrorActionPreference = "Stop"

$RepoURL = 'https://github.com/taichi-dev/taichi'

function WriteInfo($text) {
Write-Host -ForegroundColor Green "[BUILD] $text"
}

$libsDir = (Resolve-Path $libsDir).Path
if (-not (Test-Path $libsDir)) {
New-Item -ItemType Directory -Path $libsDir
}
Set-Location $libsDir

if (-not (Test-Path "taichi_llvm")) {
WriteInfo("Download and extract LLVM")
curl.exe --retry 10 --retry-delay 5 https://github.com/taichi-dev/taichi_assets/releases/download/llvm10/taichi-llvm-10.0.0-msvc2019.zip -LO
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE; }
7z x taichi-llvm-10.0.0-msvc2019.zip -otaichi_llvm
}
if (-not (Test-Path "taichi_clang")) {
WriteInfo("Download and extract Clang")
curl.exe --retry 10 --retry-delay 5 https://github.com/taichi-dev/taichi_assets/releases/download/llvm10/clang-10.0.0-win.zip -LO
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE; }
7z x clang-10.0.0-win.zip -otaichi_clang
}

WriteInfo("Setting the env vars")
$env:LLVM_DIR = "C://taichi_llvm"

#TODO enable build test
$env:TAICHI_CMAKE_ARGS = "-DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CC:BOOL=OFF -DTI_WITH_VULKAN:BOOL=OFF -DTI_WITH_CUDA:BOOL=OFF -DTI_BUILD_TESTS:BOOL=OFF"

#TODO: For now we need to hard code the compiler path from build tools 2019
$env:TAICHI_CMAKE_ARGS +=' -DCMAKE_CXX_COMPILER=C:/Program\ Files\ (x86)/Microsoft\ Visual\ Studio/2019/BuildTools/vc/Tools/Llvm/x64/bin/clang++.exe -DCMAKE_C_COMPILER=C:/Program\ Files\ (x86)/Microsoft\ Visual\ Studio/2019/BuildTools/vc/Tools/Llvm/x64/bin/clang.exe'
$env:TAICHI_CMAKE_ARGS += " -DCLANG_EXECUTABLE=C:\\taichi_clang\\bin\\clang++.exe"
$env:TAICHI_CMAKE_ARGS += " -DLLVM_AS_EXECUTABLE=C:\\taichi_llvm\\bin\\llvm-as.exe -DTI_WITH_VULKAN:BOOL=OFF"

WriteInfo("Checking clang compiler")
clang --version

WriteInfo("Enter the repository")
Set-Location .\taichi

# Get sccache
WriteInfo("Downloading sccache")
$env:CCACHE_DIR="${pwd}/ccache_cache"
$env:CCACHE_MAXSIZE="128M"
$env:CCACHE_LOGFILE="${pwd}/ccache_error.log"
WriteInfo("ccache dir: $Env:CCACHE_DIR")
md "$Env:CCACHE_DIR" -ea 0
if (-not (Test-Path "ccache-4.5.1-windows-64")) {
curl.exe --retry 10 --retry-delay 5 https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1-windows-64.zip -LO
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE; }
7z x ccache-4.5.1-windows-64.zip
$env:PATH += ";${pwd}/ccache-4.5.1-windows-64"
}
ccache -v -s

WriteInfo("Setting up Python environment")
conda activate py37
python -m pip install -r requirements_dev.txt
python -m pip install -r requirements_test.txt

# These have to be re-installed to avoid strange certificate issue
# on CPU docker environment
python -m pip install --upgrade --force-reinstall numpy
python -m pip install --upgrade --force-reinstall cmake
python -m pip install --upgrade --force-reinstall wheel
if (-not $?) { exit 1 }

WriteInfo("Building Taichi")
python setup.py install
if (-not $?) { exit 1 }
WriteInfo("Build finished")
ccache -s -v

# We skip the test for the moment due to the long job execution time.
#$env:TI_ENABLE_PADDLE = "0"
#WriteInfo("Testing Taichi")
#python tests/run_tests.py -vr2 -t4 -k "not torch and not paddle" -a cpu
#WriteInfo("Test finished")
16 changes: 12 additions & 4 deletions .github/workflows/scripts/win_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,26 @@ if ("$env:TI_WANTED_ARCHS".Contains("cuda")) {
pip install "torch==1.10.1+cu113; python_version < '3.10'" -f https://download.pytorch.org/whl/cu113/torch_stable.html
} else {
pip install "torch; python_version < '3.10'"
pip install "paddlepaddle==2.3.0; python_version < '3.10'"
}
# Fail fast, give priority to the error-prone tests
python tests/run_tests.py -vr2 -t1 -k "paddle" -a cpu
if (-not $?) { exit 1 }

# Disable paddle for the remaining test
$env:TI_ENABLE_PADDLE = "0"

if ("$env:TI_WANTED_ARCHS".Contains("cuda")) {
python tests/run_tests.py -vr2 -t4 -k "not torch" -a cuda
python tests/run_tests.py -vr2 -t4 -k "not torch and not paddle" -a cuda
if (-not $?) { exit 1 }
}
if ("$env:TI_WANTED_ARCHS".Contains("cpu")) {
python tests/run_tests.py -vr2 -t6 -k "not torch" -a cpu
python tests/run_tests.py -vr2 -t6 -k "not torch and not paddle" -a cpu
if (-not $?) { exit 1 }
}
if ("$env:TI_WANTED_ARCHS".Contains("opengl")) {
python tests/run_tests.py -vr2 -t4 -k "not torch" -a opengl
python tests/run_tests.py -vr2 -t4 -k "not torch and not paddle" -a opengl
if (-not $?) { exit 1 }
}
python tests/run_tests.py -vr2 -t2 -k "torch" -a "$env:TI_WANTED_ARCHS"
python tests/run_tests.py -vr2 -t1 -k "torch" -a "$env:TI_WANTED_ARCHS"
if (-not $?) { exit 1 }
Loading