-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm] [aot] Add LLVM to CAPI part 5: Added C-API tests for Vulkan an…
…d Cuda backend (#5440) * [build] Enabled C-API compilation on CI * Fixed minor issue * Enabled CAPI compilation on windows build bots * Fixed minor issue * Removed LLVM-15 test on windows * [llvm] [aot] Add LLVM to CAPI part 4: Enabled C-API tests on CI & Add basic C-API interface test cases * Removed debug info * Fixed CI issues * Added C-API tests for LLVM-CPU backend * [llvm] [aot] Add LLVM to CAPI part 5: Added C-API tests for Vulkan backend * Minor bug fix * Added more test cases
- Loading branch information
1 parent
5d5cd9f
commit 7097c33
Showing
7 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "c_api_test_utils.h" | ||
#include "taichi/platform/cuda/detect_cuda.h" | ||
|
||
#ifdef TI_WITH_VULKAN | ||
#include "taichi/rhi/vulkan/vulkan_loader.h" | ||
#endif | ||
|
||
namespace capi { | ||
namespace utils { | ||
|
||
bool is_vulkan_available() { | ||
#ifdef TI_WITH_VULKAN | ||
return taichi::lang::vulkan::is_vulkan_api_available(); | ||
#else | ||
return false; | ||
#endif | ||
} | ||
|
||
bool is_cuda_available() { | ||
return taichi::is_cuda_api_available(); | ||
} | ||
|
||
} // namespace utils | ||
} // namespace capi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
#include <taichi/taichi_platform.h> | ||
|
||
namespace capi { | ||
namespace utils { | ||
|
||
TI_DLL_EXPORT bool TI_API_CALL is_vulkan_available(); | ||
TI_DLL_EXPORT bool TI_API_CALL is_cuda_available(); | ||
|
||
} // namespace utils | ||
} // namespace capi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters