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

Large (> 2**30) range for fails on Vulkan backend #6461

Open
strongoier opened this issue Oct 28, 2022 · 0 comments
Open

Large (> 2**30) range for fails on Vulkan backend #6461

strongoier opened this issue Oct 28, 2022 · 0 comments
Assignees
Labels
potential bug Something that looks like a bug but not yet confirmed vulkan Vulkan backend

Comments

@strongoier
Copy link
Contributor

Describe the bug
When a range for has range > 2**30, it cannot work correctly under Vulkan backend.

To Reproduce

import taichi as ti

ti.init(arch=ti.vulkan, offline_cache=False)

@ti.kernel
def count() -> ti.i32:
    res = 2**30 + 1
    for i in range(res):
        res -= 1
    return res

print(count())  # -387, but it should be 0

Log/Screenshots

[Taichi] version 1.3.0, llvm 10.0.0, commit cd5a97c8, linux, python 3.8.10
[Taichi] Starting on arch=vulkan
[W 10/28/22 13:27:09.052 955659] [program.cpp:Program@160] Out-of-bound access checking is not supported on arch=vulkan
[W 10/28/22 13:27:09.064 955659] [vulkan_program.cpp:materialize_runtime@134] Enabling vulkan validation layer in debug mode
[W 10/28/22 13:27:09.066 955659] [vulkan_device_creator.cpp:vk_debug_callback@49] validation layer: 1, loader_add_to_layer_list: Explicit layer VK_LAYER_KHRONOS_validation is using an old API version 1.2 versus application requested 1.3
[W 10/28/22 13:27:09.071 955659] [vulkan_device_creator.cpp:vk_debug_callback@49] validation layer: 2, Validation Warning: [ VUID_Undefined ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x79de34d4 | Unrecognized CreateInstance->pCreateInfo->pApplicationInfo.apiVersion number (0x00403000). Assuming VK_API_VERSION_1_2.
[I 10/28/22 13:27:09.080 955659] [vulkan_device_creator.cpp:pick_physical_device@399] Found Vulkan Device 0 (llvmpipe (LLVM 12.0.0, 256 bits))
[I 10/28/22 13:27:09.080 955659] [vulkan_device_creator.cpp:pick_physical_device@399] Found Vulkan Device 1 (NVIDIA GeForce RTX 3090)
[I 10/28/22 13:27:09.080 955659] [vulkan_device_creator.cpp:find_queue_families@148] Async compute queue 2, graphics queue 0
[I 10/28/22 13:27:09.081 955659] [vulkan_device_creator.cpp:find_queue_families@148] Async compute queue 2, graphics queue 0
[I 10/28/22 13:27:09.081 955659] [vulkan_device_creator.cpp:create_logical_device@469] Vulkan Device "NVIDIA GeForce RTX 3090" supports Vulkan 0 version 1.3.205

Additional comments
My first attempts of investigation reveals that this is not a numerical problem, as normal calculations for integers > 2**30 works fine. It seems related to the number of launched threads.

@strongoier strongoier added potential bug Something that looks like a bug but not yet confirmed vulkan Vulkan backend labels Oct 28, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Oct 28, 2022
@neozhaoliang neozhaoliang moved this from Untriaged to In Progress in Taichi Lang Oct 28, 2022
@lin-hitonami lin-hitonami moved this from In Progress to Backlog in Taichi Lang Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed vulkan Vulkan backend
Projects
Status: Backlog
Development

No branches or pull requests

2 participants