一句话:提出统一张量粒度的异构 TEE,消除 CPU/NPU 安全协同计算中的元数据、MAC 与重加密开销。
现有 CPU-NPU 异构协同计算中,TEE 因 CPU 与 NPU 内存粒度不同且过细而效率低下:CPU TEE 的 cacheline 粒度加剧内存压力,NPU 的 cacheline 粒度 MAC 消耗有限存储,跨 enclave 数据传输需经非安全区并重加密和调度。TensorTEE 提出统一张量粒度的异构 TEE:在 CPU TEE 中虚拟支持张量粒度,通过片上检测与维护张量结构消除片外元数据访问;采用带预测执行的张量粒度 MAC 管理,消除片外 MAC 存储与访问并避免停顿;基于统一粒度实现无需重加密的直接数据传输。基于增强 Gem5 和周期精确 NPU 模拟器的评估表明,LLM 训练负载较现有工作提升 4.0 倍,相比非安全训练仅增加 2.1% 开销。
Heterogeneous collaborative computing with NPU and CPU has received widespread attention due to its substantial performance benefits. To ensure data confidentiality and integrity during computing, Trusted Execution Environments (TEE) is considered a promising solution because of its comparatively lower overhead. However, existing heterogeneous TEE designs are inefficient for collaborative computing due to fine and different memory granularities between CPU and NPU. 1) The cacheline granularity of CPU TEE intensifies memory pressure due to its extra memory access, and 2) the cacheline granularity MAC of NPU escalates the pressure on the limited memory storage. 3) Data transfer across heterogeneous enclaves relies on the transit of non-secure regions, resulting in cumbersome re-encryption and scheduling. To address these issues, we propose TensorTEE, a unified tensor-granularity heterogeneous TEE for efficient secure collaborative tensor computing. First, we virtually support tensor granularity in CPU TEE to eliminate the off-chip metadata access by detecting and maintaining tensor structures on-chip. Second, we propose tensor-granularity MAC management with predictive execution to avoid computational stalls while eliminating off-chip MAC storage and access. Moreover, based on the unified granularity, we enable direct data transfer without re-encryption and scheduling dilemmas. Our evaluation is built on enhanced Gem5 and a cycle-accurate NPU simulator. The results show that TensorTEE improves the performance of Large Language Model (LLM) training workloads by 4.0x compared to existing work and incurs only 2.1% overhead compared to non-secure training, offering a practical security assurance for LLM training.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{HanZWHFLMLMJSD024,
title = {TensorTEE: Unifying Heterogeneous TEE Granularity for Efficient Secure Collaborative Tensor Computing},
author = {Husheng Han and Xinyao Zheng and Yuanbo Wen and Yifan Hao and Erhu Feng and Ling Liang and Jianan Mu and Xiaqing Li and Tianyun Ma and Pengwei Jin and Xinkai Song and Zidong Du and Qi Guo and Xing Hu},
booktitle = {ASPLOS},
year = {2024},
doi = {10.1145/3622781.3674168}
}