This is an automated email from the ASF dual-hosted git repository.

markd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git

commit e0eca2f29dfb85b56896b46d8fbe36bcdbdad89d
Author: Mark Dokter <[email protected]>
AuthorDate: Fri Feb 5 02:09:17 2021 +0100

    [MINOR] Various fixes concerning dlls, jars, headers
    
    * Fix spoof cuda loading dll from jar
    * Unexpected case sensitivity on Windows =)
    * Code cosmetics (silencing IntelliJ warnings)
    * Ignore CLion directory in rat check
    * Add missing cuh files to pom.xml
---
 pom.xml                                                        | 3 +++
 src/main/java/org/apache/sysds/hops/codegen/SpoofCompiler.java | 1 +
 src/main/java/org/apache/sysds/runtime/codegen/SpoofCUDA.java  | 6 +++---
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index eec8585..7212f14 100644
--- a/pom.xml
+++ b/pom.xml
@@ -106,8 +106,10 @@
                                <directory>src/main/cuda/headers</directory>
                                <includes>
                                        <include>agg_ops.cuh</include>
+                                       <include>operators.cuh</include>
                                        <include>reduction.cuh</include>
                                        <include>spoof_utils.cuh</include>
+                                       <include>TempStorage.cuh</include>
                                        <include>utils.cuh</include>
                                </includes>
                                <targetPath>cuda/headers</targetPath>
@@ -604,6 +606,7 @@
                                                                
<exclude>scripts/perftest/python/requirements.txt</exclude>
                                                                <!-- external 
sources -->
                                                                
<exclude>src/main/cuda/ext/**</exclude>
+                                                               
<exclude>src/main/cuda/.idea/</exclude>
                                                        </excludes>
                                                </configuration>
                                        </plugin>
diff --git a/src/main/java/org/apache/sysds/hops/codegen/SpoofCompiler.java 
b/src/main/java/org/apache/sysds/hops/codegen/SpoofCompiler.java
index 46bc481..06bedbc 100644
--- a/src/main/java/org/apache/sysds/hops/codegen/SpoofCompiler.java
+++ b/src/main/java/org/apache/sysds/hops/codegen/SpoofCompiler.java
@@ -204,6 +204,7 @@ public class SpoofCompiler {
                                if(SystemUtils.IS_OS_WINDOWS) {
                                        os = "Windows";
                                        suffix = ".dll";
+                                       arch = arch.toUpperCase();
                                }
 
                                String libName = "libsystemds_spoof_cuda-" + os 
+ "-" + arch + suffix;
diff --git a/src/main/java/org/apache/sysds/runtime/codegen/SpoofCUDA.java 
b/src/main/java/org/apache/sysds/runtime/codegen/SpoofCUDA.java
index 127ef36..e0fc9c4 100644
--- a/src/main/java/org/apache/sysds/runtime/codegen/SpoofCUDA.java
+++ b/src/main/java/org/apache/sysds/runtime/codegen/SpoofCUDA.java
@@ -72,7 +72,7 @@ public class SpoofCUDA extends SpoofOperator {
 
        public double execute(ArrayList<MatrixObject> inputs, 
ArrayList<ScalarObject> scalarObjects, MatrixObject out_obj,
                                                           ExecutionContext ec) 
{
-               double ret = 0;
+               double ret;
                long out_ptr = 0;
 
                if(out_obj != null)
@@ -110,8 +110,8 @@ public class SpoofCUDA extends SpoofOperator {
 
        @Override
        public String getSpoofType() {
-               String tmp[] = getClass().getName().split("\\.");
-                       return  tmp[tmp.length-1] + "_" + 
getSpoofTemplateType() + "_" + name.split("\\.")[1];
+               String[] tmp = getClass().getName().split("\\.");
+               return  tmp[tmp.length-1] + "_" + getSpoofTemplateType() + "_" 
+ name.split("\\.")[1];
        }
 
        private native float execute_f(long ctx, String name, long[] in_ptr, 
long[] side_ptr,

Reply via email to