#include <malloc.h>
// call malloc_trim(0);
static double get_memory_resident()
{
unsigned long size;
unsigned long resident;
unsigned long share;
unsigned long text;
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c | |
index 45da83e6926..a2e079c9c95 100644 | |
--- a/bfd/elfxx-riscv.c | |
+++ b/bfd/elfxx-riscv.c | |
@@ -2104,13 +2104,6 @@ riscv_parse_check_conflicts (riscv_parse_subset_t *rps) | |
(_("`zfinx' is conflict with the `f/d/q/zfh/zfhmin' extension")); | |
no_conflict = false; | |
} | |
- if (riscv_lookup_subset (rps->subset_list, "xtheadvector", &subset) | |
- && riscv_lookup_subset (rps->subset_list, "v", &subset)) |
// g++ mul.cpp -o mul -mmsa -mloongson-mmi -O3 | |
// https://github.com/Tencent/ncnn/blob/master/src/layer/mips/loongson_mmi.h | |
// root@ls2k:~/ncnn/build# ./quant | |
// mul_s8x8 385.743 | |
// mul_s8x8_mmi 611.364 | |
// mul_s8x8_msa 173.241 | |
// -66 2 0 4 10 18 28 40 | |
// g++ -mfma -mf16c -mavx512f -mavx512vnni -mavx512vl | |
#include <immintrin.h> | |
#include <stdio.h> | |
static void print(const __m512& _x) | |
{ | |
__attribute__((aligned(64))) | |
float a[16]; |
#include <torch/script.h> | |
int main() | |
{ | |
c10::InferenceMode guard(true); | |
torch::NoGradGuard no_grad; | |
torch::jit::Module mod2 = torch::jit::load("stylegan.pt"); | |
mod2.eval(); |
#include <stdio.h> | |
// ncnn | |
#include <c_api.h> | |
/** test.param content | |
7767517 | |
3 3 | |
Input in0 0 1 input0 |
$ git push
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: 'https://github.com/nihui/ncnn.git/' 鉴权失败
$ git remote -v
origin https://github.com/nihui/ncnn.git (fetch)
from http.server import HTTPServer, SimpleHTTPRequestHandler | |
import ssl, os | |
os.system("openssl req -nodes -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -subj '/CN=mylocalhost'") | |
port = 8888 | |
httpd = HTTPServer(('0.0.0.0', port), SimpleHTTPRequestHandler) | |
httpd.socket = ssl.wrap_socket(httpd.socket, keyfile='key.pem', certfile="cert.pem", server_side=True) | |
print(f"Server running on https://0.0.0.0:{port}") | |
httpd.serve_forever() |
- github 上点 fork 按钮 fork 到 https://github.com/nihui/ncnn.git
- git clone https://github.com/nihui/ncnn.git
- cd ncnn
- git remote add upstream https://github.com/Tencent/ncnn.git
我不 PR,就像让 https://github.com/nihui/ncnn.git 的内容和 upstream 一模一样,就像刚 fork 时候的那样子,不要落后了
- cd ncnn
NCNN adopts the factory pattern to create the layers of a nueral network. It's also the way the well-known library Caffe takes. It differs from Caffe in the implementation of the registry table. On one hand, the Caffe registry is populated in runtime as the side effect of initializion of global variable (which is a popular way for library initialization). On the other hand, the NCNN registry is determined in compile time. The registry is generated in a brilliant way using CMake instead of a hand-crafted table. NCNN's approach provides several benefits compared to Caffe's approach.
First, it's suitable for building a static library. When building a static library, the linker will strip any unused global variable to minimize the size of the library. This makes sense but it also strips the global variable which need to be inintialized to insert te layer creator into the registry. Tricky linker flags and related instrutions are required to resolve this issue. By creating