[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; I would also like to keep the spirit of this code if not in this exact form at least something that performs the same functionality. https://reviews.llvm.org/D38883 _

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38258: [OpenMP] Fix passing of -m arguments to device toolchain

2017-09-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea accepted this revision. gtbercea added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/Driver/openmp-offload.c:89 +/// ### + /// Check the phases graph when using

[PATCH] D38259: [OpenMP] Fix translation of target args

2017-09-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea accepted this revision. gtbercea added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D38259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D38258: [OpenMP] Fix passing of -m arguments to device toolchain

2017-09-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: test/Driver/openmp-offload.c:89 +/// ### + /// Check the phases graph when using a single target, different from the host. Shouldn't these tests b

[PATCH] D38257: [OpenMP] Fix memory leak when translating arguments

2017-09-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea accepted this revision. gtbercea added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D38257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 116747. gtbercea added a comment. Fix test. https://reviews.llvm.org/D38040 Files: test/OpenMP/openmp_offload_codegen.cpp Index: test/OpenMP/openmp_offload_codegen.cpp === --- /dev/null ++

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea reopened this revision. gtbercea added a comment. This revision is now accepted and ready to land. Open https://reviews.llvm.org/D38040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-09-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea reopened this revision. gtbercea added a comment. This revision is now accepted and ready to land. Open Repository: rL LLVM https://reviews.llvm.org/D29660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 116671. gtbercea added a comment. Add nocudalib flag. https://reviews.llvm.org/D38040 Files: test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp === --- test/OpenM

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea reopened this revision. gtbercea added a comment. This revision is now accepted and ready to land. Open https://reviews.llvm.org/D38040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 116664. gtbercea added a comment. Fix test. https://reviews.llvm.org/D38040 Files: test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp === --- test/OpenMP/target_m

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-25 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea reopened this revision. gtbercea added a comment. This revision is now accepted and ready to land. Open. Repository: rL LLVM https://reviews.llvm.org/D37914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D37913: [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.

2017-09-25 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 116621. gtbercea added a comment. Split line. https://reviews.llvm.org/D37913 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c =

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-25 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D38040#878799, @Hahnfeld wrote: > In https://reviews.llvm.org/D38040#878441, @gtbercea wrote: > > > The test is verifying whether the parameter is passed to the kernel > > correctly. I believe it was not passed as a reference before the patch

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D38040#878090, @Hahnfeld wrote: > Hi Doru, > > if I remember correctly I submitted https://reviews.llvm.org/D34888 for a > crash when mapping a scalar value with nested regions. > I've marked another test in this file that the codegen for `t

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115948. Repository: rL LLVM https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c === --- test/D

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115947. Repository: rL LLVM https://reviews.llvm.org/D38040 Files: test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map_codegen.cpp === --- test/OpenMP/target_map_codegen.cpp

[PATCH] D37913: [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.

2017-09-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115943. gtbercea added a comment. Don't take into account unknown CUDA archs not even for testing purposes. Repository: rL LLVM https://reviews.llvm.org/D37913 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driv

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115941. gtbercea added a comment. Address comment. Repository: rL LLVM https://reviews.llvm.org/D37912 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c =

[PATCH] D38040: [OpenMP] Add an additional test for D34888

2017-09-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Test for checking if the mapping is performed correctly. This is a test initially included in Patch https://reviews.llvm.org/D29905 Repository: rL LLVM https://reviews.llvm.org/D38040 Files: test/OpenMP/target_map_codegen.cpp Index: test/OpenMP/target_map

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: test/Driver/openmp-offload-gpu.c:133 +/// Check that the flag is passed when -fopenmp-relocatable-target is used. +// RUN: %clang -### -c -S -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_99 -fopenmp-

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115697. gtbercea added a comment. Only check for -S. Repository: rL LLVM https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c ===

[PATCH] D37913: [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.

2017-09-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115692. gtbercea added a comment. Add test. Repository: rL LLVM https://reviews.llvm.org/D37913 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115667. gtbercea added a reviewer: hfinkel. Repository: rL LLVM https://reviews.llvm.org/D37912 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c ==

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115502. gtbercea added a comment. Fix diff. Repository: rL LLVM https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115500. gtbercea added a comment. Add test. https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c ===

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115497. gtbercea added a comment. Fix tests. https://reviews.llvm.org/D37912 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c ==

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115481. gtbercea added a comment. Fix condition. https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp === --- lib/Driver/ToolChains/C

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115447. gtbercea added a comment. Fix parantheses. https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp === --- lib/Driver/ToolChains

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115444. gtbercea added a comment. Contract check. https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp === --- lib/Driver/ToolChains/

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D37912#872294, @tra wrote: > Shouldn't this temp .cubin file go into the temporary directory, as opposed > to the same directory as the input file? That is indeed the intention. The filename already contains the "/tmp/" I just make sure th

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. If we only use the compiler front-end, do not throw an error about the cuda device library not being found. This allows the front-end to be run on systems where no Cuda installation is found. Repository: rL LLVM https://reviews.llvm.org/D37914 Files: lib/D

[PATCH] D37913: [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Enable the -nocudalib flag for the OpenMP device offloading toolchain as well. Currently it can only be used for the CUDA toolchain. Repository: rL LLVM https://reviews.llvm.org/D37913 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cud

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. When composing the output file name, the path to the file is being dropped. The full path is required. Repository: rL LLVM https://reviews.llvm.org/D37912 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#839736, @alekseyshl wrote: > In https://reviews.llvm.org/D29660#839728, @alekseyshl wrote: > > > In https://reviews.llvm.org/D29660#839550, @alekseyshl wrote: > > > > > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/build

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#839550, @alekseyshl wrote: > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/7109 > failed on r310718, please fix. Couldn't fix/find the actual error so for now, just moving the flag patch tests to openmp-offloa

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#839275, @alekseyshl wrote: > In https://reviews.llvm.org/D29660#839209, @gtbercea wrote: > > > I have re-enabled the previous offloading tests and moved the new GPU > > offloading tests to a new file which is disabled for linux (for no

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. I have re-enabled the previous offloading tests and moved the new GPU offloading tests to a new file which is disabled for linux (for now). 310718 Alex thanks so much for the logs, they have been very useful to understand what's going on. Aleksey, I have since tried

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#838185, @alekseyshl wrote: > In https://reviews.llvm.org/D29660#838150, @gtbercea wrote: > > > First of all, I apologize if I've upset you with my previous post. I am > > actively working on understanding what is causing these issues.

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#838194, @arphaman wrote: > The failures were very widespread, e.g. there's a linux buildbot that was red > until the revert: http://bb.pgr.jp/builders/test-clang-i686-linux-RA. If you > have access to a linux machine you should be abl

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. First of all, I apologize if I've upset you with my previous post. I am actively working on understanding what is causing these issues. It is not my intention to write tests that work on local configurations only. I am upset to see that these tests keep failing for you

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Hi Alex, I have no idea what the errors you mention are. I worked until very late last night to fix the previous error with the compute capability. Maybe fixing that unlocked some other errors. I would need a lot of help to figure out what's going on since I probably

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. 310549 should solve this problem by using a default architecture that is supported by the current device version. Repository: rL LLVM https://reviews.llvm.org/D29660 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Thanks for running the test on your machine! This is very useful. I see what the problem is now: "clang: error: cannot find libdevice for sm_20. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice."

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. I've removed that test. Let's see if the other two tests pass or not. I can't reproduce the error locally so it's hard to figure out what's failing. If you have a machine with that configuration and can run the command I would appreciate seeing the output of the failin

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#837298, @alekseyshl wrote: > Even after r310505, openmp-offload.c continues to haunt our bots, for example > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/2012. > Can you please fix this test? Preparing a

[PATCH] D36537: [OpenMP] Enable executable lookup into driver directory.

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 110447. gtbercea added a comment. Add comment. https://reviews.llvm.org/D36537 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp === --- lib/Driver/ToolChains/Cud

[PATCH] D36537: [OpenMP] Enable executable lookup into driver directory.

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Invoking the compiler inside a script causes the clang-offload-bundler executable to not be found. This patch fixes this error. Repository: rL LLVM https://reviews.llvm.org/D36537 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Revision 310505 fixes the tests for this patch. Repository: rL LLVM https://reviews.llvm.org/D29660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29660#836927, @arphaman wrote: > Looks like this test is failing on macOS again after this change: > > http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/39231/testReport/Clang/Driver/openmp_offload_c/ > > Can you plea

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-08-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea closed this revision. gtbercea added a comment. Already covered by https://reviews.llvm.org/D34888 Repository: rL LLVM https://reviews.llvm.org/D29905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. I have just pushed a fix, revision 310433. https://reviews.llvm.org/D29654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29654#835548, @hfinkel wrote: > In https://reviews.llvm.org/D29654#835392, @gtbercea wrote: > > > In https://reviews.llvm.org/D29654#835371, @arphaman wrote: > > > > > The last RUN line in the new commit triggers the same assertion failure: >

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29654#835507, @arphaman wrote: > In https://reviews.llvm.org/D29654#835501, @gtbercea wrote: > > > Is that the last access to CachedResults before the error? > > > Is the assertion the last access? Yes. > > There must be a discrepancy between

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Is that the last access to CachedResults before the error? https://reviews.llvm.org/D29654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29654#835429, @arphaman wrote: > The "x86_64-apple-darwin17.0.0-x86_64-host" triple looks suspicious though It looks like the triple is in the list though: second = "x86_64-apple-darwin17.0.0-x86_64-host it is entry [1]. https://reviews

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29654#835371, @arphaman wrote: > The last RUN line in the new commit triggers the same assertion failure: > > Assertion failed: (CachedResults.find(ActionTC) != CachedResults.end() && > "Result does not exist??"), function BuildJobsForActi

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29654#835256, @arphaman wrote: > Great, thanks! I think that you can just revert my revert with the fix > applied in one commit Hi Alex, I just commited the changes again. Let me know if it still fails for you. I think the issue was actu

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29654#835045, @arphaman wrote: > Hi @gtbercea, > I couldn't reply to the email as cfe-commits didn't even register this > commit somehow, so I'm replying here. > > Unfortunately I had to revert this commit (r310291), + two others for a clea

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 110056. gtbercea added a comment. Add -no-canonical-prefixes to tests. https://reviews.llvm.org/D29654 Files: lib/Driver/Driver.cpp lib/Driver/ToolChains/Clang.cpp lib/Driver/ToolChains/CommonArgs.cpp lib/Driver/ToolChains/CommonArgs.h lib/Driver

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 110007. gtbercea added a comment. Fix test comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/Compilation.cpp lib/Driver/ToolCh

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 109939. gtbercea added a comment. Fix -march special casing. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/Compilation.cpp lib/Drive

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChain.cpp:808 + continue; + } else if (XOpenMPTargetNoTriple) +// Passing device args: -Xopenmp-target -opt=val. hfinkel wrote: > Please include {} around this else-if code, even th

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 109938. gtbercea added a comment. Address comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/Compilation.cpp lib/Driver/ToolCha

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 109904. gtbercea added a comment. Don't exclude flags when host matches offload toolchain. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Dr

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 109903. gtbercea added a comment. New way to handle OpenMP target flags. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/Compilation.c

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. @hfinkel I think I have something that works which is similar to what you were requesting. Please let me know your thoughts! Thanks, --Doru https://reviews.llvm.org/D34784 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105932. gtbercea added a comment. Address comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:474 +for (StringRef Opt : OptList) { + AddMArchOption(DAL, Opts, Opt); +} hfinkel wrote: > gtbercea wrote: > > hfinkel wrote: > > > Shouldn't you be adding all of the options,

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29905#800416, @Hahnfeld wrote: > In https://reviews.llvm.org/D34888#799576, @gtbercea wrote: > > > Does this also include the fixes in the following revision? > > > > https://reviews.llvm.org/D29905 > > > Sorry, I wasn't aware of this revisio

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105453. gtbercea added a comment. . https://reviews.llvm.org/D29647 Files: include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains/BareMetal.cpp lib/Driver/ToolChains/BareMetal.h lib/Driver/ToolChains/Clang.cpp lib/Drive

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105446. gtbercea added a comment. Use str() https://reviews.llvm.org/D29658 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp === --- lib/Driver/Driver.cpp +++ lib/Driver/Driver.cp

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:478 +auto MArchList = DAL->getAllArgValues(options::OPT_march_EQ); +assert(MArchList.size() < 2 && "At most one GPU arch allowed."); +if (MArchList.empty()) hfinkel wrote: > Ca

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105355. gtbercea added a comment. Address Comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105354. gtbercea added a comment. Address comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/Driver.cpp lib/Driver/ToolChains/Clang.cpp lib/Driver/ToolChains/Co

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29658#732520, @ABataev wrote: > Tests? Can't write any meaningful tests. This will be tested by all future patches that perform offloading using OpenMP. https://reviews.llvm.org/D29658 ___ c

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/Driver.cpp:564 + auto &CudaTC = + ToolChains[TT.str() + "/" + HostTC->getTriple().normalize()]; + if (!CudaTC) Hahnfeld wrote: > The code above uses `HostTriple.str(

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105320. gtbercea edited the summary of this revision. gtbercea added a comment. Rebase on latest master. https://reviews.llvm.org/D29658 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp =

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: test/Driver/openmp-offload.c:607 + +// CHK-FOPENMP-EQ-TARGET: clang{{.*}} argument unused during compilation: '-Xopenmp-target=powerpc64le-ibm-linux-gnu -march=pwr8' + hfinkel wrote: > I don't see why you'd check that

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105280. gtbercea marked 3 inline comments as done. gtbercea added a comment. Address comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/D

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:443 + +// Get the compute capability from the -fopenmp-targets flag. +// The default compute capability is sm_20 since this is a CUDA hfinkel wrote: > Is this first sentence accura

[PATCH] D34888: [OpenMP] Fix mapping of scalars for combined directives

2017-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Does this also include the fixes in the following revision? https://reviews.llvm.org/D29905 Repository: rL LLVM https://reviews.llvm.org/D34888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. @hfinkel I've add the flag as suggested. There is one minor change, I used "=" instead of ":" when specifying the toolchain/triple. I also support the triple being omitted when there is only one offloading toolchain specified with -fopenmp-targets. https://reviews.ll

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104962. gtbercea added a comment. Check -fopenmp-targets has one entry when using default toolchain in -Xopenmp-target. https://reviews.llvm.org/D34784 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104960. gtbercea retitled this revision from "[OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading " to "[OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading". gtbercea added a c

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D34784#795988, @hfinkel wrote: > In https://reviews.llvm.org/D34784#795980, @gtbercea wrote: > > > In https://reviews.llvm.org/D34784#795934, @hfinkel wrote: > > > > > In https://reviews.llvm.org/D34784#795871, @gtbercea wrote: > > > > > > > I

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D34784#795934, @hfinkel wrote: > In https://reviews.llvm.org/D34784#795871, @gtbercea wrote: > > > In https://reviews.llvm.org/D34784#795367, @hfinkel wrote: > > > > > In https://reviews.llvm.org/D34784#795353, @gtbercea wrote: > > > > > > > I

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D34784#795367, @hfinkel wrote: > In https://reviews.llvm.org/D34784#795353, @gtbercea wrote: > > > In https://reviews.llvm.org/D34784#795287, @hfinkel wrote: > > > > > What happens if you have multiple targets? Maybe this should be > > > -fop

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D34784#795287, @hfinkel wrote: > What happens if you have multiple targets? Maybe this should be > -fopenmp-targets-arch=foo,bar,whatever? > > Once this all lands, please make sure that you add additional test cases > here. Make sure that th

[PATCH] D29339: [OpenMP] Add support for auxiliary triple specification

2017-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104656. gtbercea added a comment. Rebase https://reviews.llvm.org/D29339 Files: lib/Driver/ToolChains/Clang.cpp lib/Frontend/CompilerInstance.cpp lib/Frontend/CompilerInvocation.cpp lib/Frontend/InitPreprocessor.cpp test/Driver/openmp-offload.c

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104535. gtbercea added a comment. [Update regression tests] Add a test for propagating the compute capability to the OpenMP device offloading toolchain which targets NVIDIA GPUs. This is a test for patch D34784 which is ena

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104532. Repository: rL LLVM https://reviews.llvm.org/D34784 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. OpenMP has the ability to offload target regions to devices which may have different architectures. A new -fopenmp-target-arch flag is introduced to specify the device architecture. In this patch I use the new flag to specify the compute capability of the under

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 104527. gtbercea added a comment. Split previous diff into a "device offloading kind" patch (show here) and a **new** patch which relies on a new compiler flag. A TODO has been added to signal that the compute capability is to be handled in the **new** pat

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: test/Driver/openmp-offload.c:614 +/// Check -march propagates compute capability to device offloading toolchain. +// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -no-canonical-prefixes -march=sm_3

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: test/Driver/openmp-offload.c:614 +/// Check -march propagates compute capability to device offloading toolchain. +// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -no-canonical-prefixes -march=sm_3

<    1   2   3   4   5   6   7   >