我一直在玩NVIDIA分析器(nvprof),有两个我不明白的特定指标:
inst_inter_thread_communication
Number of inter-thread communication instructions executed by non-predicated threads
inst_misc
Number of miscellaneous instructions executed by non-predicated threads
Run Code Online (Sandbox Code Playgroud)
我只是想知道什么指令是线程间通信指令以及哪些指令属于杂项.
参考:http: //docs.nvidia.com/cuda/profiler-users-guide/#metrics-reference
ARM 事务内存扩展对如何使用它们有相当简单的描述:
sem_post:
TSTART X0 // Start of outer transaction
CBNZ test_fail // No reason for this routine to cancel or fail
LDR X1, [X2] // X2 points to semaphore
ADD X1, X1, #1 // Increment semaphore value
STR X1, [X2]. // Store incremented value
TCOMMIT // Commit transaction and exit
Run Code Online (Sandbox Code Playgroud)
我想要弄清楚的是,这些事务是否基于与代码其他部分中的事务的冲突而重放,以及它们是否基于与任何类型的访问的冲突而重放。为了详细说明,假设我们有这个例程:
sem_wait:
TSTART X0 // Start of outer transaction
CBNZ retry_check // This routine checks for retry (RTRY) and restarts transaction
LDR X1, [X2] // X2 points to semaphore …Run Code Online (Sandbox Code Playgroud)