#今日看了什么
#学习
Victima: Drastically Increasing Address Translation Reach by Leveraging Underutilized Cache Resources
https://arxiv.org/pdf/2310.04158
#学习
Victima: Drastically Increasing Address Translation Reach by Leveraging Underutilized Cache Resources
https://arxiv.org/pdf/2310.04158
中国共产党第十七届、十八届、十九届中央政治局常委,国务院原总理李克强同志,近日在上海休息,2023年10月26日因突发心脏病,经全力抢救无效,于10月27日0时10分在上海逝世,享年68岁。讣告后发。
https://content-static.cctvnews.cctv.com/snow-book/index.html?item_id=17611136792319939361
https://content-static.cctvnews.cctv.com/snow-book/index.html?item_id=17611136792319939361
感觉从微架构设计的角度来说,ARM把发射宽度从6拉到10是不成熟的设计,比苹果还差了非常多。
给人一种香山的感觉🤯
给人一种香山的感觉🤯
Cascade: CPU Fuzzing via Intricate Program Generation https://comsec.ethz.ch/research/hardware-design-security/cascade-cpu-fuzzing-via-intricate-program-generation/
Daniel Lemire's blog
Appending to an std::string character-by-character: how does the capacity grow?
In C++, suppose that you append to a string one character at a time:
In theory, it might be possible for the C++ runtime library to implement this routine as the creation of a new string with each append: it could allocate a new memory region that contains just one extra character, and copy to the new region. It would be very slow in the worst case. Of course, the people designing the runtime libraries are aware of such potential problem. Instead of allocating memory and copying with each append, they will typically grow the memory usage in bulk. That is, every time new memory is needed, they double the memory usage (for example).
Empirically, we can measure the allocation. Starting with an empty string, we may add one character at a time. I find that GCC 12 uses capacities of size 15 × 2 k for every increasing integers k, so that the string capacities are 15, 30, 60, 120, 240, 480, 960, 1920, etc. Under macOS (LLVM 15), I get that clang doubles the capacity and add one, except for the initial doubling, so you get capacities of 22, 47, 95, 191, 383, 767, etc. So the string capacity grows exponentially.
If you omit the cost of writing the character, what is the cost of these allocations and copy for long strings? Assume that allocating N bytes costs you N units of work. Let us consider the GCC 12 model : they both lead to the same conclusion. To construct a string of size up to 15 × 2n, it costs you 15 + 15 × 21 + 15 × 22 + … + 15 × 2n which is 15 × (2n + 1 – 1). Generally speaking, you find that this incremental doubling approach costs you no more than 2N units of work to construct a string of size N. In computer science parlance, the complexity is linear. In common sense parlance, it scales well.
A consequence of how strings allocate memory is that you may find that many of your strings have excess capacity if you construct them by repeatedly appending characters. To save memory, you may call the method shrink_to_fit() to remove this excess capacity.
source
Appending to an std::string character-by-character: how does the capacity grow?
In C++, suppose that you append to a string one character at a time:
while(my_string.size() <= 10'000'000) {
my_string += "a";
}
In theory, it might be possible for the C++ runtime library to implement this routine as the creation of a new string with each append: it could allocate a new memory region that contains just one extra character, and copy to the new region. It would be very slow in the worst case. Of course, the people designing the runtime libraries are aware of such potential problem. Instead of allocating memory and copying with each append, they will typically grow the memory usage in bulk. That is, every time new memory is needed, they double the memory usage (for example).
Empirically, we can measure the allocation. Starting with an empty string, we may add one character at a time. I find that GCC 12 uses capacities of size 15 × 2 k for every increasing integers k, so that the string capacities are 15, 30, 60, 120, 240, 480, 960, 1920, etc. Under macOS (LLVM 15), I get that clang doubles the capacity and add one, except for the initial doubling, so you get capacities of 22, 47, 95, 191, 383, 767, etc. So the string capacity grows exponentially.
If you omit the cost of writing the character, what is the cost of these allocations and copy for long strings? Assume that allocating N bytes costs you N units of work. Let us consider the GCC 12 model : they both lead to the same conclusion. To construct a string of size up to 15 × 2n, it costs you 15 + 15 × 21 + 15 × 22 + … + 15 × 2n which is 15 × (2n + 1 – 1). Generally speaking, you find that this incremental doubling approach costs you no more than 2N units of work to construct a string of size N. In computer science parlance, the complexity is linear. In common sense parlance, it scales well.
A consequence of how strings allocate memory is that you may find that many of your strings have excess capacity if you construct them by repeatedly appending characters. To save memory, you may call the method shrink_to_fit() to remove this excess capacity.
source
Chips and Cheese
Cinebench 2024: Reviewing the Benchmark
#ChipAndCheese
Telegraph | source
(author: clamchowder)
Cinebench 2024: Reviewing the Benchmark
#ChipAndCheese
Telegraph | source
(author: clamchowder)
How many billions of transistors in your iPhone processor?
In about 10 years, Apple has multiplied by 19 the number of transistors in its mobile processors. It corresponds roughly to a steady rate of improvement of 34% per year on the number of transistors, or a doubling every 2.5 years. In real dollars, an iPhone has roughly a constant price: the price tag of a new iPhone increases every year, but it does so while tracking the inflation. Thus you are getting ever more transistors in your iPhone for the same price.
source
Chips and Cheese
Arm Announces Total Design: Taking Neoverse CSS Forward
#ChipAndCheese
Telegraph | source
(author: Nexus)
Arm Announces Total Design: Taking Neoverse CSS Forward
#ChipAndCheese
Telegraph | source
(author: Nexus)
杰哥的{运维,编程,调板子}小笔记
Clang 如何支持 CUDA 程序
前言
编译 CUDA 程序的主要工具是 NVIDIA 提供的闭源编译器 NVCC,但实际上,NVCC 是基于 LLVM 开发的(来源:NVIDIA CUDA Compiler),NVIDIA 也把 NVCC 其中一部分逻辑贡献给了 LLVM 上游,使得 Clang 也可以在 CUDA 的配合下编译 CUDA 程序。这篇博客尝试研究 Clang/LLVM 如何实现 CUDA 程序的编译,主要是 Clang 前端部分,后端部分,也就是从 LLVM IR 到 NVPTX 的这一步还没有进行深入的研究。
source
Clang 如何支持 CUDA 程序
前言
编译 CUDA 程序的主要工具是 NVIDIA 提供的闭源编译器 NVCC,但实际上,NVCC 是基于 LLVM 开发的(来源:NVIDIA CUDA Compiler),NVIDIA 也把 NVCC 其中一部分逻辑贡献给了 LLVM 上游,使得 Clang 也可以在 CUDA 的配合下编译 CUDA 程序。这篇博客尝试研究 Clang/LLVM 如何实现 CUDA 程序的编译,主要是 Clang 前端部分,后端部分,也就是从 LLVM IR 到 NVPTX 的这一步还没有进行深入的研究。
source