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

[SYCL] Minor fixes to SYCLConditionalCallOnDevice pass #15915

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

dm-vodopyanov
Copy link
Contributor

This patch fixes minor issues in impl and tests for SYCLConditionalCallOnDevice pass:

  • new FCaller function now have attributes from the old one
  • fix tests to support RelWithDebInfo and Debug modes

This patch fixes minor issues in impl and tests for
SYCLConditionalCallOnDevice pass:

- new FCaller function now have attributes from the old one
- fix tests to support RelWithDebInfo and Debug modes
@dm-vodopyanov dm-vodopyanov requested a review from a team as a code owner October 29, 2024 16:32
@@ -42,8 +42,8 @@ entry:
ret void
}

; CHECK: declare spir_func void @call_if_on_device_conditionally1_PREFIX_1(ptr, ptr, i32, i32)
; CHECK: declare spir_func void @call_if_on_device_conditionally2_PREFIX_2(ptr, ptr, i32, i32)
; CHECK: declare spir_func void @call_if_on_device_conditionally1_PREFIX_1(ptr[[VAL1:.*]], ptr[[VAL2:.*]], i32[[VAL3:.*]], i32[[VAL4:.*]])
Copy link
Contributor

Choose a reason for hiding this comment

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

May be a test can be a bit more comprehensive with the actual checks for the attributes.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to this comment. The way the test is written, it would pass even without your patch due to .* regexp which allows an empty string.

Therefore, I suggest that you add a separate test where you check that both argument and function attributes have been correctly copied over

@@ -28,7 +28,7 @@ entry:
ret void
}

; CHECK: declare spir_func void @call_if_on_device_conditionally_PREFIX_1(ptr, ptr, i32, i32)
; CHECK: declare spir_func void @call_if_on_device_conditionally_PREFIX_1(ptr[[VAL1:.*]], ptr[[VAL2:.*]], i32[[VAL3:.*]], i32[[VAL4:.*]])
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
; CHECK: declare spir_func void @call_if_on_device_conditionally_PREFIX_1(ptr[[VAL1:.*]], ptr[[VAL2:.*]], i32[[VAL3:.*]], i32[[VAL4:.*]])
; CHECK: declare spir_func void @call_if_on_device_conditionally_PREFIX_1(ptr{{.*}}, ptr{{.*}}, i32{{.*}}, i32{{.*}})

Nit: no need to capture if you don't use the result

@@ -42,8 +42,8 @@ entry:
ret void
}

; CHECK: declare spir_func void @call_if_on_device_conditionally1_PREFIX_1(ptr, ptr, i32, i32)
; CHECK: declare spir_func void @call_if_on_device_conditionally2_PREFIX_2(ptr, ptr, i32, i32)
; CHECK: declare spir_func void @call_if_on_device_conditionally1_PREFIX_1(ptr[[VAL1:.*]], ptr[[VAL2:.*]], i32[[VAL3:.*]], i32[[VAL4:.*]])
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to this comment. The way the test is written, it would pass even without your patch due to .* regexp which allows an empty string.

Therefore, I suggest that you add a separate test where you check that both argument and function attributes have been correctly copied over

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.

None yet

3 participants