[^0]: Additionally, the name “Utopia” translates to 乌托邦
in Chinese.
[^0]: Additionally, the name “Utopia” translates to 乌托邦
in Chinese.
Latent Dirichlet Allocation (2003)
该篇论文于2003年发表在“Journal of Machine Learning Research”期刊上,迄今引用次数已超过15000次,可见该论文对后来相关研究工作的影响之大。
首次正式将主题以隐变量的形式引入,形成一个三层贝叶斯模型,并且相比于之前和它最接近的pLSI文本模型,LDA的主题选取不再受训练集文本内容的束缚,是一个完全非监督且依据多个主题进行聚类的机器学习、数据挖掘领域的算法。
在推荐系统的研究中,利用评论文本信息来提升推荐性能是近3-4年的一个热门研究领域,LDA及其改良的文本模型则是用来挖掘评论文本的主要方式。
最重要的是LDA模型的两个参数,确定了后能在未知的文本里提取主题
暂无
暂无
https://zhuanlan.zhihu.com/p/28777266
https://blog.csdn.net/fish0058/article/details/25075591
https://blog.csdn.net/anqiu4023/article/details/102275607
现代计算机微架构是最复杂的几个人造系统。在上面预测,解释和优化软件是困难的。我们需要其运行行为的可信模型,但是事实是稀缺的。
本文设计和实现了一种构建X86指令的延迟,吞吐量和端口使用的可信模型。并仔细探究了这三个指标的定义。尤其是latency的值在不同的操作数情况时是如何确定的。
同时其结果也是机器可读的。并且对已有的所有Intel架构都进行了测试。
官网有结果 http://www.uops.info
We also plan to release the source code of our tool as open source
balabala~
我们的工具可以用来优化llvm-mca等软件。
Future work includes adapting our algorithms to AMD x86 CPUs. 官网已经实现了。
We would also like to extend our approach tocharacterize other undocumented performance-relevant aspects of the pipeline, e.g., regarding micro and macro-fusion, or whether instructions use the simple decoder, the complex decoder, or the Microcode-ROM.
暂无
暂无
一种新的profiler,可以profile没有用户干预的内存访问的基本块。
基于这种profiler创建了BHive,来验证llvm-mca等模型。
BHive是用来评价llvm-mca这些模型的,实验基于各种收集来的一个基本块各种评价
困难在于现有的 没有考虑 memory crash ??? .默认命中L1 cache
A key technical challenge with collecting a large basic block dataset is that there is no existing approach to profile an arbitrary basic block that has been removed from its program
context.
(没懂?那为什么要removed from its program
context) 因为要把常用的应用拆成小例子来评判,这些模型的准确性。
运用隐含狄利克雷分布LDA,基于cpu资源的利用率,来cluster benchmark suite里的基本块
通过对各种类型最基本的代码块来进行profile,从而形成针对各种performance model的数据库。
现在已经有超过30万的基本块分析,来源于各种方向的应用,包括数值计算OpenBLAS,数据库SQLite,机器学习TensorFlow,密码学OpenSSL。
这么多的数据产生了一个用于评估performance model的新benchmark。
作者说performance modeling 研究的未来在于与其他先进技术的大规模定量比较
通过把虚拟页面映射到单个物理页面,来合法内存访问同时避免cache miss
有两种model
各种model, 写到另一篇里了
unroll factor
(典型值是100)unroll factor
就是循环展开次数。目标是在不需要手动干预的情况下分析任意基本块,以便测量的吞吐量与性能模型通常假定的定义和不变量相对应。关键的挑战是使这些基本块能够在不崩溃的情况下访问任意内存地址。
由于基本块只是正常程序的一部分,导致根本不能单独正常运行。BHive做的事情就是,让他正常运行。
这个代码块只有执行代码分配在0x4110a
时,才能正常运行
通过重复运行基本块来计算吞吐量
只要架构满足以下几点要求
应用的选择
We compiled all applications with the highest optimization settings defined by their build systems. 如果可以用上了AVX2。
使用DynamoRIO动态分析来提炼基本块。可以实现在运行时记录每个运行的基本块。我们采用动态分析,而不是静态反汇编。因为静态反汇编无法区别padding bytes from instructions。???
应用的例子除了FFmpeg and Gzip都是选择的官方的benchmark。
Eigen 采用的是 two sparse linear algebra workloads: sparse matrix-matrix multiplication (SpMM) and sparse matrix-vector multiplication (SpMV).
一些基本块比其他的更难建模,???(建什么模,VI-B说明了什么)有内存依赖的基本块预测错误率更高。
采用了一种技术???(是应用在提取上) 基于处理器的使用聚类基本块。
这个技术有助于性能模型的设计和使用者更细粒度了解performance model,让他们能集中以后新添加的资源在有困难的那一类基本块。
xor %rax, %rbx
in Haswell is {p0156 → 1}
在3种Intel架构上验证4种已有的性能模型
现有的静态分析器对内存依赖和向量化块的建模还有困难。
benchmark/sources
下是各种软件的各个部分的16进制基本代码块和其出现概率,用csv格式(逗号分隔值 (Comma-separated values))存储benchmark/throughput
是在各种架构下的各基本块的测量吞吐量,单位cycles per hundred-iterations.benchmark/disasm
可以把16进制代码通过nasm
变成汇编,timing-harness
uops 的文章, Accurate Throughput Prediction of Basic Blocks on Recent Intel Microarchitectures
4.2 Extending BHive
hhex2bin
转换为二进制create_shm_fd
shm_open, shm_unlink
creates and opens a new, or opens or unlink an existing, POSIX shared memory object. O_RDWR
Open the object for read-write access.O_CREAT
the shared memory object if it does not exist. 777
是类似文件读写执行组权限的东西 On success, shm_open() returns
a file descriptor (a nonnegative integer)
POSIX
可移植操作系统接口The Portable Operating System Interface 是IEEE为要在各种UNIX操作系统上运行软件,而定义API的一系列互相关联的标准的总称。
ftruncate
— truncate截短 a file to a specified length
#define SIZE_OF_HARNESS_MEM (4096 * 3)
measure
开始测量pipe
用于创建pipe,用来进程间通信的单向数据通路,传入变量用来返回引用自pipe末端的文件描述符file descriptors。第一个指向the read end of the pipe,第二个指向the write end of the pipemmap(void *addr, size_t length, int prot, int flags,int fd, off_t offset); munmap(void *addr, size_t length);
- map or unmap files or devices into memory 在调用进程的虚拟地址空间里create a new mapping.attach_to_child(pid, fds[1]);
pid是子进程pidptrace(enum __ptrace_request request, pid_t pid,void *addr, void *data)
- process trace 提供一种进程tracer跟踪控制另一个进程tracee的方法,可以修改被控制者的memory and registers.PTRACE_SEIZE
Attach to the process specified in pid, making it a tracee of the calling process. Unlike PTRACE_ATTACH, PTRACE_SEIZE does not stop the processrdpmc_open_attr
initialize a raw ring 3 ReaDable PerforMance Counterwait
挂起当前线程,直到有一个children结束,返回其PIDWIFEXITED
Wait_IF_EXITED 判断是否正常结束PTRACE_CONT
Restart the stopped tracee processhttps://www.cnblogs.com/from-zero/p/13750852.html
暂无
问题是x86的二进制或者汇编不能变成aarm64的二进制或者汇编。