Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCLomatic] Add migration of 1 half, 30 bf16 APIs, refine 29 half APIs. #1181

Merged
merged 1 commit into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/DPCT/APINames.inc
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ ENTRY(h2floor, h2floor, true, NO_FLAG, P4, "Successful")
ENTRY(h2log, h2log, true, NO_FLAG, P4, "Successful")
ENTRY(h2log10, h2log10, true, NO_FLAG, P4, "Successful")
ENTRY(h2log2, h2log2, true, NO_FLAG, P4, "Successful")
ENTRY(h2rcp, h2rcp, false, NO_FLAG, P4, "no direct mapping yet")
ENTRY(h2rcp, h2rcp, true, NO_FLAG, P4, "Successful")
ENTRY(h2rint, h2rint, true, NO_FLAG, P4, "Successful")
ENTRY(h2rsqrt, h2rsqrt, true, NO_FLAG, P4, "Successful")
ENTRY(h2sin, h2sin, true, NO_FLAG, P4, "Successful")
Expand Down
62 changes: 30 additions & 32 deletions clang/lib/DPCT/APINamesMath.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,38 @@ ENTRY_RENAMED("__hisinf", MapNames::getClNamespace(false, true) + "isinf")
ENTRY_RENAMED("__hisnan", MapNames::getClNamespace(false, true) + "isnan")

// Half Math Functions
ENTRY_RENAMED("hceil", MapNames::getClNamespace(false, true) + "ceil")
ENTRY_RENAMED("hcos", MapNames::getClNamespace(false, true) + "cos")
ENTRY_RENAMED("hexp", MapNames::getClNamespace(false, true) + "exp")
ENTRY_RENAMED("hexp10", MapNames::getClNamespace(false, true) + "exp10")
ENTRY_RENAMED("hexp2", MapNames::getClNamespace(false, true) + "exp2")
ENTRY_RENAMED("hfloor", MapNames::getClNamespace(false, true) + "floor")
ENTRY_RENAMED("hlog", MapNames::getClNamespace(false, true) + "log")
ENTRY_RENAMED("hlog10", MapNames::getClNamespace(false, true) + "log10")
ENTRY_RENAMED("hlog2", MapNames::getClNamespace(false, true) + "log2")
ENTRY_RENAMED("hrcp", MapNames::getClNamespace(false, true) + "half_precision::recip<float>")
ENTRY_RENAMED("hrint", MapNames::getClNamespace(false, true) + "rint")
ENTRY_RENAMED("hrsqrt", MapNames::getClNamespace(false, true) + "rsqrt")
ENTRY_RENAMED("hsin", MapNames::getClNamespace(false, true) + "sin")
ENTRY_RENAMED("hsqrt", MapNames::getClNamespace(false, true) + "sqrt")
ENTRY_RENAMED("htrunc", MapNames::getClNamespace(false, true) + "trunc")
ENTRY_REWRITE("hceil")
ENTRY_REWRITE("hcos")
ENTRY_REWRITE("hexp")
ENTRY_REWRITE("hexp10")
ENTRY_REWRITE("hexp2")
ENTRY_REWRITE("hfloor")
ENTRY_REWRITE("hlog")
ENTRY_REWRITE("hlog10")
ENTRY_REWRITE("hlog2")
ENTRY_REWRITE("hrcp")
ENTRY_REWRITE("hrint")
ENTRY_REWRITE("hrsqrt")
ENTRY_REWRITE("hsin")
ENTRY_REWRITE("hsqrt")
ENTRY_REWRITE("htrunc")

// Half2 Math Functions
ENTRY_RENAMED("h2ceil", MapNames::getClNamespace(false, true) + "ceil")
ENTRY_RENAMED("h2cos", MapNames::getClNamespace(false, true) + "cos")
ENTRY_RENAMED("h2exp", MapNames::getClNamespace(false, true) + "exp")
ENTRY_RENAMED("h2exp10", MapNames::getClNamespace(false, true) + "exp10")
ENTRY_RENAMED("h2exp2", MapNames::getClNamespace(false, true) + "exp2")
ENTRY_RENAMED("h2floor", MapNames::getClNamespace(false, true) + "floor")
ENTRY_RENAMED("h2log", MapNames::getClNamespace(false, true) + "log")
ENTRY_RENAMED("h2log10", MapNames::getClNamespace(false, true) + "log10")
ENTRY_RENAMED("h2log2", MapNames::getClNamespace(false, true) + "log2")
ENTRY_RENAMED("h2rint", MapNames::getClNamespace(false, true) + "rint")
ENTRY_RENAMED("h2rsqrt", MapNames::getClNamespace(false, true) + "rsqrt")
ENTRY_RENAMED("h2sin", MapNames::getClNamespace(false, true) + "sin")
ENTRY_RENAMED("h2sqrt", MapNames::getClNamespace(false, true) + "sqrt")
ENTRY_RENAMED("h2trunc", MapNames::getClNamespace(false, true) + "trunc")
ENTRY_REWRITE("h2ceil")
ENTRY_REWRITE("h2cos")
ENTRY_REWRITE("h2exp")
ENTRY_REWRITE("h2exp10")
ENTRY_REWRITE("h2exp2")
ENTRY_REWRITE("h2floor")
ENTRY_REWRITE("h2log")
ENTRY_REWRITE("h2log10")
ENTRY_REWRITE("h2log2")
ENTRY_REWRITE("h2rcp")
ENTRY_REWRITE("h2rint")
ENTRY_REWRITE("h2rsqrt")
ENTRY_REWRITE("h2sin")
ENTRY_REWRITE("h2sqrt")
ENTRY_REWRITE("h2trunc")

// Single Precision Mathematical Functions
ENTRY_RENAMED_SINGLE("acosf", MapNames::getClNamespace(false, true) + "acos")
Expand Down Expand Up @@ -663,9 +664,6 @@ ENTRY_REWRITE("__hne2_mask")
ENTRY_REWRITE("__hneu2")
ENTRY_REWRITE("__hneu2_mask")

// Half2 Math Functions
ENTRY_UNSUPPORTED("h2rcp")

// Single Precision Mathematical Functions
ENTRY_REWRITE("cyl_bessel_i0f")
ENTRY_REWRITE("cyl_bessel_i1f")
Expand Down
Loading
Loading