-
Notifications
You must be signed in to change notification settings - Fork 88
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
The magic numbers from the nextBaseAddress are incorrectly compared with constant values #1405
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
a0794a4
to
6df7d55
Compare
Could you provide a small test exercising the issue? |
CL code
SPIRV below is missing:
The pass just will remove it, because the src can't be equal to nullptr. |
Can you add a unit test with that to the PR please? |
687dbba
to
17c7305
Compare
Can you sign the CLA please? We won't be able to merge this PR without it. Thanks |
17c7305
to
9b46613
Compare
Could you please merge this PR? |
Your branch is 53 commits behind google/main. Please rebase on top-of-tree in order to have it tested properly by the bots. |
constant values. They are usually simplified as unequal values.
5bdac9d
to
3f31ca5
Compare
done |
Can you explain why it is incorrect to compare the magic numbers with constant values? This is not obvious to me right now, and this pass has been designed to do exactly that. So this change is basically trying to get rid of that pass. Maybe you just want to call |
The LogicalPointerToIntPass generates the base-addresses for each argument in some virtual/compiler memory space. This is not a real address, but it is good enough to compare (==, !=) it with other generated pointers (It also has problems, but that's not what this commit about). If you compare any generated-pointer to nullptr it will always be false in terms of logic of the LogicalPointerToIntPass, but tis is not true. |
Do you mean that your issue is with a comparison returning true because a constant matches the virtual address LogicalPointerToIntPass has generated for an object (while it should return false)? |
It is return true because a constant NOT matches the virtual address LogicalPointerToIntPass has generated. |
Is this about the OpenCL-CTS |
Yes, this is about this test. And we want to pass this test. This test is passed with this change. |
While this change is fixing the test on your end, I'm not sure this is the way to do it properly for |
This pass has to handle Logical pointers and it doesn't require the physical-storage-buffers flag. What is "the way" to solve this issue at your opinion? Before I will get response from OCL team. I can try to do another solution, but I need to understand what are you thinking about this? |
I think that OpenCL test ( You will note that we have this back and forth discussion because you are not sharing enough to let us understand what is happening on your side (you could have mentioned the OpenCL-CTS directly in your PR for example). What I don't understand right now is how you have set up Vulkan so that |
constant values. They are usually simplified as unequal values.