diff --git a/c_api/tests/c_api_interop_test.cpp b/c_api/tests/c_api_interop_test.cpp index e4c5e47c24fbd..73ae75c58bd31 100644 --- a/c_api/tests/c_api_interop_test.cpp +++ b/c_api/tests/c_api_interop_test.cpp @@ -60,31 +60,6 @@ TEST_F(CapiTest, AotTestCudaBufferInterop) { } } } -#endif - -#if TI_WITH_VULKAN - -static void texture_interop_test(TiArch arch) { - ti::Runtime runtime(arch); - - ti::Texture tex_0 = - runtime.allocate_texture2d(128, 128, TI_FORMAT_RGBA8, TI_NULL_HANDLE); - - TiVulkanImageInteropInfo viii{}; - ti_export_vulkan_image(runtime, tex_0.image(), &viii); - ti_import_vulkan_image(runtime, &viii, VK_IMAGE_VIEW_TYPE_2D, - VK_IMAGE_LAYOUT_UNDEFINED); - - ti_track_image_ext(runtime, tex_0.image(), TI_IMAGE_LAYOUT_SHADER_READ_WRITE); - runtime.wait(); -} - -TEST_F(CapiTest, AotTestVulkanTextureInterop) { - if (ti::is_arch_available(TI_ARCH_VULKAN)) { - TiArch arch = TiArch::TI_ARCH_VULKAN; - texture_interop_test(arch); - } -} TEST_F(CapiTest, TestCPUImport) { TiArch arch = TiArch::TI_ARCH_X64; @@ -118,6 +93,31 @@ TEST_F(CapiTest, TestCPUImport) { EXPECT_EQ(data_out[2], 3.0); EXPECT_EQ(data_out[3], 4.0); } +#endif // TI_WITH_LLVM + +#if TI_WITH_VULKAN + +static void texture_interop_test(TiArch arch) { + ti::Runtime runtime(arch); + + ti::Texture tex_0 = + runtime.allocate_texture2d(128, 128, TI_FORMAT_RGBA8, TI_NULL_HANDLE); + + TiVulkanImageInteropInfo viii{}; + ti_export_vulkan_image(runtime, tex_0.image(), &viii); + ti_import_vulkan_image(runtime, &viii, VK_IMAGE_VIEW_TYPE_2D, + VK_IMAGE_LAYOUT_UNDEFINED); + + ti_track_image_ext(runtime, tex_0.image(), TI_IMAGE_LAYOUT_SHADER_READ_WRITE); + runtime.wait(); +} + +TEST_F(CapiTest, AotTestVulkanTextureInterop) { + if (ti::is_arch_available(TI_ARCH_VULKAN)) { + TiArch arch = TiArch::TI_ARCH_VULKAN; + texture_interop_test(arch); + } +} #endif // TI_WITH_VULKAN #ifdef TI_WITH_CUDA diff --git a/tests/python/test_ndrange.py b/tests/python/test_ndrange.py index 925473566b9c5..c41a9dab6b6b5 100644 --- a/tests/python/test_ndrange.py +++ b/tests/python/test_ndrange.py @@ -63,7 +63,7 @@ def func(): assert x[i, j, k] == 0 -@test_utils.test() +@test_utils.test(exclude=ti.gles) def test_tensor_based_3d(): x = ti.field(ti.i32, shape=(6, 6, 6)) y = ti.field(ti.i32, shape=(6, 6, 6))