This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Implement async compiler plugin #159
Open
yijia1212
wants to merge
1
commit into
iree-org:main
Choose a base branch
from
yijia1212:async-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,38 @@ | ||
# Copyright 2023 The OpenXLA Authors | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
load("@iree_core//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_register_plugin") | ||
|
||
package( | ||
default_visibility = ["//visibility:public"], | ||
features = ["layering_check"], | ||
licenses = ["notice"], # Apache 2.0 | ||
) | ||
|
||
cc_library( | ||
name = "defs", | ||
includes = ["../../.."], | ||
) | ||
|
||
cc_library( | ||
name = "registration", | ||
srcs = [ | ||
"PluginRegistration.cpp", | ||
], | ||
deps = [ | ||
":defs", | ||
"//compiler/src/openxla/compiler/async/Dialect/Async/IR", | ||
"//compiler/src/openxla/compiler/async/Dialect/Async/Transforms", | ||
"@iree_core//compiler/src/iree/compiler/PluginAPI", | ||
"@llvm-project//mlir:IR", | ||
"@llvm-project//mlir:Pass", | ||
], | ||
) | ||
|
||
iree_compiler_register_plugin( | ||
plugin_id = "openxla_async", | ||
target = ":registration", | ||
) |
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,44 @@ | ||
################################################################################ | ||
# Autogenerated by ../iree/build_tools/bazel_to_cmake/bazel_to_cmake.py from # | ||
# compiler/src/openxla/compiler/async/BUILD.bazel # | ||
# # | ||
# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary # | ||
# CMake-only content. # | ||
# # | ||
# To disable autogeneration for this file entirely, delete this header. # | ||
################################################################################ | ||
|
||
iree_add_all_subdirs() | ||
|
||
iree_cc_library( | ||
NAME | ||
defs | ||
INCLUDES | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../..>" | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../../..>" | ||
PUBLIC | ||
) | ||
|
||
iree_cc_library( | ||
NAME | ||
registration | ||
SRCS | ||
"PluginRegistration.cpp" | ||
DEPS | ||
::defs | ||
MLIRIR | ||
MLIRPass | ||
iree::compiler::PluginAPI | ||
openxla::compiler::async::Dialect::Async::IR | ||
openxla::compiler::async::Dialect::Async::Transforms | ||
PUBLIC | ||
) | ||
|
||
iree_compiler_register_plugin( | ||
PLUGIN_ID | ||
openxla_async | ||
TARGET | ||
::registration | ||
) | ||
|
||
### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ### |
11 changes: 11 additions & 0 deletions
11
compiler/src/openxla/compiler/async/Dialect/Async/BUILD.bazel
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 @@ | ||
# Copyright 2023 The OpenXLA Authors | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
package( | ||
default_visibility = ["//visibility:public"], | ||
features = ["layering_check"], | ||
licenses = ["notice"], # Apache 2.0 | ||
) |
13 changes: 13 additions & 0 deletions
13
compiler/src/openxla/compiler/async/Dialect/Async/CMakeLists.txt
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,13 @@ | ||
################################################################################ | ||
# Autogenerated by ../iree/build_tools/bazel_to_cmake/bazel_to_cmake.py from # | ||
# compiler/src/openxla/compiler/async/Dialect/Async/BUILD.bazel # | ||
# # | ||
# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary # | ||
# CMake-only content. # | ||
# # | ||
# To disable autogeneration for this file entirely, delete this header. # | ||
################################################################################ | ||
|
||
iree_add_all_subdirs() | ||
|
||
### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ### |
28 changes: 28 additions & 0 deletions
28
compiler/src/openxla/compiler/async/Dialect/Async/Conversion/BUILD.bazel
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,28 @@ | ||
# Copyright 2023 The OpenXLA Authors | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_library") | ||
|
||
package( | ||
default_visibility = ["//visibility:public"], | ||
features = ["layering_check"], | ||
licenses = ["notice"], # Apache 2.0 | ||
) | ||
|
||
cc_library( | ||
name = "AsyncToRuntime", | ||
srcs = ["ConvertAsyncToRuntime.cpp"], | ||
hdrs = ["ConvertAsyncToRuntime.h"], | ||
deps = [ | ||
"//compiler/src/openxla/compiler/async/Dialect/Async/IR", | ||
"@iree_core//compiler/src/iree/compiler/Dialect/Util/IR", | ||
"@llvm-project//llvm:Support", | ||
"@llvm-project//mlir:FuncDialect", | ||
"@llvm-project//mlir:IR", | ||
"@llvm-project//mlir:Pass", | ||
"@llvm-project//mlir:Transforms", | ||
], | ||
) |
31 changes: 31 additions & 0 deletions
31
compiler/src/openxla/compiler/async/Dialect/Async/Conversion/CMakeLists.txt
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,31 @@ | ||
################################################################################ | ||
# Autogenerated by ../iree/build_tools/bazel_to_cmake/bazel_to_cmake.py from # | ||
# compiler/src/openxla/compiler/async/Dialect/Async/Conversion/BUILD.bazel # | ||
# # | ||
# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary # | ||
# CMake-only content. # | ||
# # | ||
# To disable autogeneration for this file entirely, delete this header. # | ||
################################################################################ | ||
|
||
iree_add_all_subdirs() | ||
|
||
iree_cc_library( | ||
NAME | ||
AsyncToRuntime | ||
HDRS | ||
"ConvertAsyncToRuntime.h" | ||
SRCS | ||
"ConvertAsyncToRuntime.cpp" | ||
DEPS | ||
LLVMSupport | ||
MLIRFuncDialect | ||
MLIRIR | ||
MLIRPass | ||
MLIRTransforms | ||
iree::compiler::Dialect::Util::IR | ||
openxla::compiler::async::Dialect::Async::IR | ||
PUBLIC | ||
) | ||
|
||
### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ### |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please move it under
nvgpu
folder (andnamespace openxla::compiler::nvgpu::async
), it's not quite accurate, but it will get it covered by CI jobs, and we'll find a better place later