Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support front end compile for job to iree #8249

Merged
merged 90 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
975b5c2
support frontend dev version
howin98 May 18, 2022
4bcce47
polish name
howin98 May 18, 2022
12d8f13
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 May 21, 2022
7edf49b
add tosa-to-elf.mlir
howin98 May 21, 2022
bae3b08
tosa to elf by llvm
howin98 May 24, 2022
1ae209e
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 May 24, 2022
754c843
conv2d partial
howin98 May 25, 2022
f3b0342
an enhanced frontend runner
howin98 May 25, 2022
e66d554
support numpy as input
howin98 May 25, 2022
085838c
enable multiple using nn graph with different input(jobname make it …
howin98 May 25, 2022
c93eba6
enable multiple input
howin98 May 25, 2022
e025340
enable cpu and cuda
howin98 May 25, 2022
6c7f592
change full_name to _full_name
howin98 May 25, 2022
c09cc54
support exchange cuda with cpu seamlessly
howin98 May 25, 2022
9eb7261
remove pip
howin98 May 25, 2022
f8fc9a7
lit config
howin98 May 25, 2022
b2296e1
polish
howin98 May 25, 2022
9b3c628
trim
howin98 May 25, 2022
9b66023
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 May 25, 2022
13eecd1
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 May 26, 2022
a2e522e
auto format by CI
oneflow-ci-bot May 26, 2022
ac8b768
modify
howin98 May 26, 2022
48f7efa
Merge branch 'support-mlir-frontend-compile' of github.com:Oneflow-In…
howin98 May 26, 2022
8ab39a4
auto format by CI
oneflow-ci-bot May 26, 2022
35b17d2
last line polish
howin98 May 26, 2022
e7ae956
Merge branch 'support-mlir-frontend-compile' of github.com:Oneflow-In…
howin98 May 26, 2022
2bcb9d3
use unittest
howin98 May 26, 2022
e24320c
auto format by CI
oneflow-ci-bot May 26, 2022
d870ffb
use allclose
howin98 May 26, 2022
ad049fa
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 May 26, 2022
15de230
modify
howin98 May 26, 2022
15aff81
auto format by CI
oneflow-ci-bot May 26, 2022
8521ff0
pulish
howin98 May 26, 2022
1d1a7f5
Merge branch 'support-mlir-frontend-compile' of github.com:Oneflow-In…
howin98 May 26, 2022
59d02f7
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 May 26, 2022
4adfff8
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 May 27, 2022
e8aaa33
optimize convert oneflow to tosa
howin98 May 27, 2022
228cc5b
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 May 28, 2022
d3249d9
conv2d
howin98 May 28, 2022
a84f710
conv2d enhanced && conv2d examples add
howin98 May 28, 2022
7c4c2a7
add road map
howin98 May 30, 2022
1133efb
add add_n2Op and boardcast_addOp conversion
howin98 May 30, 2022
5232781
add matmulOp conversion
howin98 May 30, 2022
9d729db
support converting normailzation op to tosa(partically)
howin98 May 31, 2022
093e626
update roadmap
howin98 May 31, 2022
5b125a8
support i64 tensor to dense elem attr
howin98 Jun 2, 2022
fd7e1bb
support 100% resnet op conversion
howin98 Jun 2, 2022
32e0db0
add test mlir
howin98 Jun 2, 2022
f638ef2
add test iree resnet python script
howin98 Jun 2, 2022
cd3a959
auto format by CI
oneflow-ci-bot Jun 2, 2022
7fe44a5
done
howin98 Jun 5, 2022
4e645ee
modify test
howin98 Jun 5, 2022
c3f3ea8
enhance iree resnet test script
howin98 Jun 5, 2022
532f09b
auto format by CI
oneflow-ci-bot Jun 6, 2022
d7a12ac
rebuild code
howin98 Jun 6, 2022
c61fc88
merge
howin98 Jun 6, 2022
b5013f9
auto format by CI
oneflow-ci-bot Jun 6, 2022
38572a3
rebuild test script
howin98 Jun 6, 2022
e36f17e
Merge branch 'support-mlir-frontend-compile' of github.com:Oneflow-In…
howin98 Jun 7, 2022
f9cbb09
update
howin98 Jun 7, 2022
09b450b
auto format by CI
oneflow-ci-bot Jun 7, 2022
d13bda1
pub
howin98 Jun 7, 2022
609b533
merge
howin98 Jun 7, 2022
0c023b1
trim test scripts
howin98 Jun 7, 2022
61d2935
move
howin98 Jun 7, 2022
bb8c131
move
howin98 Jun 7, 2022
c7ff121
input and output add block arg judgement
howin98 Jun 7, 2022
9ac31d2
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 Jun 7, 2022
48345d2
emit error in variable conversion
howin98 Jun 8, 2022
f7a6c1c
error handle for ci
howin98 Jun 8, 2022
a703d85
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 Jun 8, 2022
3a7d1ff
modify err info
howin98 Jun 9, 2022
257461c
auto format by CI
oneflow-ci-bot Jun 9, 2022
056e307
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 Jun 9, 2022
8a8a988
Merge branch 'support-mlir-frontend-compile' of github.com:Oneflow-In…
howin98 Jun 9, 2022
4356b44
merge
howin98 Jun 9, 2022
9647bbb
auto format by CI
oneflow-ci-bot Jun 9, 2022
c2861ce
output not block
howin98 Jun 9, 2022
54df8b7
Merge branch 'support-mlir-frontend-compile' of github.com:Oneflow-In…
howin98 Jun 9, 2022
dc61a2b
flow ones
howin98 Jun 9, 2022
d344799
rm const
howin98 Jun 9, 2022
e50b1b2
trim maybe
howin98 Jun 9, 2022
91a482a
trim maybe with header file
howin98 Jun 9, 2022
7030d91
const auto
howin98 Jun 9, 2022
23e4195
Merge branch 'master' of github.com:Oneflow-Inc/oneflow into support-…
howin98 Jun 9, 2022
13cb457
solve clangd error
howin98 Jun 9, 2022
0f25107
Merge branch 'master' into support-mlir-frontend-compile
mergify[bot] Jun 9, 2022
5d48659
fix
howin98 Jun 10, 2022
8179fe3
Merge branch 'master' into support-mlir-frontend-compile
mergify[bot] Jun 10, 2022
12a4c69
Merge branch 'master' into support-mlir-frontend-compile
mergify[bot] Jun 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions oneflow/api/python/framework/nn_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,18 @@ ONEFLOW_API_PYBIND11_MODULE("nn.graph.", m) {
m.def("RunLazyNNGraph", &RunLazyNNGraph);
m.def("SoftSyncNNGraphBuffers", &SoftSyncNNGraphBuffers);
m.def("AddTensorAsGraphLoss", &AddTensorAsGraphLoss);
m.def("ConvertJobToTosaIR", [](const std::string& serialized_job) -> Maybe<std::string> {
Job job;
CHECK_OR_RETURN(TxtString2PbMessage(serialized_job, &job))
<< "serialized job conversion failed.";
return ConvertJobToTosaIR(&job);
});
m.def("SaveJobToIR",
[](const std::string& serialized_job, const std::string& path) -> Maybe<void> {
Job job;
CHECK_OR_RETURN(TxtString2PbMessage(serialized_job, &job));
CHECK_OR_RETURN(TxtString2PbMessage(serialized_job, &job))
<< "serialized job conversion failed.";
return SaveJobToIR(&job, path);
;
});
m.def("LoadSerializedJobFromIR", [](const std::string& path) -> Maybe<py::bytes> {
Job job;
Expand Down
4 changes: 4 additions & 0 deletions oneflow/core/job/job_ir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ namespace oneflow {

#ifndef WITH_MLIR

Maybe<std::string> ConvertJobToTosaIR(Job* job) {
UNIMPLEMENTED_THEN_RETURN() << "ConvertJobToTosaIR is only supported WITH_MLIR";
}

Maybe<void> SaveJobToIR(Job* job, const std::string& path) {
UNIMPLEMENTED_THEN_RETURN() << "SaveJobToIR is only supported WITH_MLIR";
}
Expand Down
1 change: 1 addition & 0 deletions oneflow/core/job/job_ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ limitations under the License.

namespace oneflow {

Maybe<std::string> ConvertJobToTosaIR(Job* job);
Maybe<void> SaveJobToIR(Job* job, const std::string& path);
Maybe<void> LoadJobFromIR(Job* job, const std::string& path);

Expand Down
Loading