This repository was archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[Numpy] FFI: split and svd #17816
Merged
Merged
[Numpy] FFI: split and svd #17816
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8d371a3
Support ADT as FFI return value
meta-project-ci 842ec72
Special operator= for NDArrayHandle
meta-project-ci a5a6146
SVD
meta-project-ci 43f717b
Support cython
meta-project-ci c4cc3a7
Clear
meta-project-ci d9148c0
Add split
meta-project-ci 2a4198c
Refine
meta-project-ci 4706207
Fix ci
meta-project-ci 45ed1ba
Fix typo
meta-project-ci 9e9f3f3
Clear
meta-project-ci ef7d877
Resolve sanity issues
meta-project-ci 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,52 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| /*! | ||
| * \file ndarray_handle.h | ||
| * \brief NDArray handle types | ||
| */ | ||
| #ifndef MXNET_RUNTIME_NDARRAY_HANDLE_H_ | ||
| #define MXNET_RUNTIME_NDARRAY_HANDLE_H_ | ||
| #include <mxnet/ndarray.h> | ||
| #include <mxnet/runtime/object.h> | ||
|
|
||
| namespace mxnet { | ||
|
|
||
| class NDArrayHandleObj : public Object { | ||
| public: | ||
| /*! \brief the Internal value. */ | ||
| NDArray* value; | ||
|
|
||
| static constexpr const char* _type_key = "MXNet.NDArrayHandle"; | ||
| MXNET_DECLARE_FINAL_OBJECT_INFO(NDArrayHandleObj, Object) | ||
| }; | ||
|
|
||
| class NDArrayHandle : public ObjectRef { | ||
| public: | ||
| explicit NDArrayHandle(NDArray* value) { | ||
| runtime::ObjectPtr<NDArrayHandleObj> node = make_object<NDArrayHandleObj>(); | ||
| node->value = value; | ||
| data_ = std::move(node); | ||
| } | ||
| MXNET_DEFINE_OBJECT_REF_METHODS(NDArrayHandle, ObjectRef, NDArrayHandleObj) | ||
| }; | ||
|
|
||
| }; // namespace mxnet | ||
|
|
||
| #endif // MXNET_RUNTIME_NDARRAY_HANDLE_H_ |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -108,3 +108,4 @@ | |
|
|
||
| from . import _api_internal | ||
| from . import api | ||
| from . import container | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.