Skip to content

Initial commit to add experimental ROCM backend - #5881

Merged
ThomasRaoux merged 1 commit into
iree-org:mainfrom
harsh-nod:main
May 17, 2021
Merged

ThomasRaoux merged 1 commit into
iree-org:mainfrom
harsh-nod:main

Conversation

@harsh-nod

Copy link
Copy Markdown
Contributor

This patch adds the compiler passes to lower linalg to
ROCDL and adds the ROCMTarget. The code follows the CUDA
backend closely.

@google-cla google-cla Bot added the cla: yes label May 13, 2021
#ifndef IREE_COMPILER_CONVERSION_LINALGTOLLVMGPU_LLVMGPUCODEGENOPTIONS_H_
#define IREE_COMPILER_CONVERSION_LINALGTOLLVMGPU_LLVMGPUCODEGENOPTIONS_H_

#include "llvm/ADT/SmallVector.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like it should be needed here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks will remove.

LogicalResult matchAndRewrite(
Operation *op, ArrayRef<Value> operands,
ConversionPatternRewriter &rewriter) const override;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move those pattern in the cpp file and expose populate* functions only

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sound good

#ifndef IREE_COMPILER_CONVERSION_LINALGTOLLVMGPU_LLVMGPUCODEGENOPTIONS_H_
#define IREE_COMPILER_CONVERSION_LINALGTOLLVMGPU_LLVMGPUCODEGENOPTIONS_H_

#include "llvm/ADT/SmallVector.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't seem needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks will remove

/// A pattern to convert hal.interface.workgroup.id/count/size into
/// corresponding NVVM/ROCDL ops.
template <typename InterfaceOpTy, typename XOp, typename YOp, typename ZOp>
struct HALInterfaceWorkgroupOpsConverter final

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should lower to GPU dialect IDs, so that we don't need different behavior between NVVM and ROCDL. I think it is fine to do as one of the first step of ConvertToNVVM/ConvertToROCDL this way we don't have to keep this pattern in the header. Later we'll probably want to do it earlier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. Sure will keep this as is for now then. Should I create an issue for the lowering to GPU dialect IDs so that it is tracked as one of the next work items?

@@ -0,0 +1,104 @@
// Copyright 2021 Nod Labs
// Copyright 2021 Google LLC

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we pick a more specific file name than Common.cpp? Maybe ConvertToLLVMCommon.cpp or just ConverToLLVM.cpp?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I will rename it ConvertToLLVM.cpp

namespace IREE {
namespace HAL {

ROCMTargetOptions getROCMTargetOptionsFromFlags() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably have a common class between CUDA and ROCM and inherit from it. This could be done later if we don't know how much is going to be shared.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a good idea but currently I do not know how much will be shared. Yes, let's keep that decision late-binding and we can revisit when we have more information.

@@ -0,0 +1,104 @@
// Copyright 2021 Nod Labs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these additional copyright notices might cause problems for us (at the least I will need to contact lawyers before proceeding 😕 ). IANAL, but my understanding from https://opensource.google/docs/releasing/contributions/#copyright is that the presence of them doesn't actually affect the contributors rights in any way, so if you're ok with just leaving this off, that would be my preference. Otherwise, I can contact our licensing team to discuss the options.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure that's fine. I can remove the Nod Labs copyright headers from this patch.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed my blocking review, but I'll let Thomas review for actual content

@GMNGeoffrey
GMNGeoffrey self-requested a review May 14, 2021 01:06
@GMNGeoffrey
GMNGeoffrey dismissed their stale review May 14, 2021 01:08

Copyright issue resolved

namespace mlir {
namespace iree_compiler {

namespace {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the patterns in an anonymous namespace.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure will do


void buildTranslationPassPipeline(OpPassManager &passManager) override {
auto codeGenOptions = getLLVMGPUCodegenOptionsFromClOptions();
buildLLVMGPUTransformPassPipeline(passManager, codeGenOptions);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the only way to get the correct is to have the right command option? We should always target AMDGPU from here, why not pass the right option?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes looks like we can probably do away with LLVMGPUCodegenOptions completely. I will rework the patch to address that.


void buildTranslationPassPipeline(OpPassManager &passManager) override {
buildNVVMTransformPassPipeline(passManager);
auto codeGenOptions = getLLVMGPUCodegenOptionsFromClOptions();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here we should pass the right option.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

OwningRewritePatternList &patterns,
LLVMTypeConverter &converter) {
patterns.insert<ConvertFunc, ConvertIREEBindingOp>(context, converter);
auto codeGenOptions = getLLVMGPUCodegenOptionsFromClOptions();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't get the option from command line here, it should be passed by the caller.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, will modify the function signature appropriately

@GMNGeoffrey
GMNGeoffrey removed their request for review May 14, 2021 02:28
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
This patch adds the compiler passes to lower linalg to
ROCDL and adds the ROCMTarget. The code follows the CUDA
backend closely.
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 17, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
@ThomasRaoux
ThomasRaoux merged commit f6d36fe into iree-org:main May 17, 2021
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
raikonenfnu added a commit to raikonenfnu/iree that referenced this pull request May 18, 2021
Initial pass to integrate ROCm in to IREE so that we can Codegen and run on AMDGPUs. Following steps similar to thomasraoux's CUDA backend. Since ROCm do not have graph or CommandBuffer by default, we implement ROCm's command buffer with Arrays. Tested out and pass most CTS tests except:
semaphore_submission_test + semaphore_test-> some functionalities not implemented for rocm backend yet
command_buffer_test -> some quirk with hipErrorNotInitialized during launch of kernel + CommandBufferTest.CopySubBuffer

**-Does depend on harsh-nod's [PR](iree-org#5881

In the next patch:
-Complete semaphore functionality
-Squash CommandBuffer bugs
@hanhanW hanhanW mentioned this pull request May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants