已合并
fix: 修正课程代码语法和 npugraph_ex 配置逻辑 #482
likeA_star创建于 27 天前
fix: 修正课程代码语法和 npugraph_ex 配置逻辑 #482
已合并
共 3 个文件变更+4-5
Mtutorials/MC2_fused_operator_development/01_MC2_basic_fused_operator_development/01.02_MC2_fused_operator_concept_intro.ipynb+2-2
| @@ -348,8 +348,8 @@ | |||
| 348 | "print(f\"假设: {RANK_DIM}个rank, 单卡数据量 {PER_RANK_DATA_MB}MB\\n\")\n", | 348 | "print(f\"假设: {RANK_DIM}个rank, 单卡数据量 {PER_RANK_DATA_MB}MB\\n\")\n", |
| 349 | "\n", | 349 | "\n", |
| 350 | "for name, func in [(\"AllGather\", simulate_allgather), \n", | 350 | "for name, func in [(\"AllGather\", simulate_allgather), \n", |
| 351 | - " (\"AllReduce(one-shot)\\\", simulate_allreduce_one_shot),\n", | 351 | + " (\"AllReduce(one-shot)\", simulate_allreduce_one_shot),\n", |
| 352 | - " (\"AllReduce(two-shot)\\\", simulate_allreduce_two_shot)]:\n", | 352 | + " (\"AllReduce(two-shot)\", simulate_allreduce_two_shot)]:\n", |
| 353 | " comm_vol, out_size, desc = func()\n", | 353 | " comm_vol, out_size, desc = func()\n", |
| 354 | " print(f\"{name}:\")\n", | 354 | " print(f\"{name}:\")\n", |
| 355 | " print(f\" 通信量: {comm_vol}MB\")\n", | 355 | " print(f\" 通信量: {comm_vol}MB\")\n", |
Mtutorials/ascendc_operator_development_V2/03_programming_model/03.03.05_simd_c++_programming_base_on_tensor.ipynb+1-2
| @@ -998,8 +998,7 @@ | |||
| 998 | "metadata": {}, | 998 | "metadata": {}, |
| 999 | "outputs": [], | 999 | "outputs": [], |
| 1000 | "source": [ | 1000 | "source": [ |
| 1001 | - "!cd Sources && mkdir -p build # 创建并进入build目录\n", | 1001 | + "!mkdir -p Sources/build && cd Sources/build && cmake -DCMAKE_ASC_ARCHITECTURES=dav-3510 .. && make -j # 创建构建目录并编译工程" |
| 1002 | - "cmake -DCMAKE_ASC_ARCHITECTURES=dav-3510 ..;make -j; # 编译工程(默认npu模式) # 执行编译生成的可执行程序,执行样例" | ||
| 1003 | ] | 1002 | ] |
| 1004 | }, | 1003 | }, |
| 1005 | { | 1004 | { |
Mtutorials/llm_inference/qwen3_8b/src/inference_scripts/recipe_qwen3_8b/executor/core/config/inference_config.py+1-1
| @@ -148,7 +148,7 @@ class ModelConfig: | |||
| 148 | if self.enable_static_kernel and self.exe_mode != "npugraph_ex": | 148 | if self.enable_static_kernel and self.exe_mode != "npugraph_ex": |
| 149 | raise ValueError("enable_static_kernel only supports exe_mode='npugraph_ex'") | 149 | raise ValueError("enable_static_kernel only supports exe_mode='npugraph_ex'") |
| 150 | 150 | ||
| 151 | - if self.exe_mode == "npugraph_ex" and os.getenv("TASK_QUEUE_ENABLE", "2") != "1": | 151 | + if self.exe_mode == "npugraph_ex": |
| 152 | os.environ["TASK_QUEUE_ENABLE"] = "1" # npugraph_ex only supports TASK_QUEUE_ENABLE 0 or 1 | 152 | os.environ["TASK_QUEUE_ENABLE"] = "1" # npugraph_ex only supports TASK_QUEUE_ENABLE 0 or 1 |
| 153 | else: | 153 | else: |
| 154 | os.environ["TASK_QUEUE_ENABLE"] = "2" # 2: default value, opt host perf in eager | 154 | os.environ["TASK_QUEUE_ENABLE"] = "2" # 2: default value, opt host perf in eager |