You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/05 14:26:01 UTC

[GitHub] [arrow-datafusion] thinkharderdev opened a new pull request #1929: Fix JIT configs for aarch64

thinkharderdev opened a new pull request #1929:
URL: https://github.com/apache/arrow-datafusion/pull/1929


   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   Currently tests do not pass on Apple Silicone (or any non x86_64) platform. This PR adjusts JIT configs based on platform. 
   
   Disclaimer: I don't really know what I'm doing here and am mostly applying the workaround from https://github.com/bytecodealliance/wasmtime/issues/2735. 
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   Set the `is_pic` flag to `false` when creating `JIT` since `PLT` is not supported on non x86 platforms. 
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   As far as I can tell, no
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   
   No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] matthewmturner commented on pull request #1929: Fix JIT configs for aarch64

Posted by GitBox <gi...@apache.org>.
matthewmturner commented on pull request #1929:
URL: https://github.com/apache/arrow-datafusion/pull/1929#issuecomment-1059814999


   I noticed this locally as well. Thx for fixing. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] Jimexist merged pull request #1929: Fix JIT configs for aarch64

Posted by GitBox <gi...@apache.org>.
Jimexist merged pull request #1929:
URL: https://github.com/apache/arrow-datafusion/pull/1929


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] yjshen commented on pull request #1929: Fix JIT configs for aarch64

Posted by GitBox <gi...@apache.org>.
yjshen commented on pull request #1929:
URL: https://github.com/apache/arrow-datafusion/pull/1929#issuecomment-1059861425


   Thanks again for fixing this. ❤️ 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] alamb commented on pull request #1929: Fix JIT configs for aarch64

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1929:
URL: https://github.com/apache/arrow-datafusion/pull/1929#issuecomment-1059813789


   cc @yjshen 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] thinkharderdev commented on a change in pull request #1929: Fix JIT configs for aarch64

Posted by GitBox <gi...@apache.org>.
thinkharderdev commented on a change in pull request #1929:
URL: https://github.com/apache/arrow-datafusion/pull/1929#discussion_r820151234



##########
File path: datafusion-jit/src/jit.rs
##########
@@ -51,6 +52,28 @@ impl Default for JIT {
             module,
         }
     }
+
+    #[cfg(target_arch = "aarch64")]
+    fn default() -> Self {
+        let mut flag_builder = settings::builder();
+        // On at least AArch64, "colocated" calls use shorter-range relocations,
+        // which might not reach all definitions; we can't handle that here, so
+        // we require long-range relocation types.
+        flag_builder.set("use_colocated_libcalls", "false").unwrap();
+        flag_builder.set("is_pic", "false").unwrap();

Review comment:
       Good call




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] houqp commented on a change in pull request #1929: Fix JIT configs for aarch64

Posted by GitBox <gi...@apache.org>.
houqp commented on a change in pull request #1929:
URL: https://github.com/apache/arrow-datafusion/pull/1929#discussion_r820142824



##########
File path: datafusion-jit/src/jit.rs
##########
@@ -51,6 +52,28 @@ impl Default for JIT {
             module,
         }
     }
+
+    #[cfg(target_arch = "aarch64")]
+    fn default() -> Self {
+        let mut flag_builder = settings::builder();
+        // On at least AArch64, "colocated" calls use shorter-range relocations,
+        // which might not reach all definitions; we can't handle that here, so
+        // we require long-range relocation types.
+        flag_builder.set("use_colocated_libcalls", "false").unwrap();
+        flag_builder.set("is_pic", "false").unwrap();

Review comment:
       perhaps worth linking to https://github.com/bytecodealliance/wasmtime/issues/2907 in the comment so we know to reenable pic when it's supported upstream.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org