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

Fixes next vitis #191

Merged
merged 8 commits into from
Aug 2, 2022
Merged

Conversation

Ralender
Copy link
Contributor

@Ralender Ralender commented Jul 6, 2022

This patch fixes some of the issues under the next version of vitis. also adds xrt_alloc which should be used when using xrt directly or not.

@Ralender Ralender changed the base branch from sycl/unified/master to sycl/unified/next July 8, 2022 14:40
@keryell
Copy link
Member

keryell commented Jul 8, 2022

I guess you need to rebase it on latest sycl/unified/next I have fixed.

@Ralender
Copy link
Contributor Author

here is the clean rebase

Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

You should clarify some points.

@@ -282,6 +287,7 @@ struct LSMDState {
std::vector<Value *> Args;
for (auto &A : F->args())
Args.push_back(&A);
std::ignore = std::initializer_list<int>{(Args.push_back(ts), 0)...};
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need this here but not on the previous line too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why would I need what on the previous line ?

@@ -0,0 +1,20 @@
//==--------- xrt_alloc.hpp - SYCL XRT Allocator ---------------------------==//
//
Copy link
Member

Choose a reason for hiding this comment

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

Explain somewhere why you need this.

@@ -9,6 +9,8 @@
#include <sycl/sycl.hpp>
#include <sycl/ext/intel/fpga_extensions.hpp>

using namespace sycl;
Copy link
Member

Choose a reason for hiding this comment

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

I think you should not need 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.

This is the way it is for most tests.

@@ -174,6 +174,10 @@ static cl::opt<unsigned>
cl::desc("Default threshold (max size of unrolled "
"loop), used in all but O3 optimizations"));

static cl::opt<bool> UnrollOnlyWhenForced(
"unroll-only-when-forced", cl::Hidden,
cl::desc("Allow the loop remainder to be unrolled."));
Copy link
Member

Choose a reason for hiding this comment

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

Explain the rationale

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hope the updated description helps

llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp Outdated Show resolved Hide resolved
@Ralender Ralender force-pushed the FixesNextVitis branch 3 times, most recently from 2edfc9f to 6fad234 Compare July 26, 2022 00:05
@Ralender
Copy link
Contributor Author

The review has not yet been addressed.

Gauthier Harnisch added 2 commits July 25, 2022 17:38
add the sources for a utility that fixes xsim issues if needed by the users.
Copy link
Contributor Author

@Ralender Ralender left a comment

Choose a reason for hiding this comment

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

I added a commit to deal with terminate_xsim

@@ -282,6 +287,7 @@ struct LSMDState {
std::vector<Value *> Args;
for (auto &A : F->args())
Args.push_back(&A);
std::ignore = std::initializer_list<int>{(Args.push_back(ts), 0)...};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why would I need what on the previous line ?

@@ -174,6 +174,10 @@ static cl::opt<unsigned>
cl::desc("Default threshold (max size of unrolled "
"loop), used in all but O3 optimizations"));

static cl::opt<bool> UnrollOnlyWhenForced(
"unroll-only-when-forced", cl::Hidden,
cl::desc("Allow the loop remainder to be unrolled."));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hope the updated description helps

llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp Outdated Show resolved Hide resolved
@@ -1005,6 +1005,9 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
return true;
}

if (F->getIntrinsicID() == Intrinsic::not_intrinsic)
Copy link
Member

Choose a reason for hiding this comment

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

Why it was not the case before?

  • Comment.

@@ -282,6 +287,7 @@ struct LSMDState {
std::vector<Value *> Args;
for (auto &A : F->args())
Args.push_back(&A);
(void)std::initializer_list<int>{(Args.push_back(ts), 0)...};
Copy link
Member

Choose a reason for hiding this comment

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

No more std::ignore =?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer (void)

llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp Outdated Show resolved Hide resolved
Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

There are still some unanswered comments.

Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

Almost there!

sycl/include/sycl/ext/xilinx/xrt_alloc.hpp Outdated Show resolved Hide resolved
Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

Thanks!

@keryell keryell merged commit f45dbfe into triSYCL:sycl/unified/next Aug 2, 2022
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.

2 participants