Skip to content

Add kDLBComplex type to DLDataTypeCode#187

Merged
tqchen merged 2 commits into
dmlc:mainfrom
rgommers:add-bcomple32-type-enum
Jun 4, 2026
Merged

Add kDLBComplex type to DLDataTypeCode#187
tqchen merged 2 commits 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 Outdated
/*! \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.

Copy link
Copy Markdown

@hpkfft hpkfft left a comment

Choose a reason for hiding this comment

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

Thanks!

@hpkfft
Copy link
Copy Markdown

hpkfft commented Jun 4, 2026

It looks like everyone agrees/approves (both here and in the RFC).
Can this be merged?

@tqchen tqchen merged commit 4ff18a5 into dmlc:main Jun 4, 2026
3 checks passed
@tqchen
Copy link
Copy Markdown
Member

tqchen commented Jun 4, 2026

Thanks @rgommers @hpkfft this is merged

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