Пример #1
0
dx11 = _ti_core.dx11
"""The DX11 backend.
"""
# ----------------------

gpu = [cuda, metal, opengl, vulkan, dx11]
"""A list of GPU backends supported on the current system.
Currently contains 'cuda', 'metal', 'opengl', 'vulkan', 'dx11'.

When this is used, Taichi automatically picks the matching GPU backend. If no
GPU is detected, Taichi falls back to the CPU backend.
"""
# ----------------------

cpu = _ti_core.host_arch()
"""A list of CPU backends supported on the current system.
Currently contains 'x64', 'x86_64', 'arm64', 'cc', 'wasm'.

When this is used, Taichi automatically picks the matching CPU backend.
"""
# ----------------------

timeline_clear = lambda: impl.get_runtime().prog.timeline_clear()  # pylint: disable=unnecessary-lambda
timeline_save = lambda fn: impl.get_runtime().prog.timeline_save(fn)  # pylint: disable=unnecessary-lambda

extension = _ti_core.Extension
"""An instance of Taichi extension.

The list of currently available extensions is ['sparse', 'async_mode', 'quant', \
    'mesh', 'quant_basic', 'data64', 'adstack', 'bls', 'assertion', \
Пример #2
0
def get_host_arch_list():
    return [_ti_core.host_arch()]
Пример #3
0
 def test(*args, **kwargs):
     archs = [_ti_core.host_arch()]
     for arch in archs:
         ti.init(arch=arch)
         _func(*args, **kwargs)