Skip to content

Conversation

YdrMaster
Copy link
Contributor

No description provided.

@YdrMaster YdrMaster added 新文档 添加新的算子文档 已就绪 已完成就绪,可合入 labels Apr 7, 2025
@YdrMaster YdrMaster self-assigned this Apr 7, 2025
@PanZezhong1725 PanZezhong1725 self-requested a review April 7, 2025 05:22
$$ Y = \alpha_1 \cdot table_1[i_1] + \alpha_2 \cdot table_2[i_2] $$

- 通常 $α$ 为 1;
- 某一项的 $α$ 为 0、$table$ 为空或 $i$ 为空表示不使用;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table显示不正常。
建议只有table2可以为空

`infiniopCreateEmbedDescriptor` 指针,指向将被初始化的算子描述符地址;
- `y_desc` - $\{ dT | (N, D) | (..., 1) \}$:
算子输出 `y` 的张量描述;
- `table1_desc` - $\{ dT | (..., D) | (..., 1) \}$:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个表可以是高维的吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不能,但是我还是不会写你这个语法

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是二维你可以随便写个字母,比如 (B,D)

算子输入 `table1` 的张量描述;
- `table2_desc` - $\{ dT | (..., D) | (..., 1) \}$:
算子输入 `table2` 的张量描述;
- `i1_desc` - $\{ dT_i | (N) | (1) \}$:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

类型叫dI吧,下标不好看。把可以为nullptr这事说一下,要求alpha2必须为0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那就是要求为空的时候几项必须对应同时表示空?也行


参数限制:

- $dT$: 任意浮点类型;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是也可以支持其他类型

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只要支持乘加,可能是排除 bool 都行,但是不知道怎么表示

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

任意浮点数、整数、无符号整数类型?我觉得是不是bool也可以有啊

计算输出结果;
- `table1`:
第 1 个嵌入表;
- `table2`:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把可以为nullptr说一下


<div style="background-color: lightblue; padding: 1px;"> 返回值:</div>

- [`INFINI_STATUS_SUCCESS`], [`INFINI_STATUS_BAD_PARAM`], [`INFINI_STATUS_BAD_TENSOR_SHAPE`], [`INFINI_STATUS_BAD_TENSOR_DTYPE`], [`INFINI_STATUS_BAD_TENSOR_STRIDES`], [`INFINI_STATUS_BAD_DEVICE`].
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加个 INFINI_STATUS_NULL_POINTER

@PanZezhong1725 PanZezhong1725 added 在修改 正在修改,勿合入 and removed 已就绪 已完成就绪,可合入 labels Apr 7, 2025
@YdrMaster YdrMaster force-pushed the main branch 3 times, most recently from 5095b37 to e75be11 Compare April 7, 2025 07:35
$$ Y = \alpha_1 \cdot table_1[i_1] + \alpha_2 \cdot table_2[i_2] $$

- 通常 $α$ 为 1;
- $ table2 $ 可以不使用,则公式变为 $ Y = \alpha_1 \cdot table_1[i_1] $;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

显示不正常

`infiniopHandle_t` 类型的硬件控柄。详情请看:[`InfiniopHandle_t`]
- `desc_ptr`:
`infiniopCreateEmbeddingDescriptor` 指针,指向将被初始化的算子描述符地址;
- `y_desc` - $\{ dT | (N, D) | (..., 1) \}$:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个张量格式不需要用数学符号了,正常写就行

`infiniopCreateEmbedDescriptor` 指针,指向将被初始化的算子描述符地址;
- `y_desc` - $\{ dT | (N, D) | (..., 1) \}$:
算子输出 `y` 的张量描述;
- `table1_desc` - $\{ dT | (..., D) | (..., 1) \}$:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是二维你可以随便写个字母,比如 (B,D)


参数限制:

- $dT$: 任意浮点类型;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

任意浮点数、整数、无符号整数类型?我觉得是不是bool也可以有啊

@YdrMaster YdrMaster force-pushed the main branch 2 times, most recently from aec7ab8 to 9bb9ffe Compare April 16, 2025 07:11
@YdrMaster YdrMaster added 已就绪 已完成就绪,可合入 and removed 在修改 正在修改,勿合入 labels Apr 16, 2025
@PanZezhong1725 PanZezhong1725 marked this pull request as draft April 17, 2025 10:09
@PanZezhong1725 PanZezhong1725 removed the 已就绪 已完成就绪,可合入 label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

新文档 添加新的算子文档

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants