提交 f9719828 编写于 作者: M Megvii Engine Team

feat(lite): add header licence

GitOrigin-RevId: bcd6860e8c8e8cdaaaeae5340284650547fb6a4b
上级 71230e9a
...@@ -50,6 +50,9 @@ Copyright 2016-2020 Advanced Micro Devices, Inc. ...@@ -50,6 +50,9 @@ Copyright 2016-2020 Advanced Micro Devices, Inc.
14. rocRAND 14. rocRAND
Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
15. json
Copyright (c) 2013-2021 Niels Lohmann
Terms of the MIT License: Terms of the MIT License:
-------------------------------------------------------------------- --------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
......
...@@ -43,6 +43,7 @@ option(MGE_ARMV8_2_FEATURE_FP16 "Enable armv8.2-a+fp16 support" OFF) ...@@ -43,6 +43,7 @@ option(MGE_ARMV8_2_FEATURE_FP16 "Enable armv8.2-a+fp16 support" OFF)
option(MGE_DISABLE_FLOAT16 "Disable MegEngine float16 support." OFF) option(MGE_DISABLE_FLOAT16 "Disable MegEngine float16 support." OFF)
option(MGE_WITH_CUDA "Enable MegEngine CUDA support." ON) option(MGE_WITH_CUDA "Enable MegEngine CUDA support." ON)
option(MGE_CUDA_USE_STATIC "Enable MegEngine CUDA static linking." ON) option(MGE_CUDA_USE_STATIC "Enable MegEngine CUDA static linking." ON)
option(MGE_WITH_LITE "Build MGE with lite" ON)
option(MGE_WITH_TRT "Build MegEngine with TensorRT." ON) option(MGE_WITH_TRT "Build MegEngine with TensorRT." ON)
option(MGE_WITH_CUDA_STUB "Build MegEngine with CUDA stub." ON) option(MGE_WITH_CUDA_STUB "Build MegEngine with CUDA stub." ON)
option(MGE_WITH_NVRTC_STUB "Build MegEngine with NVRTC stub." OFF) option(MGE_WITH_NVRTC_STUB "Build MegEngine with NVRTC stub." OFF)
...@@ -1179,3 +1180,7 @@ if(MGE_WITH_CUDA AND MGE_CUDA_USE_STATIC AND("${CUDNN_VERSION}" VERSION_GREATER ...@@ -1179,3 +1180,7 @@ if(MGE_WITH_CUDA AND MGE_CUDA_USE_STATIC AND("${CUDNN_VERSION}" VERSION_GREATER
message(WARNING "Static link CUDNN8 with many sm is unworkable, please use -DMGE_WITH_CUDNN_SHARED=ON or -DMGE_WITH_LARGE_ARCHIVE=ON -DMGE_CUDA_GENCODE=\"-gencode arch=compute_70,code=sm_70 arch=compute_75,code=sm_75\" ") message(WARNING "Static link CUDNN8 with many sm is unworkable, please use -DMGE_WITH_CUDNN_SHARED=ON or -DMGE_WITH_LARGE_ARCHIVE=ON -DMGE_CUDA_GENCODE=\"-gencode arch=compute_70,code=sm_70 arch=compute_75,code=sm_75\" ")
message(WARNING "Static link CUDNN8 with many sm is unworkable, please use -DMGE_WITH_CUDNN_SHARED=ON or -DMGE_WITH_LARGE_ARCHIVE=ON -DMGE_CUDA_GENCODE=\"-gencode arch=compute_70,code=sm_70 arch=compute_75,code=sm_75\" ") message(WARNING "Static link CUDNN8 with many sm is unworkable, please use -DMGE_WITH_CUDNN_SHARED=ON or -DMGE_WITH_LARGE_ARCHIVE=ON -DMGE_CUDA_GENCODE=\"-gencode arch=compute_70,code=sm_70 arch=compute_75,code=sm_75\" ")
endif() endif()
if(MGE_WITH_LITE)
add_subdirectory(lite)
endif()
...@@ -3,76 +3,7 @@ ...@@ -3,76 +3,7 @@
It is a lite warper of MegEngine, to enable MegEngine easy to be integrated in It is a lite warper of MegEngine, to enable MegEngine easy to be integrated in
user's SDK user's SDK
## bazel build ## 支持cmake构建
目前支持内部 bazel 和 CMake 编译,支持 C++/C, Python 接口,
下面是 bazel 中 lite_shared 目标的编译,可以作为其他目标的编译的参考,
该编译依赖内部 bazel 编译以及 megvii3。
### 配置编译环境
需要使用 megvii3 workspace 来完成 bazel 的编译
#### Clone megvii3 安装 bazel
```bash
git clone git@git-core.megvii-inc.com:brain-sdk/megvii3.git
./utils/bazel/get_bazel.sh
```
#### Clone megbrain
```
git submodule update brain/megbrain brain/midout
```
### 编译 x86 CUDA 版本
```bash
./bazel build //brain/megbrain/lite:lite_shared --cpu="k8" \
--compiler="gcc7_cuda10" -c opt
```
### 编译 x86 CPU 版本
```bash
./bazel build //brain/megbrain/lite:lite_shared --cpu="k8" \
--compiler="gcc9" -c opt
```
### 编译 arm OpenCL 版本
```bash
./bazel build //brain/megbrain/lite:lite_shared_shared --cpu=android_aarch64 \
-c opt --define enable_opencl=1 --define enable_opencl_search=1
```
### 编译 arm opencl lite_examples
bazel-3.0.0-megvii2 build //brain/megbrain/lite:lite_shared_examples \
--cpu=android_aarch64 --define enable_opencl=1 --define enable_opencl_search=1
####如何运行snpe_loder 的lite_exampes 请查看下面的wiki
https://wiki.megvii-inc.com/pages/viewpage.action?pageId=268786906
### 编译 armv7 CPU 版本
```bash
./bazel build //brain/megbrain/lite:lite_shared --cpu=android_armv7 \
-c opt
```
### 编译 arm64 CPU 版本
```bash
./bazel build //brain/megbrain/lite:lite_shared --cpu=android_aarch64 \
-c opt
```
### 编译 arm64 CPU v8.2 版本
```bash
./bazel build //brain/megbrain/lite:lite_shared --cpu=android_aarch64 \
--copt -march=armv8.2-a+fp16+dotprod -c opt
```
## 同时支持cmake构建
cmake构建参考scripts/cmake-build/BUILD_README.md,下面example表示同时支持编译megengine cmake构建参考scripts/cmake-build/BUILD_README.md,下面example表示同时支持编译megengine
和RKNPU后端且打开OpenCL的release模式 和RKNPU后端且打开OpenCL的release模式
```bash ```bash
...@@ -235,17 +166,3 @@ Lite 中提供自定义的方式,用户可以自定义自己 Info 部分的类 ...@@ -235,17 +166,3 @@ Lite 中提供自定义的方式,用户可以自定义自己 Info 部分的类
aes_encrypt.sh xxx.mdl xxx_encrypted.mdl \ aes_encrypt.sh xxx.mdl xxx_encrypted.mdl \
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
``` ```
* rc4_encypt.cpp 可以被编译成为一个 rc4 加密的工具,这个工具可以通过
制定的 key 或者默认的 key 加密制定的文件,支持 rc4 方法和
simple_fast_rc4 两种方法,支持自定义 key。
* bazel 编译 x86 命令为:
```bash
bazel build //brain/megbrain/lite:rc4_encryptor \
--cpu='k8' --compiler='gcc9'
```
* 加密文件,具体用法见 help
```bash
rc4_encryptor encrypt_predefined_rc4 \
to_be_encrypt.file encrypted.file
```
/** /**
* \file example/example.cpp * \file example/example.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file example/example.cpp * \file example/example.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite/global.h" #include "lite/global.h"
......
/** /**
* \file example/basic.cpp * \file example/basic.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <thread> #include <thread>
......
/** /**
* \file example/cpu_affinity.cpp * \file example/cpu_affinity.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "../example.h" #include "../example.h"
......
/** /**
* \file example/device_io.cpp * \file example/device_io.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <thread> #include <thread>
......
/** /**
* \file example/basic_c_interface.cpp * \file example/basic_c_interface.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "../example.h" #include "../example.h"
......
/** /**
* \file example/network_share_weights.cpp * \file example/network_share_weights.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "../example.h" #include "../example.h"
......
/** /**
* \file example/reset_io.cpp * \file example/reset_io.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "../example.h" #include "../example.h"
......
/** /**
* \file example/user_allocator.cpp * \file example/user_allocator.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "../example.h" #include "../example.h"
......
/** /**
* \file example/user_cryption.cpp * \file example/user_cryption.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "../example.h" #include "../example.h"
......
/** /**
* \file inlude/lite/common_enum_c.h * \file inlude/lite/common_enum_c.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#ifndef LITE_COMMON_ENUM_C_H_ #ifndef LITE_COMMON_ENUM_C_H_
......
/** /**
* \file inlude/lite/global.h * \file inlude/lite/global.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file include/lite/macro.h * \file include/lite/macro.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#ifndef LITE_MACRO_H_ #ifndef LITE_MACRO_H_
......
/** /**
* \file inlude/lite/network.h * \file inlude/lite/network.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file inlude/lite/tensor.h * \file inlude/lite/tensor.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file lite-c/include/lite-c/global-c.h * \file lite-c/include/lite-c/global-c.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#ifndef LITE_C_GLOBAL_H_ #ifndef LITE_C_GLOBAL_H_
......
/** /**
* \file lite-c/include/lite-c/network_c.h * \file lite-c/include/lite-c/network_c.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#ifndef LITE_C_NETWORK_H_ #ifndef LITE_C_NETWORK_H_
......
/** /**
* \file lite-c/include/lite-c/tensor_c.h * \file lite-c/include/lite-c/tensor_c.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#ifndef LITE_TENSOR_C_H_ #ifndef LITE_TENSOR_C_H_
......
/** /**
* \file lite-c/src/common.h * \file lite-c/src/common.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#ifndef LITE_C_COMMON_H_ #ifndef LITE_C_COMMON_H_
......
/** /**
* \file lite-c/src/tensor.cpp * \file lite-c/src/tensor.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite/global.h" #include "lite/global.h"
......
/** /**
* \file lite-c/src/network.cpp * \file lite-c/src/network.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite/network.h" #include "lite/network.h"
......
/** /**
* \file lite-c/src/tensor.cpp * \file lite-c/src/tensor.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite/tensor.h" #include "lite/tensor.h"
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
from .base import * from .base import *
from .global_setting import * from .global_setting import *
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import ctypes import ctypes
import glob import glob
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
from ctypes import * from ctypes import *
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
from ctypes import * from ctypes import *
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import logging import logging
from ctypes import * from ctypes import *
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
from ctypes import * from ctypes import *
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import threading import threading
import numpy as np import numpy as np
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import os import os
import re import re
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import os import os
import unittest import unittest
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import os import os
import unittest import unittest
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import functools import functools
import os import os
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import functools import functools
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is part of MegEngine, a deep learning framework developed by # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# Megvii.
# #
# Copyright (c) Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import functools import functools
......
/** /**
* \file src/decryption/aes_decrypt.h * \file src/decryption/aes_decrypt.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "./mbedtls/aes.h" #include "./mbedtls/aes.h"
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
* \file src/decryption/decrypt_base.h * \file src/decryption/decrypt_base.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License") * MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/decryption/rc4/rc4_cryption_base.h * \file src/decryption/rc4/rc4_cryption_base.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/decryption/rc4/rc4_cryption_impl.cpp * \file src/decryption/rc4/rc4_cryption_impl.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "rc4_cryption_impl.h" #include "rc4_cryption_impl.h"
......
/** /**
* \file src/decryption/rc4/rc4_cryption_impl.h * \file src/decryption/rc4/rc4_cryption_impl.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
#include "rc4_cryption_base.h" #include "rc4_cryption_base.h"
......
/** /**
* \file src/decryption/rc4_cryption.cpp * \file src/decryption/rc4_cryption.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "rc4_cryption.h" #include "rc4_cryption.h"
......
/** /**
* \file src/decryption/rc4_cryption.h * \file src/decryption/rc4_cryption.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/function_base.h * \file src/function_base.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/global.cpp * \file src/global.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <lite_build_config.h> #include <lite_build_config.h>
......
/** /**
* \file lite/src/lite_build_config.h.in * \file lite/src/lite_build_config.h.in
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#ifndef _HEADER_LITE_BUILD_CONFIG #ifndef _HEADER_LITE_BUILD_CONFIG
#define _HEADER_LITE_BUILD_CONFIG #define _HEADER_LITE_BUILD_CONFIG
......
/** /**
* \file lite/src/mge/algo_cache/file_cache.cpp * \file lite/src/mge/algo_cache/file_cache.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2020 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file lite/src/mge/algo_cache/file_cache.h * \file lite/src/mge/algo_cache/file_cache.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2020 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file lite/src/mge/algo_cache/redis_cache.cpp * \file lite/src/mge/algo_cache/redis_cache.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2020 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file lite/src/mge/algo_cache/redis_cache.h * \file lite/src/mge/algo_cache/redis_cache.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2020 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/mge/common.cpp * \file src/mge/common.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file src/mge/common.h * \file src/mge/common.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/mge/function_dft.h * \file src/mge/function_dft.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/mge/memory_alloctor.h * \file src/mge/memory_alloctor.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/mge/network_impl.cpp * \file src/mge/network_impl.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file src/mge/network_impl.h * \file src/mge/network_impl.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file inlude/mge/tensor.cpp * \file inlude/mge/tensor.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file src/mge/tensor_impl.h * \file src/mge/tensor_impl.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file inlude/misc.cpp * \file inlude/misc.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "./misc.h" #include "./misc.h"
......
/** /**
* \file include/misc.h * \file include/misc.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/network.cpp * \file src/network.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite/network.h" #include "lite/network.h"
......
/** /**
* \file src/network_impl_base.h * \file src/network_impl_base.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
* \file src/parse_info/default_parse.h * \file src/parse_info/default_parse.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License") * MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
* \file src/parse_info/parse_info_base.h * \file src/parse_info/parse_info_base.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License") * MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/model_parser.cpp * \file src/model_parser.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "model_parser.h" #include "model_parser.h"
......
/** /**
* \file src/model_parser.h * \file src/model_parser.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/tensor.cpp * \file src/tensor.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite/tensor.h" #include "lite/tensor.h"
......
/** /**
* \file src/tensor_impl_base.h * \file src/tensor_impl_base.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file src/type_info.h * \file src/type_info.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
...@@ -7,6 +7,10 @@ if (MGE_WITH_TEST) ...@@ -7,6 +7,10 @@ if (MGE_WITH_TEST)
if(LITE_BUILD_WITH_MGE) if(LITE_BUILD_WITH_MGE)
# lite_test will depends megbrain interface # lite_test will depends megbrain interface
target_link_libraries(lite_test megbrain) target_link_libraries(lite_test megbrain)
if (MGE_WITH_ROCM)
# FIXME: hip obj can not find cpp obj only through lite_static
target_link_libraries(lite_test megdnn)
endif ()
endif() endif()
if(UNIX) if(UNIX)
......
/** /**
* \file test/main.cpp * \file test/main.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <gtest/gtest.h> #include <gtest/gtest.h>
......
/** /**
* \file test/test_common.h * \file test/test_common.h
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once
......
/** /**
* \file test/test_misc.cpp * \file test/test_misc.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file test/test_network.cpp * \file test/test_network.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file test/test_network_c.cpp * \file test/test_network_c.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "../src/misc.h" #include "../src/misc.h"
......
/** /**
* \file test/test_network_options.cpp * \file test/test_network_options.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file test/test_tensor.cpp * \file test/test_tensor.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
/** /**
* \file test/test_tensor_c.cpp * \file test/test_tensor_c.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "lite_build_config.h" #include "lite_build_config.h"
......
#!/usr/bin/env mdl
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# #
# Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
# #
# Unless required by applicable law or agreed to in writing, # Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an # software distributed under the License is distributed on an
......
#!/usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
# #
# This file is part of MegEngine, a deep learning framework developed by # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
# Megvii.
# #
# copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. # Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import argparse import argparse
import struct import struct
......
/** \file tools/rc4_encrypt.cpp /** \file tools/rc4_encrypt.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
* *
* This file is part of MegEngine, a deep learning framework developed by * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
* Megvii.
* *
* \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved. * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <stdio.h> #include <stdio.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册