l0n0lacltester


Namel0n0lacltester JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
Summary用于cpu调试ascendc编写的算子
upload_time2024-11-30 10:47:56
maintainerNone
docs_urlNone
authorl0n0l
requires_python<4,>=3.7
licenseNone
keywords acl ascendc 算子 算子开发
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 1 功能描述
由于在ascendc算子开发过程中运行算子比较复杂,为了简化算子的运行,将运行算子变成可以用python直接调用的函数。所以编写了此代码。

# 2 安装
```
pip install l0n0lacltester
```

# 3 运行算子实例
## 3.1 先切换到cann环境,比如我的环境是:
```
source /home/HwHiAiUser/Ascend/ascend-toolkit/set_env.sh
```

# 4 创建测试用例工程
## 4.1 命令行参数
```
l0n0lacltester -h
usage: l0n0lacltester [-h] op_path test_path

创建测试工程

positional arguments:
  op_path     ascendc算子目录
  test_path   测试工程目录

optional arguments:
  -h, --help  show this help message and exit
```
## 4.2 举例
```
l0n0lacltester 算子目录 测试工程目录
```
### 4.2.1 工程结构:
```
cmake
    - cpu_lib.cmake
    - npu_lib.cmake
include
    - *.h
.gitignore
CMakeLists.txt
gen_code.py
run.py
run.sh    
tiling_context.cpp
```
上面需要关注的只有gen_code.py 与 run.py

### 4.2.2 算子工程设置
### 4.2.2.1 设置tiling namespace
默认情况下的optiling如下
```c++
namespace optiling {
static ge::graphStatus TilingFunc(gert::TilingContext *context) {
  return ge::GRAPH_SUCCESS;
}
}
```
由于本工具是用python的re模块正则表达式匹配的,所以需要在
在namespace末尾添加 `// namespace optiling`
```c++
namespace optiling {
static ge::graphStatus TilingFunc(gert::TilingContext *context) {
  return ge::GRAPH_SUCCESS;
}
} // namespace optiling
```

## 4.3 gen_code.py
```python
import os
from l0n0lacltester.gen_cpu_call_code import generate_all_codes
current_path = os.path.split(__file__)[0]
# 比如['/mnt/code/a','/mnt/code/b']
include_dirs=[
   
]
# enum class KernelMode {
#     MIX_MODE = 0, # 融合模式,启用向量运算单元(aiv)与矩阵运算单元(aic)。一个block一个aic, n个aiv(n >= 1)。
#     AIC_MODE, # 仅使用矩阵运算单元(aic)。一个block仅包含一个aic。
#     AIV_MODE, # 仅使用向量运算单元(aiv)。一个block仅包含一个aiv。
#     MIX_AIC_1_1, # 矩阵运算单元(aic)与向量运算单元(aiv) 1:1合并为一个block。 一个block包含一个aiv一个aic。
# };
CPU_KERNEL_MODE='KernelMode::AIV_MODE'
generate_all_codes(f'算子目录绝对地址', '.', include_dirs, CPU_KERNEL_MODE)
    
```
需要关注的是include_dirs 与generate_all_codes的第一个参数
### 4.3.1 include_dirs
如果算子工程使用了算子工程目录之外的`.h`文件。则需要将该include目录`绝对地址`写到include_dirs中

比如
```python
include_dirs=[
 '/mnt/code/a',
 '/mnt/code/b'  
]
```
### 4.3.2 CPU_KERNEL_MODE
仅在cpu模式下情况下起效
可选项有
```c++
enum class KernelMode {
    MIX_MODE = 0, # 融合模式,启用向量运算单元(aiv)与矩阵运算单元(aic)。一个block一个aic, n个aiv(n >= 1)。
    AIC_MODE, # 仅使用矩阵运算单元(aic)。一个block仅包含一个aic。
    AIV_MODE, # 仅使用向量运算单元(aiv)。一个block仅包含一个aiv。
    MIX_AIC_1_1, # 矩阵运算单元(aic)与向量运算单元(aiv) 1:1合并为一个block。 一个block包含一个aiv一个aic。
};
```

### 4.3.3 generate_all_codes
generate_all_codes用于生成cpu|sim运行模式所需要的代码。

generate_all_codes的第一个参数是算子工程的`绝对地址`

比如
```python
generate_all_codes(f'算子目录绝对地址', '.', include_dirs, CPU_KERNEL_MODE)
```
current_path表示`gen_code.py`所在的目录

## 4.4 run.py
初始情况下
```python
import sys
import numpy as np
import l0n0lacltester as tester
from op_args import AscendCOpArgs
if sys.argv[1] == 'cpu' or sys.argv[1] == 'sim':
    from op_cpu import AscendCOp
else:
    from op_npu import AscendCOp
```
### 4.4.1 `AscendCOp` 可以用于调用算子
```python
b = 8
c = 32
ignore_index = -100
reduction='sum'
x_shape = [b, c]
target_shape = [b]
weight_shape = [c]
input_x = np.random.uniform(-5, 5, x_shape).astype(np.float32)
input_target = np.random.uniform(0, 31, target_shape).astype(np.int32)
input_weight = np.random.uniform(0, 1, weight_shape).astype(np.float32)
y = np.random.uniform(0, 1, [1]).astype(np.float32)
op = AscendCOp(reduction, ignore_index)
op(input_x, input_target, input_weight, y)
print('y = ', y)
```
### 4.4.2 `AscendCOpArgs` 用于保存参数,并且可以用于调用`AscendCOp`
基本范式为:
```python
# 创建测试用例
args = AscendCOpArgs(‘保存文件.json’)
# 尝试读取 '保存文件.json'
if not args.try_load():
  # 生成测试数据
  pass
# 调用算子
args.run_op(AscendCOp)
# 检测精度
if 精度检测通过:
  tester.print_green("成功")
  # 移除存储的测试数据
  args.remove_record()
else:
  tester.print_red("失败")
  # 将测试数据保存到 '保存文件.json'
  args.save()
```
举例
```python
import sys
import torch
import numpy as np
import l0n0lacltester as tester
from op_args import AscendCOpArgs
if sys.argv[1] == 'cpu' or sys.argv[1] == 'sim':
    from op_cpu import AscendCOp
else:
    from op_npu import AscendCOp
args = AscendCOpArgs(name)
if not args.try_load():
    input_x = np.random.uniform(-5, 5, x_shape)
    golden = 标杆算子(input_x)
    args.set_x(input_x)
    args.set_golden(golden)
args.run_op(AscendCOp)
output = torch.tensor(args.get_y())
golden = torch.tensor(args.get_golden())
if torch.allclose(output, golden, 1e-4, 1e-4):
    tester.print_green('成功')
    args.remove_record()
else:
    tester.print_red("失败")
    args.save()
```

## 4.3 关于COMMON_TILING宏定义
`COMMON_TILING`宏定义是用于在tiling结构定义时,复用某些结构用的

范式为:
```c++
#define COMMON_TILING_XXX(arg) \
  ...
// END COMMON_TILING_XXX
```
* 注意 `// END COMMON_TILING_XXX` 是必须的。用于正则表达式匹配

比如我有一个关于`tiling`的宏定义如下
```c++
#define COMMON_TILING_FILED_DEF(prefix)                                        \
  TILING_DATA_FIELD_DEF(int64_t, prefix##TileLength);                          \
  TILING_DATA_FIELD_DEF(int64_t, prefix##FormerNum);                           \
  TILING_DATA_FIELD_DEF(int64_t, prefix##FormerLength);                        \
  TILING_DATA_FIELD_DEF(int64_t, prefix##FormerFinalCalcCount);                \
  TILING_DATA_FIELD_DEF(int64_t, prefix##TailLength);                          \
  TILING_DATA_FIELD_DEF(int64_t, prefix##TailFinalCalcCount);                  \
  TILING_DATA_FIELD_DEF(int64_t, prefix##FinalKernelFinalCalcCount);           \
  TILING_DATA_FIELD_DEF(int64_t, prefix##KernelCount);
// END COMMON_TILING_FILED_DEF                     
```
tiling.h就可以使用它了
```c++
#include "register/tilingdata_base.h"
#include "tiling_defines.h"
namespace optiling {
BEGIN_TILING_DATA_DEF(NLLLossTilingData)
  TILING_DATA_FIELD_DEF(uint64_t, b);
  TILING_DATA_FIELD_DEF(uint64_t, c);
  TILING_DATA_FIELD_DEF(uint64_t, d);
  TILING_DATA_FIELD_DEF(int64_t, reduction);
  TILING_DATA_FIELD_DEF(int64_t, ignore_index);
  COMMON_TILING_FILED_DEF(b); 
  TILING_DATA_FIELD_DEF(int32_t, dimFlag);
END_TILING_DATA_DEF;

REGISTER_TILING_DATA_CLASS(NLLLoss, NLLLossTilingData)
} // namespace optiling

```
# 5 运行
```bash
# bash run.sh -h
run.sh [option]
-v 芯片型号(默认Ascend910B1)
-r 运行模式(cpu[默认]|sim|npu)
-n 对于cpu|sim模式不重新编译代码
-h 显示此帮助
```
实例

默认为 `Ascend910B1` `cpu` 模式
```
bash run.sh
```
```
bash run.sh -v Ascend910B1 -r cpu
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "l0n0lacltester",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.7",
    "maintainer_email": null,
    "keywords": "acl, ascendc, \u7b97\u5b50, \u7b97\u5b50\u5f00\u53d1",
    "author": "l0n0l",
    "author_email": "1038352856@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/9e/28/5f6418e5fe43eebccb2fed9a9b198a87baf695bf407a7632a01c7566a53b/l0n0lacltester-1.0.2.tar.gz",
    "platform": null,
    "description": "# 1 \u529f\u80fd\u63cf\u8ff0\n\u7531\u4e8e\u5728ascendc\u7b97\u5b50\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u8fd0\u884c\u7b97\u5b50\u6bd4\u8f83\u590d\u6742\uff0c\u4e3a\u4e86\u7b80\u5316\u7b97\u5b50\u7684\u8fd0\u884c\uff0c\u5c06\u8fd0\u884c\u7b97\u5b50\u53d8\u6210\u53ef\u4ee5\u7528python\u76f4\u63a5\u8c03\u7528\u7684\u51fd\u6570\u3002\u6240\u4ee5\u7f16\u5199\u4e86\u6b64\u4ee3\u7801\u3002\n\n# 2 \u5b89\u88c5\n```\npip install l0n0lacltester\n```\n\n# 3 \u8fd0\u884c\u7b97\u5b50\u5b9e\u4f8b\n## 3.1 \u5148\u5207\u6362\u5230cann\u73af\u5883,\u6bd4\u5982\u6211\u7684\u73af\u5883\u662f:\n```\nsource /home/HwHiAiUser/Ascend/ascend-toolkit/set_env.sh\n```\n\n# 4 \u521b\u5efa\u6d4b\u8bd5\u7528\u4f8b\u5de5\u7a0b\n## 4.1 \u547d\u4ee4\u884c\u53c2\u6570\n```\nl0n0lacltester -h\nusage: l0n0lacltester [-h] op_path test_path\n\n\u521b\u5efa\u6d4b\u8bd5\u5de5\u7a0b\n\npositional arguments:\n  op_path     ascendc\u7b97\u5b50\u76ee\u5f55\n  test_path   \u6d4b\u8bd5\u5de5\u7a0b\u76ee\u5f55\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n## 4.2 \u4e3e\u4f8b\n```\nl0n0lacltester \u7b97\u5b50\u76ee\u5f55 \u6d4b\u8bd5\u5de5\u7a0b\u76ee\u5f55\n```\n### 4.2.1 \u5de5\u7a0b\u7ed3\u6784:\n```\ncmake\n    - cpu_lib.cmake\n    - npu_lib.cmake\ninclude\n    - *.h\n.gitignore\nCMakeLists.txt\ngen_code.py\nrun.py\nrun.sh    \ntiling_context.cpp\n```\n\u4e0a\u9762\u9700\u8981\u5173\u6ce8\u7684\u53ea\u6709gen_code.py \u4e0e run.py\n\n### 4.2.2 \u7b97\u5b50\u5de5\u7a0b\u8bbe\u7f6e\n### 4.2.2.1 \u8bbe\u7f6etiling namespace\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u7684optiling\u5982\u4e0b\n```c++\nnamespace optiling {\nstatic ge::graphStatus TilingFunc(gert::TilingContext *context) {\n  return ge::GRAPH_SUCCESS;\n}\n}\n```\n\u7531\u4e8e\u672c\u5de5\u5177\u662f\u7528python\u7684re\u6a21\u5757\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u7684\uff0c\u6240\u4ee5\u9700\u8981\u5728\n\u5728namespace\u672b\u5c3e\u6dfb\u52a0 `// namespace optiling`\n```c++\nnamespace optiling {\nstatic ge::graphStatus TilingFunc(gert::TilingContext *context) {\n  return ge::GRAPH_SUCCESS;\n}\n} // namespace optiling\n```\n\n## 4.3 gen_code.py\n```python\nimport os\nfrom l0n0lacltester.gen_cpu_call_code import generate_all_codes\ncurrent_path = os.path.split(__file__)[0]\n# \u6bd4\u5982['/mnt/code/a','/mnt/code/b']\ninclude_dirs=[\n   \n]\n# enum class KernelMode {\n#     MIX_MODE = 0, # \u878d\u5408\u6a21\u5f0f\uff0c\u542f\u7528\u5411\u91cf\u8fd0\u7b97\u5355\u5143(aiv)\u4e0e\u77e9\u9635\u8fd0\u7b97\u5355\u5143(aic)\u3002\u4e00\u4e2ablock\u4e00\u4e2aaic, n\u4e2aaiv(n >= 1)\u3002\n#     AIC_MODE, # \u4ec5\u4f7f\u7528\u77e9\u9635\u8fd0\u7b97\u5355\u5143(aic)\u3002\u4e00\u4e2ablock\u4ec5\u5305\u542b\u4e00\u4e2aaic\u3002\n#     AIV_MODE, # \u4ec5\u4f7f\u7528\u5411\u91cf\u8fd0\u7b97\u5355\u5143(aiv)\u3002\u4e00\u4e2ablock\u4ec5\u5305\u542b\u4e00\u4e2aaiv\u3002\n#     MIX_AIC_1_1, # \u77e9\u9635\u8fd0\u7b97\u5355\u5143(aic)\u4e0e\u5411\u91cf\u8fd0\u7b97\u5355\u5143(aiv) 1:1\u5408\u5e76\u4e3a\u4e00\u4e2ablock\u3002 \u4e00\u4e2ablock\u5305\u542b\u4e00\u4e2aaiv\u4e00\u4e2aaic\u3002\n# };\nCPU_KERNEL_MODE='KernelMode::AIV_MODE'\ngenerate_all_codes(f'\u7b97\u5b50\u76ee\u5f55\u7edd\u5bf9\u5730\u5740', '.', include_dirs, CPU_KERNEL_MODE)\n    \n```\n\u9700\u8981\u5173\u6ce8\u7684\u662finclude_dirs \u4e0egenerate_all_codes\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\n### 4.3.1 include_dirs\n\u5982\u679c\u7b97\u5b50\u5de5\u7a0b\u4f7f\u7528\u4e86\u7b97\u5b50\u5de5\u7a0b\u76ee\u5f55\u4e4b\u5916\u7684`.h`\u6587\u4ef6\u3002\u5219\u9700\u8981\u5c06\u8be5include\u76ee\u5f55`\u7edd\u5bf9\u5730\u5740`\u5199\u5230include_dirs\u4e2d\n\n\u6bd4\u5982\n```python\ninclude_dirs=[\n '/mnt/code/a',\n '/mnt/code/b'  \n]\n```\n### 4.3.2 CPU_KERNEL_MODE\n\u4ec5\u5728cpu\u6a21\u5f0f\u4e0b\u60c5\u51b5\u4e0b\u8d77\u6548\n\u53ef\u9009\u9879\u6709\n```c++\nenum class KernelMode {\n    MIX_MODE = 0, # \u878d\u5408\u6a21\u5f0f\uff0c\u542f\u7528\u5411\u91cf\u8fd0\u7b97\u5355\u5143(aiv)\u4e0e\u77e9\u9635\u8fd0\u7b97\u5355\u5143(aic)\u3002\u4e00\u4e2ablock\u4e00\u4e2aaic, n\u4e2aaiv(n >= 1)\u3002\n    AIC_MODE, # \u4ec5\u4f7f\u7528\u77e9\u9635\u8fd0\u7b97\u5355\u5143(aic)\u3002\u4e00\u4e2ablock\u4ec5\u5305\u542b\u4e00\u4e2aaic\u3002\n    AIV_MODE, # \u4ec5\u4f7f\u7528\u5411\u91cf\u8fd0\u7b97\u5355\u5143(aiv)\u3002\u4e00\u4e2ablock\u4ec5\u5305\u542b\u4e00\u4e2aaiv\u3002\n    MIX_AIC_1_1, # \u77e9\u9635\u8fd0\u7b97\u5355\u5143(aic)\u4e0e\u5411\u91cf\u8fd0\u7b97\u5355\u5143(aiv) 1:1\u5408\u5e76\u4e3a\u4e00\u4e2ablock\u3002 \u4e00\u4e2ablock\u5305\u542b\u4e00\u4e2aaiv\u4e00\u4e2aaic\u3002\n};\n```\n\n### 4.3.3 generate_all_codes\ngenerate_all_codes\u7528\u4e8e\u751f\u6210cpu|sim\u8fd0\u884c\u6a21\u5f0f\u6240\u9700\u8981\u7684\u4ee3\u7801\u3002\n\ngenerate_all_codes\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7b97\u5b50\u5de5\u7a0b\u7684`\u7edd\u5bf9\u5730\u5740`\n\n\u6bd4\u5982\n```python\ngenerate_all_codes(f'\u7b97\u5b50\u76ee\u5f55\u7edd\u5bf9\u5730\u5740', '.', include_dirs, CPU_KERNEL_MODE)\n```\ncurrent_path\u8868\u793a`gen_code.py`\u6240\u5728\u7684\u76ee\u5f55\n\n## 4.4 run.py\n\u521d\u59cb\u60c5\u51b5\u4e0b\n```python\nimport sys\nimport numpy as np\nimport l0n0lacltester as tester\nfrom op_args import AscendCOpArgs\nif sys.argv[1] == 'cpu' or sys.argv[1] == 'sim':\n    from op_cpu import AscendCOp\nelse:\n    from op_npu import AscendCOp\n```\n### 4.4.1 `AscendCOp` \u53ef\u4ee5\u7528\u4e8e\u8c03\u7528\u7b97\u5b50\n```python\nb = 8\nc = 32\nignore_index = -100\nreduction='sum'\nx_shape = [b, c]\ntarget_shape = [b]\nweight_shape = [c]\ninput_x = np.random.uniform(-5, 5, x_shape).astype(np.float32)\ninput_target = np.random.uniform(0, 31, target_shape).astype(np.int32)\ninput_weight = np.random.uniform(0, 1, weight_shape).astype(np.float32)\ny = np.random.uniform(0, 1, [1]).astype(np.float32)\nop = AscendCOp(reduction, ignore_index)\nop(input_x, input_target, input_weight, y)\nprint('y = ', y)\n```\n### 4.4.2 `AscendCOpArgs` \u7528\u4e8e\u4fdd\u5b58\u53c2\u6570,\u5e76\u4e14\u53ef\u4ee5\u7528\u4e8e\u8c03\u7528`AscendCOp`\n\u57fa\u672c\u8303\u5f0f\u4e3a:\n```python\n# \u521b\u5efa\u6d4b\u8bd5\u7528\u4f8b\nargs = AscendCOpArgs(\u2018\u4fdd\u5b58\u6587\u4ef6.json\u2019)\n# \u5c1d\u8bd5\u8bfb\u53d6 '\u4fdd\u5b58\u6587\u4ef6.json'\nif not args.try_load():\n  # \u751f\u6210\u6d4b\u8bd5\u6570\u636e\n  pass\n# \u8c03\u7528\u7b97\u5b50\nargs.run_op(AscendCOp)\n# \u68c0\u6d4b\u7cbe\u5ea6\nif \u7cbe\u5ea6\u68c0\u6d4b\u901a\u8fc7:\n  tester.print_green(\"\u6210\u529f\")\n  # \u79fb\u9664\u5b58\u50a8\u7684\u6d4b\u8bd5\u6570\u636e\n  args.remove_record()\nelse:\n  tester.print_red(\"\u5931\u8d25\")\n  # \u5c06\u6d4b\u8bd5\u6570\u636e\u4fdd\u5b58\u5230 '\u4fdd\u5b58\u6587\u4ef6.json'\n  args.save()\n```\n\u4e3e\u4f8b\n```python\nimport sys\nimport torch\nimport numpy as np\nimport l0n0lacltester as tester\nfrom op_args import AscendCOpArgs\nif sys.argv[1] == 'cpu' or sys.argv[1] == 'sim':\n    from op_cpu import AscendCOp\nelse:\n    from op_npu import AscendCOp\nargs = AscendCOpArgs(name)\nif not args.try_load():\n    input_x = np.random.uniform(-5, 5, x_shape)\n    golden = \u6807\u6746\u7b97\u5b50(input_x)\n    args.set_x(input_x)\n    args.set_golden(golden)\nargs.run_op(AscendCOp)\noutput = torch.tensor(args.get_y())\ngolden = torch.tensor(args.get_golden())\nif torch.allclose(output, golden, 1e-4, 1e-4):\n    tester.print_green('\u6210\u529f')\n    args.remove_record()\nelse:\n    tester.print_red(\"\u5931\u8d25\")\n    args.save()\n```\n\n## 4.3 \u5173\u4e8eCOMMON_TILING\u5b8f\u5b9a\u4e49\n`COMMON_TILING`\u5b8f\u5b9a\u4e49\u662f\u7528\u4e8e\u5728tiling\u7ed3\u6784\u5b9a\u4e49\u65f6\uff0c\u590d\u7528\u67d0\u4e9b\u7ed3\u6784\u7528\u7684\n\n\u8303\u5f0f\u4e3a:\n```c++\n#define COMMON_TILING_XXX(arg) \\\n  ...\n// END COMMON_TILING_XXX\n```\n* \u6ce8\u610f `// END COMMON_TILING_XXX` \u662f\u5fc5\u987b\u7684\u3002\u7528\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\n\n\u6bd4\u5982\u6211\u6709\u4e00\u4e2a\u5173\u4e8e`tiling`\u7684\u5b8f\u5b9a\u4e49\u5982\u4e0b\n```c++\n#define COMMON_TILING_FILED_DEF(prefix)                                        \\\n  TILING_DATA_FIELD_DEF(int64_t, prefix##TileLength);                          \\\n  TILING_DATA_FIELD_DEF(int64_t, prefix##FormerNum);                           \\\n  TILING_DATA_FIELD_DEF(int64_t, prefix##FormerLength);                        \\\n  TILING_DATA_FIELD_DEF(int64_t, prefix##FormerFinalCalcCount);                \\\n  TILING_DATA_FIELD_DEF(int64_t, prefix##TailLength);                          \\\n  TILING_DATA_FIELD_DEF(int64_t, prefix##TailFinalCalcCount);                  \\\n  TILING_DATA_FIELD_DEF(int64_t, prefix##FinalKernelFinalCalcCount);           \\\n  TILING_DATA_FIELD_DEF(int64_t, prefix##KernelCount);\n// END COMMON_TILING_FILED_DEF                     \n```\ntiling.h\u5c31\u53ef\u4ee5\u4f7f\u7528\u5b83\u4e86\n```c++\n#include \"register/tilingdata_base.h\"\n#include \"tiling_defines.h\"\nnamespace optiling {\nBEGIN_TILING_DATA_DEF(NLLLossTilingData)\n  TILING_DATA_FIELD_DEF(uint64_t, b);\n  TILING_DATA_FIELD_DEF(uint64_t, c);\n  TILING_DATA_FIELD_DEF(uint64_t, d);\n  TILING_DATA_FIELD_DEF(int64_t, reduction);\n  TILING_DATA_FIELD_DEF(int64_t, ignore_index);\n  COMMON_TILING_FILED_DEF(b); \n  TILING_DATA_FIELD_DEF(int32_t, dimFlag);\nEND_TILING_DATA_DEF;\n\nREGISTER_TILING_DATA_CLASS(NLLLoss, NLLLossTilingData)\n} // namespace optiling\n\n```\n# 5 \u8fd0\u884c\n```bash\n# bash run.sh -h\nrun.sh [option]\n-v \u82af\u7247\u578b\u53f7(\u9ed8\u8ba4Ascend910B1)\n-r \u8fd0\u884c\u6a21\u5f0f(cpu[\u9ed8\u8ba4]|sim|npu)\n-n \u5bf9\u4e8ecpu|sim\u6a21\u5f0f\u4e0d\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801\n-h \u663e\u793a\u6b64\u5e2e\u52a9\n```\n\u5b9e\u4f8b\n\n\u9ed8\u8ba4\u4e3a `Ascend910B1` `cpu` \u6a21\u5f0f\n```\nbash run.sh\n```\n```\nbash run.sh -v Ascend910B1 -r cpu\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "\u7528\u4e8ecpu\u8c03\u8bd5ascendc\u7f16\u5199\u7684\u7b97\u5b50",
    "version": "1.0.2",
    "project_urls": null,
    "split_keywords": [
        "acl",
        " ascendc",
        " \u7b97\u5b50",
        " \u7b97\u5b50\u5f00\u53d1"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49ddb0ee26f5394f793211e81570df7f814b06bae13eb31c3a1e7c6431c8029f",
                "md5": "7ba7960ce2cc6b3c90ebf7a6fbf085e1",
                "sha256": "5713c7cb01feff979beef561313fe36f2b6d528c9e8caef871981669d7be2457"
            },
            "downloads": -1,
            "filename": "l0n0lacltester-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7ba7960ce2cc6b3c90ebf7a6fbf085e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.7",
            "size": 32607,
            "upload_time": "2024-11-30T10:47:42",
            "upload_time_iso_8601": "2024-11-30T10:47:42.194342Z",
            "url": "https://files.pythonhosted.org/packages/49/dd/b0ee26f5394f793211e81570df7f814b06bae13eb31c3a1e7c6431c8029f/l0n0lacltester-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9e285f6418e5fe43eebccb2fed9a9b198a87baf695bf407a7632a01c7566a53b",
                "md5": "10123633d828d0442b3f1a4c65698d6a",
                "sha256": "f172667ebf8659ee76393348c17eedae3df311ca5eebc4b87c4d36130188ab00"
            },
            "downloads": -1,
            "filename": "l0n0lacltester-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "10123633d828d0442b3f1a4c65698d6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.7",
            "size": 31196,
            "upload_time": "2024-11-30T10:47:56",
            "upload_time_iso_8601": "2024-11-30T10:47:56.444620Z",
            "url": "https://files.pythonhosted.org/packages/9e/28/5f6418e5fe43eebccb2fed9a9b198a87baf695bf407a7632a01c7566a53b/l0n0lacltester-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-30 10:47:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "l0n0lacltester"
}
        
Elapsed time: 0.44838s