Skip to content

Commit 0101fa4

Browse files
author
Gary Frost
committedNov 26, 2024
using auto generated poms also a fix for CustomOpTest
1 parent 9afe3b7 commit 0101fa4

File tree

15 files changed

+328
-377
lines changed

15 files changed

+328
-377
lines changed
 

‎hat/backends/opencl/pom.xml

+18-30
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!--Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
43
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
54
65
This code is free software; you can redistribute it and/or modify it
@@ -22,63 +21,52 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2221
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2322
or visit www.oracle.com if you need additional information or have any
2423
questions.
25-
-->
26-
<project xmlns="http://maven.apache.org/POM/4.0.0"
27-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
28-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
--><project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
2925
<modelVersion>4.0.0</modelVersion>
30-
<groupId>oracle.code</groupId>
31-
<artifactId>hat-backend-opencl</artifactId>
32-
<version>1.0</version>
3326
<packaging>jar</packaging>
34-
35-
<!-- this required to inherit parent properties -->
3627
<parent>
3728
<groupId>oracle.code</groupId>
29+
<artifactId>hat-backends</artifactId>
3830
<version>1.0</version>
39-
<artifactId>hat.backends</artifactId>
4031
</parent>
41-
32+
<groupId>oracle.code</groupId>
33+
<artifactId>hat-backend-opencl</artifactId>
34+
<version>1.0</version>
4235
<dependencies>
4336
<dependency>
4437
<groupId>oracle.code</groupId>
45-
<version>1.0</version>
4638
<artifactId>hat</artifactId>
39+
<version>1.0</version>
4740
</dependency>
4841
</dependencies>
49-
5042
<build>
5143
<plugins>
5244
<plugin>
53-
<groupId>org.codehaus.mojo</groupId>
54-
<artifactId>exec-maven-plugin</artifactId>
55-
<configuration>
56-
<skip>true</skip>
57-
<!-- we want to inherit properties from parent but not the
58-
plugin that calls cmake -->
59-
</configuration>
45+
<groupId>org.codehaus.mojo</groupId>
46+
<artifactId>exec-maven-plugin</artifactId>
47+
<configuration>
48+
<skip>true</skip>
49+
<!--We want to inherit properties from parent but not plugin that calls cmake-->
50+
</configuration>
6051
</plugin>
61-
6252
<plugin>
6353
<groupId>org.apache.maven.plugins</groupId>
6454
<artifactId>maven-antrun-plugin</artifactId>
6555
<version>1.8</version>
6656
<executions>
6757
<execution>
6858
<phase>install</phase>
59+
<goals>
60+
<goal>run</goal>
61+
</goals>
6962
<configuration>
7063
<target>
71-
<copy file="target/hat-backend-opencl-1.0.jar" todir="${hat.target}"/>
64+
<copy file="target/hat-backend-opencl-1.0.jar" toDir="${hat.target}"/>
7265
</target>
7366
</configuration>
74-
<goals>
75-
<goal>run</goal>
76-
</goals>
7767
</execution>
7868
</executions>
7969
</plugin>
8070
</plugins>
8171
</build>
82-
83-
8472
</project>

‎hat/backends/pom.xml

+74-80
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!--Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
43
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
54
65
This code is free software; you can redistribute it and/or modify it
@@ -22,85 +21,80 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2221
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2322
or visit www.oracle.com if you need additional information or have any
2423
questions.
25-
-->
26-
27-
28-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
29-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
30-
<modelVersion>4.0.0</modelVersion>
31-
<groupId>oracle.code</groupId>
32-
<version>1.0</version>
33-
<artifactId>hat.backends</artifactId>
34-
<packaging>pom</packaging>
35-
<!-- this required to inherit parent properties -->
24+
--><project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
25+
<modelVersion>4.0.0</modelVersion>
26+
<packaging>pom</packaging>
27+
<groupId>oracle.code</groupId>
28+
<artifactId>hat-backends</artifactId>
29+
<version>1.0</version>
3630
<parent>
3731
<groupId>oracle.code</groupId>
32+
<artifactId>hat-root</artifactId>
3833
<version>1.0</version>
39-
<artifactId>hat.root</artifactId>
4034
</parent>
41-
42-
<modules>
43-
<module>opencl</module>
44-
<module>cuda</module>
45-
<module>mock</module>
46-
<module>ptx</module>
47-
<!--<module>spirv</module>-->
48-
</modules>
49-
<build>
50-
<plugins>
51-
<plugin>
52-
<groupId>org.codehaus.mojo</groupId>
53-
<artifactId>exec-maven-plugin</artifactId>
54-
<version>3.1.0</version>
55-
<executions>
56-
<execution>
57-
<id>cmake_compile</id>
58-
<phase>compile</phase>
59-
<goals>
60-
<goal>exec</goal>
61-
</goals>
62-
<configuration>
63-
<executable>cmake</executable>
64-
<arguments>
65-
<argument>-DHAT_TARGET=${hat.target}</argument>
66-
<argument>-B</argument>
67-
<argument>${hat.target}/cmake-build-debug</argument>
68-
</arguments>
69-
</configuration>
70-
</execution>
71-
<execution>
72-
<id>cmake_install_build</id>
73-
<phase>install</phase>
74-
<goals>
75-
<goal>exec</goal>
76-
</goals>
77-
<configuration>
78-
<executable>cmake</executable>
79-
<arguments>
80-
<argument>--build</argument>
81-
<argument>${hat.target}/cmake-build-debug</argument>
82-
</arguments>
83-
</configuration>
84-
</execution>
85-
86-
<execution>
87-
<id>cmake_clean</id>
88-
<phase>clean</phase>
89-
<goals>
90-
<goal>exec</goal>
91-
</goals>
92-
<configuration>
93-
<executable>rm </executable>
94-
<arguments>
95-
<argument>-rf</argument>
96-
<argument>cmake-build-debug</argument>
97-
</arguments>
98-
</configuration>
99-
</execution>
100-
101-
</executions>
102-
</plugin>
103-
</plugins>
104-
</build>
105-
35+
<dependencies>
36+
<dependency>
37+
<groupId>oracle.code</groupId>
38+
<artifactId>hat</artifactId>
39+
<version>1.0</version>
40+
</dependency>
41+
</dependencies>
42+
<modules>
43+
<module>ptx</module>
44+
<module>opencl</module>
45+
</modules>
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.codehaus.mojo</groupId>
50+
<artifactId>exec-maven-plugin</artifactId>
51+
<version>3.1.0</version>
52+
<executions>
53+
<execution>
54+
<id>cmake-compile</id>
55+
<phase>compile</phase>
56+
<goals>
57+
<goal>exec</goal>
58+
</goals>
59+
<configuration>
60+
<executable>cmake</executable>
61+
<arguments>
62+
<argument>-DHAT_TARGET=${hat.target}</argument>
63+
<argument>-B</argument>
64+
<argument>${hat.target}/cmake-build-debug</argument>
65+
</arguments>
66+
</configuration>
67+
</execution>
68+
<execution>
69+
<id>cmake_install_build</id>
70+
<phase>install</phase>
71+
<goals>
72+
<goal>exec</goal>
73+
</goals>
74+
<configuration>
75+
<executable>cmake</executable>
76+
<arguments>
77+
<argument>--build</argument>
78+
<argument>${hat.target}/cmake-build-debug</argument>
79+
</arguments>
80+
</configuration>
81+
</execution>
82+
<execution>
83+
<id>cmake_clean</id>
84+
<phase>clean</phase>
85+
<goals>
86+
<goal>exec</goal>
87+
</goals>
88+
<configuration>
89+
<executable>rm</executable>
90+
<arguments>
91+
<argument>-rf</argument>
92+
<argument>cmake-build-debug</argument>
93+
</arguments>
94+
</configuration>
95+
</execution>
96+
</executions>
97+
</plugin>
98+
</plugins>
99+
</build>
106100
</project>

‎hat/backends/ptx/pom.xml

+18-28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!--Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
43
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
54
65
This code is free software; you can redistribute it and/or modify it
@@ -22,61 +21,52 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2221
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2322
or visit www.oracle.com if you need additional information or have any
2423
questions.
25-
-->
26-
<project xmlns="http://maven.apache.org/POM/4.0.0"
27-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
28-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
--><project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
2925
<modelVersion>4.0.0</modelVersion>
30-
<groupId>oracle.code</groupId>
31-
<artifactId>hat-backend-ptx</artifactId>
32-
<version>1.0</version>
3326
<packaging>jar</packaging>
34-
35-
<!-- this required to inherit parent properties -->
3627
<parent>
3728
<groupId>oracle.code</groupId>
29+
<artifactId>hat-backends</artifactId>
3830
<version>1.0</version>
39-
<artifactId>hat.backends</artifactId>
4031
</parent>
41-
32+
<groupId>oracle.code</groupId>
33+
<artifactId>hat-backend-ptx</artifactId>
34+
<version>1.0</version>
4235
<dependencies>
4336
<dependency>
4437
<groupId>oracle.code</groupId>
45-
<version>1.0</version>
4638
<artifactId>hat</artifactId>
39+
<version>1.0</version>
4740
</dependency>
4841
</dependencies>
4942
<build>
5043
<plugins>
5144
<plugin>
52-
<groupId>org.codehaus.mojo</groupId>
53-
<artifactId>exec-maven-plugin</artifactId>
54-
<configuration>
55-
<skip>true</skip>
56-
<!-- we want to inherit properties from parent but not the
57-
plugin that calls cmake -->
58-
</configuration>
45+
<groupId>org.codehaus.mojo</groupId>
46+
<artifactId>exec-maven-plugin</artifactId>
47+
<configuration>
48+
<skip>true</skip>
49+
<!--We want to inherit properties from parent but not plugin that calls cmake-->
50+
</configuration>
5951
</plugin>
60-
6152
<plugin>
6253
<groupId>org.apache.maven.plugins</groupId>
6354
<artifactId>maven-antrun-plugin</artifactId>
6455
<version>1.8</version>
6556
<executions>
6657
<execution>
6758
<phase>install</phase>
59+
<goals>
60+
<goal>run</goal>
61+
</goals>
6862
<configuration>
6963
<target>
70-
<copy file="target/hat-backend-ptx-1.0.jar" todir="${hat.target}"/>
64+
<copy file="target/hat-backend-ptx-1.0.jar" toDir="${hat.target}"/>
7165
</target>
7266
</configuration>
73-
<goals>
74-
<goal>run</goal>
75-
</goals>
7667
</execution>
7768
</executions>
7869
</plugin>
7970
</plugins>
8071
</build>
81-
8272
</project>

‎hat/bldr/clean

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--enable-preview --source 24 clean

‎hat/clean

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* vim: set ft=java:
2+
*
3+
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
4+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5+
*
6+
* This code is free software; you can redistribute it and/or modify it
7+
* under the terms of the GNU General Public License version 2 only, as
8+
* published by the Free Software Foundation. Oracle designates this
9+
* particular file as subject to the "Classpath" exception as provided
10+
* by Oracle in the LICENSE file that accompanied this code.
11+
*
12+
* This code is distributed in the hope that it will be useful, but WITHOUT
13+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15+
* version 2 for more details (a copy is included in the LICENSE file that
16+
* accompanied this code).
17+
*
18+
* You should have received a copy of the GNU General Public License version
19+
* 2 along with this work; if not, write to the Free Software Foundation,
20+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21+
*
22+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23+
* or visit www.oracle.com if you need additional information or have any
24+
* questions.
25+
*/
26+
27+
import static bldr.Bldr.*;
28+
29+
void main(String[] args) {
30+
var hatDir = Dir.current();
31+
var buildDir = hatDir.buildDir("build").remove();
32+
hatDir.findDirs(path->path.getFileName().endsWith("target"))
33+
.map(path->BuildDir.of(path))
34+
.peek(dir->println("removing " +dir.path()))
35+
.forEach(dir->dir.remove());
36+
}

0 commit comments

Comments
 (0)
Please sign in to comment.