Skip to content

Conversation

zhangbo9674
Copy link
Contributor

PR types

New features

PR changes

OPs

Describe

elementwise_max添加 bf16 kernel

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.



@unittest.skipIf(
core.is_compiled_with_cuda() and get_cuda_runtime_version() < 11000,
Copy link
Contributor

Choose a reason for hiding this comment

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

not core.is_compiled_with_cuda() or core.cudnn_version() < 8100

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because support cpu bf16 kernel, so change to "core.is_compiled_with_cuda() and core.cudnn_version() < 8100"

in_list = np.asarray(in_list)
out = np.vectorize(
lambda x: struct.unpack('<f', struct.pack('<I', x << 16))[0],
lambda x: struct.unpack('<f', struct.pack('<I', np.uint32(x) << np.uint32(16)))[0],
Copy link
Contributor

Choose a reason for hiding this comment

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

why update this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

solve the window-openblas ci error

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

@zhangbo9674 zhangbo9674 merged commit 9301633 into PaddlePaddle:develop Feb 21, 2022
@zhangbo9674 zhangbo9674 deleted the dev/bf16_op_5 branch March 2, 2023 02:59
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.

3 participants