- 博客(13)
- 收藏
- 关注
原创 Introduction to RDMA: Connection Establishment
1. Connection Establishmentconnection-oriented transports require a connection establishment between the two hosts before the data could be sent.Problem: how to exchange information before connection is estbalished2. Connection ManagerRDMA CM is the conn
2025-05-24 12:04:01
226
原创 Introduction to RDMA: Code Examples
【代码】Introduction to RDMA: Code Examples。
2025-05-24 11:32:02
592
原创 Introduction to RDMA: RDMA Operations
1. Send &Receive (Two-sided operation)2. Write (One-sided operation)One-sided operation: the sender initiates the operation and the receive side software remains uninvolvedwhere it should be written.At receiver, the hardware is responsible to locate memory
2025-05-24 10:19:17
364
原创 Introduction to RDMA: Memory Management
1. Memory managementTraditional:RDMA: memory registration (Control path)2. Three Important verbsA queue pair is a transport endpoint just like a socket for TCP communication. It's a synchronized interface for sending and receiving messages.A completion que
2025-05-22 17:12:51
462
原创 Introduction to RDMA: RDMA Verbs
1. RDMA VerbsVerbs is the API for RDMA applications, divided into two sectionsControl path: including resource allocation, modification and destruction, typically involving the operation system,Data path: this is the path where we send and receive data. I
2025-05-22 16:23:17
1220
原创 Introduction to RDMA
1. Three key concepts (1) transport offload: the overhead of filling network headers and transfering data from user application to network interface is passed from the OS to the dedicated hardware(2) kernel bypass: the OS can be bypassed to transfer data
2025-05-22 13:07:26
952
原创 C++/Python 备战机考 (五)深搜-二叉树-其他
7.深搜(1题)(1) HJ41.称砝码看着是深度搜索,结果一做,复杂度太高,用set去重简单多了8.二叉树(2题)(1) *leetcode 剑指offer 32 — II.从上到下打印二叉树 II分层打印的话,可以考虑用level来标记一下或者 每次打印一层所有的结点,这种方法的空间消耗最小(2) leetcode 剑指offer 32 — III.从上到下打印二叉树 III和上一题差不多,只是有reverse的操作,num.reverse() 原地翻转9.其他(6题)
2025-04-16 21:36:02
372
原创 C++/python 备战机考(四) 栈-排列组合-双指针
另一种方法是,每一次选一个位置,让后后面的位置和它swap一下,我感觉不是很好理解,不过复杂度会稍微小一些,不用每次都遍历所有数组。通过比较前后的字母是否相等,来剪枝避免重复也很容易懂,visited[i-1]=false才是同一层。借鉴二进制的枚举来解决这个问题,每个位置都是可能或者不能被枚举到,dfs遍历所有可能。用dfs做排列组合很好懂,每一层选一个没有用过的就行,缺点是每次都要遍历数组。(2) *leetcode 1614.括号的最大嵌套深度。(2) leetcode 77.组合 (n,k)
2025-04-14 15:21:06
311
原创 C++/python 机考备战: 枚举法中用到的函数库itertools
函数结果类型是否考虑顺序是否允许重复元素举例(输入[1,2,3], r=2)组合否否排列是否product笛卡尔积是是如果你有某个具体场景或想实现的功能,也可以告诉我,我来给你举个例子更清楚地说明!
2025-04-07 22:23:07
388
原创 c++/Python备战华为机考题 (三)排序
key是判断大小的函数,sorted 默认是升序排列,reverse=True 就是降序排列。之前觉得c++的运行效率高,所以写c++。但是机考的时候经常超时,写不完所有题目。sorted 函数对tuple进行排列,按第一个值升序,第二个值降序。注意sorted(ans) 会返回一个新数列, 而不改变原数列。所以还是选用好用的python 作为辅助吧。(2) *HJ14.字符串排序。(3) HJ27.查找兄弟单词。(4) *NC37.合并区间。(5) *HJ68.成绩排序。(1) HJ8.合并表记录。
2025-04-04 11:31:48
223
原创 C++/python备考华为机考 (二)字符串操作
要求密码不存在大于2的公共子序列,可以用滑动窗口的方法 提取窗口为3的子字符串 substr(i,3),存在字典中。逆序排列可以直接用 reverse(s.begin(),s.end()) <algorithm>函数库。getline(cin,s)读到/n才停止,getline(cin,s,' ')读到分隔符停止。=EOF 做正则匹配,:字符串的分割, s.substr(pos),从pos开始的子字符串。
2025-03-28 22:26:31
346
原创 c++备战华为机考题 (一)
技巧:利用哈希表储存 map[target-num[i]],这样O(1)操作找到对应的值是否存在。在限定数组大小的情况下,比如1<=a<=100;就可以用一个100维的数组,用空间换时间。跳台阶很经典,逆向解决问题,动态规划,f(n)=f(n-1)+f(n-2)a[i]-'0' 和a[i]-'A’ 将字符转化为数字。技巧:str.find('x') 找到特定字符的位置。题目:找出数组中两数之和等于target,返回下标。解法一:递归的方法,简洁但是会耗费很多栈空间。(3)快速排序:HJ3.明明的随机数。
2025-03-25 20:10:49
459
原创 博客摘录「 一文弄懂Batch Norm / Layer Norm / Instance Norm / Group Norm 归一化方法」2024年9月4日
BN主要缺点是对batchsize的大小比较敏感,由于每次计算均值和方差是在一个batch上,所以如果batchsize太小,则计算的均值、方差不足以代表整个数据分布。因为在图像风格化中,生成结果主要依赖于某个图像实例,所以对整个batch归一化不适合图像风格化中,因而对HW做归一化。可以加速模型收敛,并且保持每个图像实例之间的独立。LayerNorm:channel方向做归一化,算CxHxW的均值,主要对RNN(处理序列)作用明显,目前大火的Transformer也是使用的这种归一化操作;
2024-09-04 16:09:21
291
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅