Skip to content

Commit 5791f6a

Browse files
Added license and removed dnnl_graph_compiler.hpp (#63)
1 parent 9547810 commit 5791f6a

File tree

3 files changed

+40
-28
lines changed

3 files changed

+40
-28
lines changed

src/dnnl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include(onednn)
22

3-
gc_add_path(GC_LIB_SOURCES GLOB "*.*pp")
3+
gc_add_path(GC_LIB_SOURCES GLOB "*.cpp")
44
gc_add_path(GC_LIB_INCLUDES ${DNNL_INCLUDES})

src/dnnl/dnnl_graph_compiler.cpp

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,48 @@
1-
#include "dnnl_graph_compiler.hpp"
1+
/*
2+
* Copyright (C) 2024 Intel Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions
14+
* and limitations under the License.
15+
*
16+
* SPDX-License-Identifier: Apache-2.0
17+
*/
18+
19+
#include "dnnl_graph_compiler.h"
220
#include "gc_version.h"
21+
#include <memory>
322
#include <new>
23+
#include <string_view>
424

525
// dnnl_graph_compiler.h interface implementation.
626
// TODO: Implement.
727

28+
struct dnnl_graph_compiler_executable {
29+
// TODO: Implement
30+
31+
void execute(dnnl_graph_compiler_tensor *inputs,
32+
dnnl_graph_compiler_tensor *outputs) const;
33+
};
34+
35+
struct dnnl_graph_compiler {
36+
const dnnl_graph_compiler_context ctx;
37+
38+
explicit dnnl_graph_compiler(const dnnl_graph_compiler_context *context)
39+
// TODO: Initialize ctx with context or defaults if context is nullptr
40+
: ctx() {}
41+
42+
[[nodiscard]] std::unique_ptr<const dnnl_graph_compiler_executable>
43+
compile(const std::string_view &graph_json) const;
44+
};
45+
846
const dnnl_graph_compiler_version *dnnl_graph_compiler_get_version(void) {
947
static const dnnl_graph_compiler_version ver = {
1048
.api_version = {DNNL_GC_API_V_MAJOR, DNNL_GC_API_V_MINOR,

src/dnnl/dnnl_graph_compiler.hpp

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)