From cc467006dac0444f9d5ac09207cb9fd645da1a6a Mon Sep 17 00:00:00 2001 From: zeyuli Date: Sat, 31 Dec 2022 11:51:15 +0800 Subject: [PATCH 1/2] add macro to control amdgpu-related header file --- taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp | 1 - taichi/runtime/llvm/llvm_runtime_executor.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp b/taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp index 4e6418e96518e..333a16008ae7c 100644 --- a/taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp +++ b/taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp @@ -3,7 +3,6 @@ namespace taichi { namespace lang { namespace amdgpu { - AmdgpuCachingAllocator::AmdgpuCachingAllocator(LlvmDevice *device) : device_(device) { } diff --git a/taichi/runtime/llvm/llvm_runtime_executor.cpp b/taichi/runtime/llvm/llvm_runtime_executor.cpp index b137aba54f632..4640b276c4d06 100644 --- a/taichi/runtime/llvm/llvm_runtime_executor.cpp +++ b/taichi/runtime/llvm/llvm_runtime_executor.cpp @@ -6,14 +6,14 @@ #include "taichi/rhi/cuda/cuda_device.h" #include "taichi/platform/cuda/detect_cuda.h" #include "taichi/rhi/cuda/cuda_driver.h" -#include "taichi/rhi/amdgpu/amdgpu_driver.h" -#include "taichi/rhi/amdgpu/amdgpu_device.h" #if defined(TI_WITH_CUDA) #include "taichi/rhi/cuda/cuda_context.h" #endif #if defined(TI_WITH_AMDGPU) +#include "taichi/rhi/amdgpu/amdgpu_driver.h" +#include "taichi/rhi/amdgpu/amdgpu_device.h" #include "taichi/rhi/amdgpu/amdgpu_context.h" #endif From ebe1df19ddbb229cf2a88c453f5810abd884dd8e Mon Sep 17 00:00:00 2001 From: zeyuli Date: Sat, 31 Dec 2022 11:52:23 +0800 Subject: [PATCH 2/2] revert --- taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp b/taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp index 333a16008ae7c..4e6418e96518e 100644 --- a/taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp +++ b/taichi/rhi/amdgpu/amdgpu_caching_allocator.cpp @@ -3,6 +3,7 @@ namespace taichi { namespace lang { namespace amdgpu { + AmdgpuCachingAllocator::AmdgpuCachingAllocator(LlvmDevice *device) : device_(device) { }