上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: 1 for old in *.png;do 2 3 new=$(echo $old | sed s/abc/xyz/) 4 5 mv $old $new 6 7 done 阅读全文
posted @ 2023-06-27 14:21 xuyv 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 原因是docker中用于进程共享的/dev/shm (shared memory)不够,只有64M。 这样multiprocessing在分配shared memory的时候就失败了。 如何增大shared memory? 见: https://www.cnblogs.com/simpleminds 阅读全文
posted @ 2023-04-28 10:24 xuyv 阅读(33) 评论(0) 推荐(0) 编辑
摘要: std::string跟普通的c++对象一样,在对应的local/global的域内自动释放(包括string指向的字符串)。 因此 { std::string abc = "abc"; } "abc"在花括号外就被自动释放了。 而char* 不一样,如果不用New,而是用char* abc = " 阅读全文
posted @ 2023-02-16 10:26 xuyv 阅读(168) 评论(0) 推荐(0) 编辑
摘要: PIC机制,主要是为了program可以在内存地址空间复用,从而节约内存。 PIC机制总是和GOT表在一起。GOT表每个进程一份,维护了到唯一一份SO的symbol跳转表。 如进程A需要调用func,首先经过GOT,找到func的重定位地址。 The rationale behind this in 阅读全文
posted @ 2022-12-01 11:43 xuyv 阅读(81) 评论(0) 推荐(0) 编辑
摘要: SECONDS=0 sleep 5 sleep 7 echo "Elapsed Time (using \$SECONDS): $SECONDS seconds" 参考 https://www.baeldung.com/linux/bash-calculate-time-elapsed 阅读全文
posted @ 2022-11-22 14:35 xuyv 阅读(18) 评论(0) 推荐(0) 编辑
摘要: mechanism determines how to do something; policies determin what will be done. policies machanism example: the use of card keys to gain access to lock 阅读全文
posted @ 2022-09-15 14:36 xuyv 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 分支和__syncthreads容易产生死锁。 见: https://stackoverflow.com/questions/6666382/can-i-use-syncthreads-after-having-dropped-threads 阅读全文
posted @ 2022-08-01 19:55 xuyv 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 原来git就有内置命令bisect,寻找引入bug的那个commit。 之前还傻乎乎地自己弄个binary search。。。 使用方式见git help bisect,比自己记录是方便一些的。 阅读全文
posted @ 2022-07-19 16:08 xuyv 阅读(44) 评论(0) 推荐(0) 编辑
摘要: chris latner写的一篇介绍性文章 https://www.aosabook.org/en/llvm.html llvm初识的一些tutorial https://releases.llvm.org/2.2/docs/tutorial/ 用LLVM写一个BF语言的JIT编译器 (对比Hali 阅读全文
posted @ 2022-07-19 14:58 xuyv 阅读(23) 评论(0) 推荐(0) 编辑
摘要: PyTroch似乎引进了一些有趣的JIT编译功能,用来优化性能,包括做一些fusion。 可以看下的项目: torchdynymo: https://github.com/pytorch/torchdynamo 似乎用了triton NVFuser: https://github.com/pytor 阅读全文
posted @ 2022-07-19 14:23 xuyv 阅读(332) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页