[PATCH] D138702: support for HIP non hostcall printf

2022-11-25 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH created this revision. vikramRH added reviewers: sameerds, b-sumner, yaxunl. vikramRH added a project: LLVM. Herald added subscribers: kosarev, foad, kerbowa, hiraditya, Anastasia, jvesely, arsenm. Herald added a project: All. vikramRH requested review of this revision. Herald added

[PATCH] D138702: support for HIP non hostcall printf

2022-12-01 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH added a comment. There were some issues reported where it was found that pcie atomics are not available in some environments, as a result hostcall and HIP-Printf were also not available. This Patch is intended to provide an alternative in such scenarios while hostcall based

[PATCH] D138702: support for HIP non hostcall printf

2023-02-10 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH abandoned this revision. vikramRH added a comment. A new implentation is under discussion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138702/new/ https://reviews.llvm.org/D138702 ___

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-25 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 525946. vikramRH added a comment. rebase and ping, apologies for the short frequency. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-01 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 527472. vikramRH added a comment. new line at the end of test file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-01 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 527462. vikramRH added a comment. Herald added a subscriber: jdoerfert. Few additional changes, 1. reflect printf-kind in module flags metadata 2. Test cases for the change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-31 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 526963. vikramRH added a comment. Handled most review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files: clang/include/clang/Basic/TargetOptions.h

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-31 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH marked 11 inline comments as done. vikramRH added inline comments. Comment at: clang/test/CodeGenHIP/printf_nonhostcall.cpp:64 +// CHECK-NEXT:[[PRINTBUFFNEXTPTR4:%.*]] = getelementptr inbounds i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR3]], i64 [[TMP13]] +//

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-31 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH marked 2 inline comments as done. vikramRH added inline comments. Comment at: clang/include/clang/Driver/Options.td:1030 NegFlag>; +def mprintf_kind_EQ : Joined<["-"], "mprintf-kind=">, Group, + HelpText<"Specify the printf lowering scheme (AMDGPU only), allowed

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-24 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 525082. vikramRH added a comment. Handled review comments and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-07 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH added inline comments. Comment at: llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:386-387 +} else { + auto IntTy = dyn_cast(Args[i]->getType()); + if (IntTy && IntTy->getBitWidth() == 32) +WhatToStore.push_back( arsenm wrote: >

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-08 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 529551. vikramRH added a comment. Reafactored non string arg handling into a seperate function with additional asserts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-09 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 529865. vikramRH added a comment. Handled last set of review comments from @arsenm, would be willing to handle any new findings/concerns via additional patches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-05 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH marked 4 inline comments as done. vikramRH added inline comments. Comment at: clang/test/CodeGenHIP/printf_nonhostcall.cpp:228 + return printf(s, 10); +} arsenm wrote: > vikramRH wrote: > > arsenm wrote: > > > Need some vector tests, especially 3 x

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-05 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 528407. vikramRH added a comment. Handled few more review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-07 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 529207. vikramRH added a comment. Further review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files: clang/docs/ReleaseNotes.rst

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-07 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH marked 4 inline comments as done. vikramRH added inline comments. Comment at: clang/test/CodeGenHIP/printf_nonhostcall.cpp:137 + +__device__ float f1 = 3.14f; +__device__ double f2 = 2.71828; arsenm wrote: > Also half C++ default arg promotions does

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-07 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 529219. vikramRH marked an inline comment as done. vikramRH added a comment. updated formating Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-23 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 524590. vikramRH added a comment. Handled review comments and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-06-10 Thread Vikram Hegde via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG631c965483e0: [AMDGPU] Non hostcall printf support for HIP (authored by vikramRH). Changed prior to commit:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-12 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH created this revision. vikramRH added reviewers: sameerds, b-sumner, yaxunl, arsenm. Herald added subscribers: hoy, kerbowa, hiraditya, Anastasia, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. vikramRH requested review of this revision. Herald added subscribers:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-18 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 523344. vikramRH added a comment. Hanldles Review comments from @sameerds Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 Files:

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-18 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH added inline comments. Comment at: llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:426-427 + +// The buffered version still follows OpenCL printf standards for +// printf return value, i.e 0 on success, 1 on failure. +ConstantPointerNull *zeroIntPtr =

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-18 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH added inline comments. Comment at: llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:458 +auto CreateControlDWord = M->getOrInsertFunction( +StringRef("__ockl_create_control_dword"), Builder.getInt32Ty(), +Builder.getInt32Ty(), Int1Ty, Int1Ty);

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-17 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH updated this revision to Diff 522954. vikramRH added a comment. 1. Updating D150427 : [AMDGPU] Non hostcall printf support for HIP # 2. Enter a brief description of the changes included in this update. 3. The first line is used as subject, next lines

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-17 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH added a comment. In D150427#4338334 , @jhuber6 wrote: > Where does the runtime implementation of this live? I'm not very familiar > with the HIP / hostcall ecosystem. Currently there is a rocclr review up internally for the runtime side

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-17 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH added inline comments. Comment at: llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:458 +auto CreateControlDWord = M->getOrInsertFunction( +StringRef("__ockl_create_control_dword"), Builder.getInt32Ty(), +Builder.getInt32Ty(), Int1Ty, Int1Ty);