forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update banks to accept Const and stub addTensor initial API
- Loading branch information
1 parent
bedea83
commit 2c8e4fa
Showing
9 changed files
with
73 additions
and
19 deletions.
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,5 @@ | ||
// Copyright (C) 2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "lazy_tensor.hpp" |
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,53 @@ | ||
// Copyright (C) 2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include <list> | ||
#include <memory> | ||
#include <mutex> | ||
#include <tuple> | ||
#include <unordered_map> | ||
#include <variant> | ||
|
||
#include "openvino/runtime/make_tensor.hpp" | ||
#include "openvino/runtime/tensor.hpp" | ||
|
||
namespace ov { | ||
namespace npuw { | ||
namespace weights { | ||
|
||
enum class TransformType { | ||
ORIG, | ||
PERMUTE, | ||
CONVERT, | ||
CONCAT // TODO: support | ||
}; | ||
|
||
class LazyTensor { | ||
public: | ||
using Transform = std::variant<ov::Tensor, std::vector<std::size_t>, std::monostate>; | ||
|
||
class Hash { | ||
public: | ||
std::size_t operator()(const LazyTensor& lt) { | ||
// FIXME: implement | ||
return 0; | ||
} | ||
}; | ||
|
||
explicit LazyTensor() = default; | ||
|
||
bool operator==(const LazyTensor& other) { | ||
// FIXME: implement | ||
return false; | ||
} | ||
|
||
private: | ||
std::list<std::pair<TransformType, Transform>> m_transforms; | ||
}; | ||
|
||
} // namespace weights | ||
} // namespace npuw | ||
} // namespace ov |
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
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
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