Revert "[HIP] Allow std::malloc in device function"
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Wed, 14 Jun 2023 20:03:29 +0000 (16:03 -0400)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Wed, 14 Jun 2023 20:33:30 +0000 (16:33 -0400)
commit8193b291cefa732dd37fc917bd2921385e639d21
tree7b644a822b478fac0c178a153a81b28550645192
parent83b7f018fd704714fbb4c15081bce3dde48eb707
Revert "[HIP] Allow std::malloc in device function"

This reverts commit f5033c37025db46df95a7859d7189d09b5e3433e.

revert this patch since it causes regressions for Tensile. A
reduced test case is:

int main()
{
    std::shared_ptr<float> a;
    a = std::shared_ptr<float>(
        (float*)std::malloc(sizeof(float) * 100),
        std::free
    );
    return 0;
}

Will fix the issue then re-commit.

Fixes: SWDEV-405317
clang/lib/Headers/__clang_hip_runtime_wrapper.h
clang/test/Headers/Inputs/include/cstdlib
clang/test/Headers/Inputs/include/math.h
clang/test/Headers/Inputs/include/sstream [deleted file]
clang/test/Headers/Inputs/include/stdexcept [deleted file]
clang/test/Headers/hip-header.hip