Skip to content

Add kDLBComplex type to DLDataTypeCode#187

Open
rgommers wants to merge 1 commit into
dmlc:mainfrom
rgommers:add-bcomple32-type-enum
Open

Add kDLBComplex type to DLDataTypeCode#187
rgommers wants to merge 1 commit into
dmlc:mainfrom
rgommers:add-bcomple32-type-enum

Conversation

@rgommers
Copy link
Copy Markdown
Collaborator

@rgommers rgommers commented May 3, 2026

Closes gh-184

@tqchen
Copy link
Copy Markdown
Member

tqchen commented May 3, 2026

cc @leofang

Comment thread include/dlpack/dlpack.h
/*! \brief complex number (2x bfloat16)
* (C/C++/Python layout: same as kDLComplex, compact struct per complex number)
*/
kDLBComplex = 18U,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since the enumeration kDLBfloat does not use an uppercase F, I would suggest kDLBcomplex.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

On reflection, I think that's better indeed. All names currently have a single capital letter after kDL.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'll change it if there are no objections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] Adding a kDLBComplex type code for complex<bfloat16>

4 participants