1 Star 0 Fork 0

ali/gpu.cpp

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.py 982 Bytes
一键复制 编辑 原始数据 按行查看 历史
# Dictionary of header files and their relative paths
header_files = {
"#include \"webgpu/webgpu.h\"": "third_party/headers/webgpu/webgpu.h",
"#include \"numeric_types/half.hpp\"": "numeric_types/half.hpp",
"#include \"utils/logging.hpp\"": "utils/logging.hpp"
}
def main():
# File paths
source_file_path = "gpu.hpp"
output_file_path = "build/gpu.hpp"
# Open source file and read contents
with open(source_file_path, "r") as source:
file_contents = source.read()
# Ergodic over header files
for key, value in header_files.items():
# Replace header files
with open(value, "r") as header_file:
header_file_contents = header_file.read()
file_contents = file_contents.replace(key, header_file_contents)
# Open output file
with open(output_file_path, "w") as output:
# Write contents to output file
output.write(file_contents)
if __name__ == "__main__":
main()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ali_ft/gpu.cpp.git
git@gitee.com:ali_ft/gpu.cpp.git
ali_ft
gpu.cpp
gpu.cpp
main

搜索帮助