From 6c021598dd0baa475e5fea3c111e2f212f4a1274 Mon Sep 17 00:00:00 2001 From: PGZXB Date: Thu, 13 Oct 2022 15:35:58 +0800 Subject: [PATCH 1/5] Update document about offline cache --- docs/lang/articles/performance_tuning/performance.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/lang/articles/performance_tuning/performance.md b/docs/lang/articles/performance_tuning/performance.md index 2355d60f2790a..39031aed7750a 100644 --- a/docs/lang/articles/performance_tuning/performance.md +++ b/docs/lang/articles/performance_tuning/performance.md @@ -241,7 +241,17 @@ We address this problem by introducing the *offline* cache feature, which dumps To verify the effect, run some examples twice and observe the launch overhead: ![](../static/assets/effect_of_offline_cache.png) -For now, the offline cache feature works *only* on the CPU and CUDA backends. +Supported backends: +| Backend | Supported or not | +| ----------- | ----------- | +| CPU | ✔ | +| CUDA | ✔ | +| Vulkan | ✔ | +| OpenGL | ✔ | +| Metal | ✔ | +| CC | ❌ | +| Microsoft DirectX 11 | ❌ | +| Microsoft DirectX 12 | ❌ | :::note If your code behaves abnormally, disable offline cache by setting the environment variable `TI_OFFLINE_CACHE=0` or `offline_cache=False` in the `ti.init()` method call and file an issue with us on [Taichi's GitHub repo](https://github.com/taichi-dev/taichi/issues/new/choose). From acaa2b0b5bcf03d238b6c70e36921ca0bb9d2b5e Mon Sep 17 00:00:00 2001 From: PGZXB Date: Thu, 13 Oct 2022 15:55:00 +0800 Subject: [PATCH 2/5] Update docs/lang/articles/performance_tuning/performance.md Co-authored-by: Yi Xu --- docs/lang/articles/performance_tuning/performance.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/lang/articles/performance_tuning/performance.md b/docs/lang/articles/performance_tuning/performance.md index 39031aed7750a..2f78685a46aa6 100644 --- a/docs/lang/articles/performance_tuning/performance.md +++ b/docs/lang/articles/performance_tuning/performance.md @@ -242,6 +242,7 @@ To verify the effect, run some examples twice and observe the launch overhead: ![](../static/assets/effect_of_offline_cache.png) Supported backends: + | Backend | Supported or not | | ----------- | ----------- | | CPU | ✔ | From 0e91e8f5b08b0a2618f5ce5c57f8488e87de9b29 Mon Sep 17 00:00:00 2001 From: PGZXB Date: Thu, 13 Oct 2022 16:08:02 +0800 Subject: [PATCH 3/5] Update --- .../articles/performance_tuning/performance.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/lang/articles/performance_tuning/performance.md b/docs/lang/articles/performance_tuning/performance.md index 2f78685a46aa6..75118ec1d0cf0 100644 --- a/docs/lang/articles/performance_tuning/performance.md +++ b/docs/lang/articles/performance_tuning/performance.md @@ -245,14 +245,14 @@ Supported backends: | Backend | Supported or not | | ----------- | ----------- | -| CPU | ✔ | -| CUDA | ✔ | -| Vulkan | ✔ | -| OpenGL | ✔ | -| Metal | ✔ | -| CC | ❌ | -| Microsoft DirectX 11 | ❌ | -| Microsoft DirectX 12 | ❌ | +| CPU | :heavy_check_mark: | +| CUDA | :heavy_check_mark: | +| Vulkan | :heavy_check_mark: | +| OpenGL | :heavy_check_mark: | +| Metal | :heavy_check_mark: | +| CC | :x: | +| Microsoft DirectX 11 | :x: | +| Microsoft DirectX 12 | :x: | :::note If your code behaves abnormally, disable offline cache by setting the environment variable `TI_OFFLINE_CACHE=0` or `offline_cache=False` in the `ti.init()` method call and file an issue with us on [Taichi's GitHub repo](https://github.com/taichi-dev/taichi/issues/new/choose). From 7003a0c2a4bbc7d4d56143a3a85b2ca4f8699cd1 Mon Sep 17 00:00:00 2001 From: PGZXB Date: Thu, 13 Oct 2022 19:52:51 +0800 Subject: [PATCH 4/5] FIx --- .../articles/performance_tuning/performance.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docs/lang/articles/performance_tuning/performance.md b/docs/lang/articles/performance_tuning/performance.md index 75118ec1d0cf0..91cfc31c44ab6 100644 --- a/docs/lang/articles/performance_tuning/performance.md +++ b/docs/lang/articles/performance_tuning/performance.md @@ -238,22 +238,6 @@ We address this problem by introducing the *offline* cache feature, which dumps * `'lru'`: Discards the cached files least used recently; * `'fifo'`: Discards the cached files added in the earliest. -To verify the effect, run some examples twice and observe the launch overhead: -![](../static/assets/effect_of_offline_cache.png) - -Supported backends: - -| Backend | Supported or not | -| ----------- | ----------- | -| CPU | :heavy_check_mark: | -| CUDA | :heavy_check_mark: | -| Vulkan | :heavy_check_mark: | -| OpenGL | :heavy_check_mark: | -| Metal | :heavy_check_mark: | -| CC | :x: | -| Microsoft DirectX 11 | :x: | -| Microsoft DirectX 12 | :x: | - :::note If your code behaves abnormally, disable offline cache by setting the environment variable `TI_OFFLINE_CACHE=0` or `offline_cache=False` in the `ti.init()` method call and file an issue with us on [Taichi's GitHub repo](https://github.com/taichi-dev/taichi/issues/new/choose). ::: From e9a819b529d49511e9adf892fb913c290d5a987f Mon Sep 17 00:00:00 2001 From: PGZXB Date: Thu, 13 Oct 2022 20:41:27 +0800 Subject: [PATCH 5/5] Fix --- docs/lang/articles/performance_tuning/performance.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/lang/articles/performance_tuning/performance.md b/docs/lang/articles/performance_tuning/performance.md index 91cfc31c44ab6..01294856f53dc 100644 --- a/docs/lang/articles/performance_tuning/performance.md +++ b/docs/lang/articles/performance_tuning/performance.md @@ -238,6 +238,9 @@ We address this problem by introducing the *offline* cache feature, which dumps * `'lru'`: Discards the cached files least used recently; * `'fifo'`: Discards the cached files added in the earliest. +To verify the effect, run some examples twice and observe the launch overhead: +![](../static/assets/effect_of_offline_cache.png) + :::note If your code behaves abnormally, disable offline cache by setting the environment variable `TI_OFFLINE_CACHE=0` or `offline_cache=False` in the `ti.init()` method call and file an issue with us on [Taichi's GitHub repo](https://github.com/taichi-dev/taichi/issues/new/choose). :::