TiGa-RCE commited on
Commit
3bf6e3e
·
verified ·
1 Parent(s): 2e4c103

Integrate verified v1.3 CPU CUDA contact fix and snowmobile center of mass

Browse files
.gitattributes CHANGED
@@ -1,2 +1,3 @@
1
  bin/* filter=lfs diff=lfs merge=lfs -text
2
  native/selective-freeze-source.tar.gz filter=lfs diff=lfs merge=lfs -text
 
 
1
  bin/* filter=lfs diff=lfs merge=lfs -text
2
  native/selective-freeze-source.tar.gz filter=lfs diff=lfs merge=lfs -text
3
+ native/physics-source.tar.gz filter=lfs diff=lfs merge=lfs -text
BINARY_PROVENANCE.json CHANGED
@@ -51,5 +51,19 @@
51
  "source_base_revision": "b90b8af06ffc4ea4e4fd703becd1107a48b8e5e0",
52
  "source_repository": "https://github.com/Zorro909/driving_sim_rs",
53
  "source_snapshot_path": "native/selective-freeze-source.tar.gz",
54
- "source_snapshot_sha256": "297d2ce34569994acd2a477e64c5315cb2081699b4333b8abdabb3ff7451d8db"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  }
 
51
  "source_base_revision": "b90b8af06ffc4ea4e4fd703becd1107a48b8e5e0",
52
  "source_repository": "https://github.com/Zorro909/driving_sim_rs",
53
  "source_snapshot_path": "native/selective-freeze-source.tar.gz",
54
+ "source_snapshot_sha256": "297d2ce34569994acd2a477e64c5315cb2081699b4333b8abdabb3ff7451d8db",
55
+ "physics_update": {
56
+ "upstream_version": "1.3.0",
57
+ "upstream_revision": "ab3ec67",
58
+ "local_additions_preserved": true,
59
+ "source_receipt": "native/physics-source-identities.json",
60
+ "status": "candidate; requires deployment and hosted app acceptance",
61
+ "artifacts": {
62
+ "bin/altd-sim": "792139f30bcfecf25f2d78595d2611234d30b0a254b5ece0ec587f1d27a80df2",
63
+ "bin/libaltd_gpu.so": "e5e9a61d863bc3b429af69a13cd8d50f63cad8984b3e6a9001ae342fc5981e05"
64
+ },
65
+ "source_archive": "native/physics-source.tar.gz",
66
+ "source_archive_sha256": "6abefb234de18dee58d69758c6cc8900f259993663ac37f90ce39aa114a30718",
67
+ "cuda_original_cases_passed": 57
68
+ }
69
  }
RELEASE_MANIFEST.json CHANGED
@@ -3,7 +3,7 @@
3
  "files": {
4
  ".gitattributes": "3aa7a5a6b603279d7a0826d015985988192b67e3cedb38a59785ef43c04fc77b",
5
  "BETA_TESTING.md": "829dae67ec37dac2a4e7b178ab5ee4fc5f63896af132fbff457a5e35141fe94d",
6
- "BINARY_PROVENANCE.json": "e05f4c3a4a2a0da39b213708c532f3e514109c5530250b402347a8d751105052",
7
  "BUCKET_BUNDLE.md": "cb7a0f023d5a1f93f0288c6a5646b64f8f3e9d36150c0730aea94590e5b80260",
8
  "CUDA_REFERENCE.md": "f7453c3254d244f8b0de41fde5851cb025159f5cea4a4d1a5d8208a955550c6c",
9
  "DATA_POLICY.md": "fc5978528abe1c21c14882417ac8a706e04a0831bbd3fdb3de8c64442c1a7b3d",
@@ -22,15 +22,14 @@
22
  "app_release.py": "7482559c667a665fd3cb6aa8af6c78422a822b515e14589db8306f7fd4860a8b",
23
  "assets/formula_template.json": "80f745df82bb7be45af52785fd582460bcddc63c5a4e1d8375d85b3122db4c6b",
24
  "assets/rally_template.json": "7350a3fe28d9b4da7a0965ae6ea7ca3472fb7885303e342310d63a0dce80851c",
25
- "assets/snowmobile_template.json": "12d30545876011fd6fccdd3e721f9c465938c9c58ac99338205481d5e7ac6742",
26
  "assets/track-atlas.json": "d97c8900e3e5fb17734b5bd61d1f4f4b196d9be30af9848e2e273ae7e4079ae4",
27
  "assets/truck_template.json": "a83bffea4d5e818c135ab3aba68a47aa288d6ad0e7b8bd9c95ed0dea9e9df2f7",
28
- "bin/altd-sim": "ce31f754f6b6f3afaf4dcc44c1e6fda3e6414eb2924fa167b8778523bcaf2070",
29
  "bin/extract_saved_track": "3a7733c45b4301a786fcbfe92660a1c484749272da5f608d62f34878bd4ff31a",
30
- "bin/libaltd_gpu.so": "3b1b88bccc06a21acc33ac4400af016d55a7e3d8727136a0c43b541f3c7887ca",
31
  "bucket_storage.py": "f6132ba5f95d106a667742ec092f2799de00e4baf1bf33600da4f0daaa46012a",
32
  "build_info.py": "2a57f73abd9e062cf029b65b09b26b8d12e301bac2f7efec7edb4b85b47671c3",
33
- "builtin_tracks.py": "52cb4a285a6079cec7f7610de8af80570f1644a02cf9979e47d2d49736e24cb5",
34
  "builtin_tracks/catalog.json": "4a7bba4385713e985d1427a0da35dcc32d5ecfd73d93cad7520563deb8685670",
35
  "builtin_tracks/tracks/Replica A01 Beginner.track": "ca5749537450430794e2eade2e0ac72fa141a4f225e13e2f8ef842abb948ff15",
36
  "builtin_tracks/tracks/Replica A02 Sharp Turns.track": "097f1ea8edf041112b690d0638075630716ddc03c7d0b1980ddcbeaf5071c8d4",
@@ -60,6 +59,7 @@
60
  "builtin_tracks/tracks/Replica R08 Demolition Derby.track": "6f11a9ffbcb477c9d19964566b1b612d2a94675605246e93e21f27bbbdb357ef",
61
  "builtin_tracks/tracks/Replica R09 Eau Noir.track": "3ec0a78478cca1a4f0d2d98ac81f40783928adf271b70f0c32d295a6da2cdaa9",
62
  "builtin_tracks/tracks/Replica The Champions Trial.track": "a3bfb76422affc774b44c739b0636d08acb901fa7615b9adcb52c069f79834e1",
 
63
  "client.js": "cbb1dd26a8fe4256abf827903df94749dc8e4f99912d29dba7f74ba6e477b851",
64
  "delivery.py": "6bdba2e87c3e19a41440cb16103695af27105f8bafbae38948bbb1b936ed0c1b",
65
  "gpu_tickets.py": "20928fcf1ca24648809ad8712c929377bdcc8b5e6b4387bfff3503ec5711928b",
@@ -69,9 +69,14 @@
69
  "index.html": "7bdaf7ca11a455525c22432298e120ca2fa5257283b9815467e005e09da07a26",
70
  "native/analysis.patch": "42f79de67cb0734cffb2a7582f5479cab42ab82675884b8b42b9f158d46a98e8",
71
  "native/build-receipt.json": "559a7e4e382f9f7caa1c5ceb566a5a0bbefad2ed3a2e2cf604e31c9c3890c348",
 
 
 
 
72
  "native/selective-freeze-build-receipt.json": "ed804b1cd49a9ba34abc6f7cadaf4fb97807e27f3d14af117f8292a2d3f2d172",
73
  "native/selective-freeze-source.tar.gz": "297d2ce34569994acd2a477e64c5315cb2081699b4333b8abdabb3ff7451d8db",
74
  "native/source-receipt.json": "36feba861501baf8672884476bbeed5e375254cbb4feffb9f4f90aa61a415a93",
 
75
  "portable_bundle.py": "58df5b87956745ea909c41c4b12a23cf9ab8c40a7df47d1529f47ae4de9bf51f",
76
  "requirements.txt": "fc7e0703ad2289fd3926a36efbdce8c61f0edc00f7575a87e2b565e46588c5a4",
77
  "server.py": "1f82c9046324661d7bd4acf1cf37eef3445f985351159d88acdcaf89d1edf859",
@@ -89,5 +94,6 @@
89
  "worker.py": "d18053363baf8147425808e9fd939f44f00af23781662d353196ade974144974"
90
  },
91
  "interface": "single-engine-runner-with-map-winners-analysis-v1",
92
- "upstream_revision": "b90b8af06ffc4ea4e4fd703becd1107a48b8e5e0"
 
93
  }
 
3
  "files": {
4
  ".gitattributes": "3aa7a5a6b603279d7a0826d015985988192b67e3cedb38a59785ef43c04fc77b",
5
  "BETA_TESTING.md": "829dae67ec37dac2a4e7b178ab5ee4fc5f63896af132fbff457a5e35141fe94d",
6
+ "BINARY_PROVENANCE.json": "99c24677a039993b6100ce24551a01753c0187980f6c9c54be865b3dc7a65d00",
7
  "BUCKET_BUNDLE.md": "cb7a0f023d5a1f93f0288c6a5646b64f8f3e9d36150c0730aea94590e5b80260",
8
  "CUDA_REFERENCE.md": "f7453c3254d244f8b0de41fde5851cb025159f5cea4a4d1a5d8208a955550c6c",
9
  "DATA_POLICY.md": "fc5978528abe1c21c14882417ac8a706e04a0831bbd3fdb3de8c64442c1a7b3d",
 
22
  "app_release.py": "7482559c667a665fd3cb6aa8af6c78422a822b515e14589db8306f7fd4860a8b",
23
  "assets/formula_template.json": "80f745df82bb7be45af52785fd582460bcddc63c5a4e1d8375d85b3122db4c6b",
24
  "assets/rally_template.json": "7350a3fe28d9b4da7a0965ae6ea7ca3472fb7885303e342310d63a0dce80851c",
25
+ "assets/snowmobile_template.json": "8232f4d54829445c44de9292e12557bfe66b3d43e0363e07d2ae0b4118721c08",
26
  "assets/track-atlas.json": "d97c8900e3e5fb17734b5bd61d1f4f4b196d9be30af9848e2e273ae7e4079ae4",
27
  "assets/truck_template.json": "a83bffea4d5e818c135ab3aba68a47aa288d6ad0e7b8bd9c95ed0dea9e9df2f7",
28
+ "bin/altd-sim": "792139f30bcfecf25f2d78595d2611234d30b0a254b5ece0ec587f1d27a80df2",
29
  "bin/extract_saved_track": "3a7733c45b4301a786fcbfe92660a1c484749272da5f608d62f34878bd4ff31a",
30
+ "bin/libaltd_gpu.so": "e5e9a61d863bc3b429af69a13cd8d50f63cad8984b3e6a9001ae342fc5981e05",
31
  "bucket_storage.py": "f6132ba5f95d106a667742ec092f2799de00e4baf1bf33600da4f0daaa46012a",
32
  "build_info.py": "2a57f73abd9e062cf029b65b09b26b8d12e301bac2f7efec7edb4b85b47671c3",
 
33
  "builtin_tracks/catalog.json": "4a7bba4385713e985d1427a0da35dcc32d5ecfd73d93cad7520563deb8685670",
34
  "builtin_tracks/tracks/Replica A01 Beginner.track": "ca5749537450430794e2eade2e0ac72fa141a4f225e13e2f8ef842abb948ff15",
35
  "builtin_tracks/tracks/Replica A02 Sharp Turns.track": "097f1ea8edf041112b690d0638075630716ddc03c7d0b1980ddcbeaf5071c8d4",
 
59
  "builtin_tracks/tracks/Replica R08 Demolition Derby.track": "6f11a9ffbcb477c9d19964566b1b612d2a94675605246e93e21f27bbbdb357ef",
60
  "builtin_tracks/tracks/Replica R09 Eau Noir.track": "3ec0a78478cca1a4f0d2d98ac81f40783928adf271b70f0c32d295a6da2cdaa9",
61
  "builtin_tracks/tracks/Replica The Champions Trial.track": "a3bfb76422affc774b44c739b0636d08acb901fa7615b9adcb52c069f79834e1",
62
+ "builtin_tracks.py": "52cb4a285a6079cec7f7610de8af80570f1644a02cf9979e47d2d49736e24cb5",
63
  "client.js": "cbb1dd26a8fe4256abf827903df94749dc8e4f99912d29dba7f74ba6e477b851",
64
  "delivery.py": "6bdba2e87c3e19a41440cb16103695af27105f8bafbae38948bbb1b936ed0c1b",
65
  "gpu_tickets.py": "20928fcf1ca24648809ad8712c929377bdcc8b5e6b4387bfff3503ec5711928b",
 
69
  "index.html": "7bdaf7ca11a455525c22432298e120ca2fa5257283b9815467e005e09da07a26",
70
  "native/analysis.patch": "42f79de67cb0734cffb2a7582f5479cab42ab82675884b8b42b9f158d46a98e8",
71
  "native/build-receipt.json": "559a7e4e382f9f7caa1c5ceb566a5a0bbefad2ed3a2e2cf604e31c9c3890c348",
72
+ "native/physics-parity.json": "006cc6b455e8f49af395ed60f3c5c88dbb2865ee6cad51d8cfdae040293d9f9e",
73
+ "native/physics-source-identities.json": "e3414e24144d517f4a0309e1f9d0dbab8309b4c0b70bd61ccb2c0f40b8f14998",
74
+ "native/physics-source.tar.gz": "6abefb234de18dee58d69758c6cc8900f259993663ac37f90ce39aa114a30718",
75
+ "native/physics.patch": "bae8eeb9342cad1e52ad77dc8026b8bd2ff510a1b836165fc753c043a04859b3",
76
  "native/selective-freeze-build-receipt.json": "ed804b1cd49a9ba34abc6f7cadaf4fb97807e27f3d14af117f8292a2d3f2d172",
77
  "native/selective-freeze-source.tar.gz": "297d2ce34569994acd2a477e64c5315cb2081699b4333b8abdabb3ff7451d8db",
78
  "native/source-receipt.json": "36feba861501baf8672884476bbeed5e375254cbb4feffb9f4f90aa61a415a93",
79
+ "native/upstream-v1.3.patch": "a9810c9abd40ddcbac5fcf6914320d5fc04fcde23849df9437ec293c83be15ed",
80
  "portable_bundle.py": "58df5b87956745ea909c41c4b12a23cf9ab8c40a7df47d1529f47ae4de9bf51f",
81
  "requirements.txt": "fc7e0703ad2289fd3926a36efbdce8c61f0edc00f7575a87e2b565e46588c5a4",
82
  "server.py": "1f82c9046324661d7bd4acf1cf37eef3445f985351159d88acdcaf89d1edf859",
 
94
  "worker.py": "d18053363baf8147425808e9fd939f44f00af23781662d353196ade974144974"
95
  },
96
  "interface": "single-engine-runner-with-map-winners-analysis-v1",
97
+ "upstream_revision": "b90b8af06ffc4ea4e4fd703becd1107a48b8e5e0",
98
+ "physics_revision": "20261017-v1.3-candidate"
99
  }
assets/snowmobile_template.json CHANGED
@@ -98,6 +98,10 @@
98
  "brake_power": 1.5,
99
  "handbrake_power": 0
100
  }
 
 
 
 
101
  ]
102
  },
103
  "physics": {
 
98
  "brake_power": 1.5,
99
  "handbrake_power": 0
100
  }
101
+ ],
102
+ "center_of_mass": [
103
+ -0.00011444099800428376,
104
+ 0.49998602271080017
105
  ]
106
  },
107
  "physics": {
bin/altd-sim CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ce31f754f6b6f3afaf4dcc44c1e6fda3e6414eb2924fa167b8778523bcaf2070
3
- size 3647808
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:792139f30bcfecf25f2d78595d2611234d30b0a254b5ece0ec587f1d27a80df2
3
+ size 3646480
bin/libaltd_gpu.so CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3b1b88bccc06a21acc33ac4400af016d55a7e3d8727136a0c43b541f3c7887ca
3
- size 4711704
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5e9a61d863bc3b429af69a13cd8d50f63cad8984b3e6a9001ae342fc5981e05
3
+ size 4707512
native/physics-parity.json ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cases": 57,
3
+ "passed": 57,
4
+ "library_sha256": "e5e9a61d863bc3b429af69a13cd8d50f63cad8984b3e6a9001ae342fc5981e05",
5
+ "results": [
6
+ {
7
+ "case": "B01-formula-straight",
8
+ "passed": true,
9
+ "differences": []
10
+ },
11
+ {
12
+ "case": "B01-formula-turn",
13
+ "passed": true,
14
+ "differences": []
15
+ },
16
+ {
17
+ "case": "B01-formula-turn-brake",
18
+ "passed": true,
19
+ "differences": []
20
+ },
21
+ {
22
+ "case": "B01-formula-turn-boost",
23
+ "passed": true,
24
+ "differences": []
25
+ },
26
+ {
27
+ "case": "B01-formula-turn-handbrake",
28
+ "passed": true,
29
+ "differences": []
30
+ },
31
+ {
32
+ "case": "B01-rally-straight",
33
+ "passed": true,
34
+ "differences": []
35
+ },
36
+ {
37
+ "case": "B01-rally-turn",
38
+ "passed": true,
39
+ "differences": []
40
+ },
41
+ {
42
+ "case": "B01-rally-turn-brake",
43
+ "passed": true,
44
+ "differences": []
45
+ },
46
+ {
47
+ "case": "B01-rally-turn-boost",
48
+ "passed": true,
49
+ "differences": []
50
+ },
51
+ {
52
+ "case": "B01-rally-turn-handbrake",
53
+ "passed": true,
54
+ "differences": []
55
+ },
56
+ {
57
+ "case": "B01-truck-straight",
58
+ "passed": true,
59
+ "differences": []
60
+ },
61
+ {
62
+ "case": "B01-truck-turn",
63
+ "passed": true,
64
+ "differences": []
65
+ },
66
+ {
67
+ "case": "B01-truck-turn-brake",
68
+ "passed": true,
69
+ "differences": []
70
+ },
71
+ {
72
+ "case": "B01-truck-turn-boost",
73
+ "passed": true,
74
+ "differences": []
75
+ },
76
+ {
77
+ "case": "B01-truck-turn-handbrake",
78
+ "passed": true,
79
+ "differences": []
80
+ },
81
+ {
82
+ "case": "B01-snowmobile-straight",
83
+ "passed": true,
84
+ "differences": []
85
+ },
86
+ {
87
+ "case": "B01-snowmobile-turn",
88
+ "passed": true,
89
+ "differences": []
90
+ },
91
+ {
92
+ "case": "B01-snowmobile-turn-brake",
93
+ "passed": true,
94
+ "differences": []
95
+ },
96
+ {
97
+ "case": "B01-snowmobile-turn-boost",
98
+ "passed": true,
99
+ "differences": []
100
+ },
101
+ {
102
+ "case": "A04-formula-straight",
103
+ "passed": true,
104
+ "differences": []
105
+ },
106
+ {
107
+ "case": "A04-formula-turn",
108
+ "passed": true,
109
+ "differences": []
110
+ },
111
+ {
112
+ "case": "A04-formula-turn-brake",
113
+ "passed": true,
114
+ "differences": []
115
+ },
116
+ {
117
+ "case": "A04-formula-turn-boost",
118
+ "passed": true,
119
+ "differences": []
120
+ },
121
+ {
122
+ "case": "A04-formula-turn-handbrake",
123
+ "passed": true,
124
+ "differences": []
125
+ },
126
+ {
127
+ "case": "A04-rally-straight",
128
+ "passed": true,
129
+ "differences": []
130
+ },
131
+ {
132
+ "case": "A04-rally-turn",
133
+ "passed": true,
134
+ "differences": []
135
+ },
136
+ {
137
+ "case": "A04-rally-turn-brake",
138
+ "passed": true,
139
+ "differences": []
140
+ },
141
+ {
142
+ "case": "A04-rally-turn-boost",
143
+ "passed": true,
144
+ "differences": []
145
+ },
146
+ {
147
+ "case": "A04-rally-turn-handbrake",
148
+ "passed": true,
149
+ "differences": []
150
+ },
151
+ {
152
+ "case": "A04-truck-straight",
153
+ "passed": true,
154
+ "differences": []
155
+ },
156
+ {
157
+ "case": "A04-truck-turn",
158
+ "passed": true,
159
+ "differences": []
160
+ },
161
+ {
162
+ "case": "A04-truck-turn-brake",
163
+ "passed": true,
164
+ "differences": []
165
+ },
166
+ {
167
+ "case": "A04-truck-turn-boost",
168
+ "passed": true,
169
+ "differences": []
170
+ },
171
+ {
172
+ "case": "A04-truck-turn-handbrake",
173
+ "passed": true,
174
+ "differences": []
175
+ },
176
+ {
177
+ "case": "A04-snowmobile-straight",
178
+ "passed": true,
179
+ "differences": []
180
+ },
181
+ {
182
+ "case": "A04-snowmobile-turn",
183
+ "passed": true,
184
+ "differences": []
185
+ },
186
+ {
187
+ "case": "A04-snowmobile-turn-brake",
188
+ "passed": true,
189
+ "differences": []
190
+ },
191
+ {
192
+ "case": "A04-snowmobile-turn-boost",
193
+ "passed": true,
194
+ "differences": []
195
+ },
196
+ {
197
+ "case": "A06-formula-straight",
198
+ "passed": true,
199
+ "differences": []
200
+ },
201
+ {
202
+ "case": "A06-formula-turn",
203
+ "passed": true,
204
+ "differences": []
205
+ },
206
+ {
207
+ "case": "A06-formula-turn-brake",
208
+ "passed": true,
209
+ "differences": []
210
+ },
211
+ {
212
+ "case": "A06-formula-turn-boost",
213
+ "passed": true,
214
+ "differences": []
215
+ },
216
+ {
217
+ "case": "A06-formula-turn-handbrake",
218
+ "passed": true,
219
+ "differences": []
220
+ },
221
+ {
222
+ "case": "A06-rally-straight",
223
+ "passed": true,
224
+ "differences": []
225
+ },
226
+ {
227
+ "case": "A06-rally-turn",
228
+ "passed": true,
229
+ "differences": []
230
+ },
231
+ {
232
+ "case": "A06-rally-turn-brake",
233
+ "passed": true,
234
+ "differences": []
235
+ },
236
+ {
237
+ "case": "A06-rally-turn-boost",
238
+ "passed": true,
239
+ "differences": []
240
+ },
241
+ {
242
+ "case": "A06-rally-turn-handbrake",
243
+ "passed": true,
244
+ "differences": []
245
+ },
246
+ {
247
+ "case": "A06-truck-straight",
248
+ "passed": true,
249
+ "differences": []
250
+ },
251
+ {
252
+ "case": "A06-truck-turn",
253
+ "passed": true,
254
+ "differences": []
255
+ },
256
+ {
257
+ "case": "A06-truck-turn-brake",
258
+ "passed": true,
259
+ "differences": []
260
+ },
261
+ {
262
+ "case": "A06-truck-turn-boost",
263
+ "passed": true,
264
+ "differences": []
265
+ },
266
+ {
267
+ "case": "A06-truck-turn-handbrake",
268
+ "passed": true,
269
+ "differences": []
270
+ },
271
+ {
272
+ "case": "A06-snowmobile-straight",
273
+ "passed": true,
274
+ "differences": []
275
+ },
276
+ {
277
+ "case": "A06-snowmobile-turn",
278
+ "passed": true,
279
+ "differences": []
280
+ },
281
+ {
282
+ "case": "A06-snowmobile-turn-brake",
283
+ "passed": true,
284
+ "differences": []
285
+ },
286
+ {
287
+ "case": "A06-snowmobile-turn-boost",
288
+ "passed": true,
289
+ "differences": []
290
+ }
291
+ ]
292
+ }
native/physics-source-identities.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "local/Cargo.toml": {
3
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/web-dashboard/reviews/native-upstream-20261014/Cargo.toml",
4
+ "sha256": "f9bf44c197883bc105a7d9ac4248c8d9ef450fa99b6b6d04924f7612aaff8875"
5
+ },
6
+ "local/Cargo.lock": {
7
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/web-dashboard/reviews/native-upstream-20261014/Cargo.lock",
8
+ "sha256": "3486e24f81b254c6e9d7fdbb2be8d645df69340b96f2401b6d4d8dcd9fa3ba85"
9
+ },
10
+ "local/src/physics/collision.rs": {
11
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/web-dashboard/reviews/native-upstream-20261014/src/physics/collision.rs",
12
+ "sha256": "c5226d6e10637725fa374b184e258a89932c239186f88ae69f4815a538ff4b82"
13
+ },
14
+ "local/gpu/sim/step.h": {
15
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/web-dashboard/reviews/native-upstream-20261014/gpu/sim/step.h",
16
+ "sha256": "9cd8847b53ad289dfc94288db7630537a5b5c4abf6a0a7561bf2430dcaacd1d0"
17
+ },
18
+ "local/gpu/sim/altd_gpu.hip": {
19
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/web-dashboard/reviews/native-upstream-20261014/gpu/sim/altd_gpu.hip",
20
+ "sha256": "cd4e95792ab5f70ec1a698fc327576abac4e9b19322fc37136f48099d56e0055"
21
+ },
22
+ "local/examples/parity_controls.rs": {
23
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/web-dashboard/reviews/native-upstream-20261014/examples/parity_controls.rs",
24
+ "sha256": "28e23df53c9db9e636893eb1dd1bb400f1344d68b100880c222e5a75bd561332"
25
+ },
26
+ "hf/Cargo.toml": {
27
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/hf-winners-evaluation-v1.2-20261013/build/source/Cargo.toml",
28
+ "sha256": "f9bf44c197883bc105a7d9ac4248c8d9ef450fa99b6b6d04924f7612aaff8875"
29
+ },
30
+ "hf/Cargo.lock": {
31
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/hf-winners-evaluation-v1.2-20261013/build/source/Cargo.lock",
32
+ "sha256": "3486e24f81b254c6e9d7fdbb2be8d645df69340b96f2401b6d4d8dcd9fa3ba85"
33
+ },
34
+ "hf/src/physics/collision.rs": {
35
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/hf-winners-evaluation-v1.2-20261013/build/source/src/physics/collision.rs",
36
+ "sha256": "443b9700229f6973e2d22163f8ef31c90aefe674a21ec0a3fd5bd91186cb4c14"
37
+ },
38
+ "hf/gpu/sim/step.h": {
39
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/hf-winners-evaluation-v1.2-20261013/build/source/gpu/sim/step.h",
40
+ "sha256": "dfbe41cc3891e94ba7ea15d5277661431fd78be08ee16dc2b300c79571ccf6ee"
41
+ },
42
+ "hf/gpu/sim/altd_gpu.hip": {
43
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/hf-winners-evaluation-v1.2-20261013/build/source/gpu/sim/altd_gpu.hip",
44
+ "sha256": "ce7a97e0b2f43df6f3b9d1cb70e284a8242a7386088ba0a72ef0b4bbe32a42ae"
45
+ },
46
+ "hf/examples/parity_controls.rs": {
47
+ "path": "/Volumes/PATRIOT/ALD-TAO-lab/hf-winners-evaluation-v1.2-20261013/build/source/examples/parity_controls.rs",
48
+ "sha256": "28e23df53c9db9e636893eb1dd1bb400f1344d68b100880c222e5a75bd561332"
49
+ }
50
+ }
native/physics-source.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6abefb234de18dee58d69758c6cc8900f259993663ac37f90ce39aa114a30718
3
+ size 917770
native/physics.patch ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/src/physics/collision.rs
2
+ +++ b/src/physics/collision.rs
3
+ @@ -329,6 +329,7 @@
4
+ contacts: &mut Vec<Contact>,
5
+ ) {
6
+ contacts.clear();
7
+ + scratch.collided_shapes.clear();
8
+ let (sx, sy) = cfg.shape_basis;
9
+ let basis_x = V2::from(body_basis.0 * sx.x + body_basis.1 * sx.y);
10
+ let basis_y = V2::from(body_basis.0 * sy.x + body_basis.1 * sy.y);
11
+ @@ -483,6 +484,8 @@
12
+ if separated || push == V2::ZERO {
13
+ continue;
14
+ }
15
+ + // SAT overlap keeps cached contacts eligible even without a new contact.
16
+ + scratch.collided_shapes.push(shape_index);
17
+ let support_car = rectangle_supports(&car, -push, basis_x, basis_y);
18
+ let support_wall = polygon_supports(wall, shape, push);
19
+ let mut pairs = [(V2::ZERO, V2::ZERO); 2];
20
+ @@ -601,11 +604,7 @@
21
+ }
22
+ find_contacts_with_basis(cfg, track, position, rotation, body_basis, scratch, contacts);
23
+ previous.retain(|c| scratch.broad_pairs.contains(&c.shape_index));
24
+ - scratch.collided_shapes.clear();
25
+ for new in contacts.iter() {
26
+ - if !scratch.collided_shapes.contains(&new.shape_index) {
27
+ - scratch.collided_shapes.push(new.shape_index);
28
+ - }
29
+ let radius2 = (cfg.contact_recycle_radius as f32).powi(2);
30
+ if let Some(old) = previous.iter_mut().find(|old| {
31
+ let a = F2::from(old.local_point) - F2::from(new.local_point);
32
+ --- a/gpu/sim/step.h
33
+ +++ b/gpu/sim/step.h
34
+ @@ -471,7 +471,8 @@
35
+ }
36
+
37
+ // The rest of `solve_wall_contacts` once this tick's contacts are merged;
38
+ -// `made_contacts` has a bit per broad pair that made contacts.
39
+ +// `made_contacts` has a bit per SAT-overlapping broad pair, including
40
+ +// overlaps with no new points but a valid retained contact.
41
+ __device__ inline SolveResult solve_contacts(const World& w, const VehicleDesc& v, Car& car, uint32_t made_contacts, Vec2 velocity,
42
+ float angular, Vec2 initial_velocity, float initial_angular) {
43
+ STEP_MARK(ts);
44
+ @@ -682,12 +683,13 @@
45
+ f = car_frame(v, car);
46
+ framed = true;
47
+ }
48
+ - uint32_t made = pair_contacts(w, v, car, f, ci, push, [&](const Contact& c) {
49
+ + pair_contacts(w, v, car, f, ci, push, [&](const Contact& c) {
50
+ STEP_MARK(tm);
51
+ merge_contact(v, car, c);
52
+ STEP_SECTION(11, tm);
53
+ });
54
+ - made_contacts |= made ? 1u << ci : 0u;
55
+ + // Keep cached contacts eligible when SAT overlaps but produces no new point.
56
+ + made_contacts |= 1u << ci;
57
+ }
58
+ STEP_SECTION(2, tc);
59
+ SolveResult r = solve_contacts(w, v, car, made_contacts, k.velocity, k.angular, k.previous_velocity, k.previous_angular);
native/upstream-v1.3.patch ADDED
@@ -0,0 +1,466 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
2
+ index 2c0e811..a7540f4 100644
3
+ --- a/.github/workflows/release.yml
4
+ +++ b/.github/workflows/release.yml
5
+ @@ -30,6 +30,8 @@ concurrency:
6
+ env:
7
+ CARGO_TERM_COLOR: always
8
+ CARGO_INCREMENTAL: 0
9
+ + # Turing, Ampere, Ada and Blackwell consumer GPUs, as in ci.yml; newer GPUs JIT the sm_120 PTX.
10
+ + CUDA_ARCH: sm_75,sm_86,sm_89,sm_120
11
+
12
+ jobs:
13
+ version:
14
+ @@ -75,7 +77,9 @@ jobs:
15
+ echo "publish=$publish" >> "$GITHUB_OUTPUT"
16
+ echo "Building $version (publish: $publish)" >> "$GITHUB_STEP_SUMMARY"
17
+
18
+ - gpu-library:
19
+ + # Each GPU library job uploads gpu-<system>-<vendor>, which the package job
20
+ + # puts beside the binary in the matching altd-sim-*-<vendor> archive.
21
+ + gpu-linux-amd:
22
+ runs-on: ubuntu-latest
23
+ timeout-minutes: 30
24
+ container: rocm/dev-ubuntu-24.04:7.1.1
25
+ @@ -91,13 +95,117 @@ jobs:
26
+ sort gpu/release-targets | diff -u - embedded
27
+ - uses: actions/upload-artifact@v4
28
+ with:
29
+ - name: gpu-library
30
+ + name: gpu-linux-amd
31
+ path: dist/libaltd_gpu.so
32
+ if-no-files-found: error
33
+
34
+ + gpu-linux-nvidia:
35
+ + runs-on: ubuntu-latest
36
+ + timeout-minutes: 30
37
+ + # Keep the CUDA version in step with ci.yml. Ubuntu 22.04 matches the
38
+ + # package job, so the library needs no newer glibc than the binary.
39
+ + container: nvidia/cuda:13.4.2-devel-ubuntu22.04
40
+ + steps:
41
+ + - name: Install the tools the CUDA image lacks
42
+ + run: apt-get update && apt-get install -y --no-install-recommends python3
43
+ + - uses: actions/checkout@v4
44
+ + - name: Build for every consumer GPU target
45
+ + run: OUT=dist gpu/build-cuda.sh
46
+ + - uses: actions/upload-artifact@v4
47
+ + with:
48
+ + name: gpu-linux-nvidia
49
+ + path: dist/libaltd_gpu.so
50
+ + if-no-files-found: error
51
+ +
52
+ + gpu-windows-amd:
53
+ + # The HIP SDK 7.1 clang headers clash with the MSVC 14.5x <cmath> of Visual
54
+ + # Studio 2026 (windows-latest): its isgreater and friends are already
55
+ + # __host__ __device__. Visual Studio 2022 builds.
56
+ + runs-on: windows-2022
57
+ + timeout-minutes: 60
58
+ + env:
59
+ + RUSTFLAGS: -C target-cpu=x86-64
60
+ + HIP_SDK: C:\hip-sdk
61
+ + steps:
62
+ + - run: git config --global core.autocrlf false
63
+ + - uses: actions/checkout@v4
64
+ + - name: Install the HIP SDK
65
+ + # HIP SDK for Windows 7.1.1, in step with the ROCm 7.1.1 Linux builds. The
66
+ + # bundle also installs a driver, so only its SDK core package is installed.
67
+ + run: |
68
+ + $installer = Join-Path $env:RUNNER_TEMP "hip-sdk.exe"
69
+ + curl.exe -fsSL -o $installer https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-26.Q1-Win11-For-HIP.exe
70
+ + if ($LASTEXITCODE -ne 0) { throw "cannot download the HIP SDK" }
71
+ + $unpacked = Join-Path $env:RUNNER_TEMP "hip-sdk"
72
+ + 7z x $installer "-o$unpacked" | Out-Null
73
+ + if ($LASTEXITCODE -ne 0) { throw "cannot unpack the HIP SDK" }
74
+ + $msi = Get-ChildItem $unpacked -Recurse -Filter ROCm_SDK_Core.msi | Select-Object -First 1
75
+ + if (-not $msi) { throw "the HIP SDK bundle has no ROCm_SDK_Core.msi" }
76
+ + $log = Join-Path $env:RUNNER_TEMP "hip-sdk.log"
77
+ + $install = Start-Process msiexec -Wait -PassThru -ArgumentList "/i", "`"$($msi.FullName)`"", "INSTALLDIR=$env:HIP_SDK", "/qn", "/norestart", "/l*v", "`"$log`""
78
+ + if ($install.ExitCode -ne 0) { Get-Content $log -Tail 50; throw "HIP SDK install failed with $($install.ExitCode)" }
79
+ + $hipcc = Get-ChildItem $env:HIP_SDK -Recurse -Filter hipcc.exe | Select-Object -First 1
80
+ + if (-not $hipcc) { throw "no hipcc.exe under $env:HIP_SDK" }
81
+ + & $hipcc.FullName --version
82
+ + "HIP_PATH=$(Split-Path $hipcc.DirectoryName)" >> $env:GITHUB_ENV
83
+ + # gpu-info below loads the HIP runtime (amdhip64_7.dll) from here.
84
+ + $hipcc.DirectoryName >> $env:GITHUB_PATH
85
+ + - name: Build for every consumer GPU target
86
+ + run: ./gpu/build.ps1 -Out dist -Arch (Get-Content gpu/release-targets -Raw)
87
+ + - uses: dtolnay/rust-toolchain@1.94.0
88
+ + - uses: Swatinem/rust-cache@v2
89
+ + with:
90
+ + key: gpu-windows-x86-64
91
+ + - name: Check the library against the Rust layouts
92
+ + # No GPU is needed: gpu-info checks the device struct layouts and the exports on the host.
93
+ + run: cargo run --locked --bin altd-sim -- gpu-info --library dist/altd_gpu.dll
94
+ + - uses: actions/upload-artifact@v4
95
+ + with:
96
+ + name: gpu-windows-amd
97
+ + path: dist/altd_gpu.dll
98
+ + if-no-files-found: error
99
+ +
100
+ + gpu-windows-nvidia:
101
+ + runs-on: windows-latest
102
+ + timeout-minutes: 30
103
+ + env:
104
+ + CUDA_VERSION: 13.4.2
105
+ + steps:
106
+ + - run: git config --global core.autocrlf false
107
+ + - uses: actions/checkout@v4
108
+ + - name: Install the CUDA compiler
109
+ + # Only the redistributable parts nvcc needs, not the whole toolkit installer.
110
+ + run: |
111
+ + $base = "https://developer.download.nvidia.com/compute/cuda/redist"
112
+ + $manifest = Invoke-RestMethod "$base/redistrib_$env:CUDA_VERSION.json"
113
+ + $parts = Join-Path $env:RUNNER_TEMP "cuda-parts"
114
+ + $cuda = Join-Path $env:RUNNER_TEMP "cuda"
115
+ + foreach ($name in "cuda_nvcc", "cuda_crt", "cuda_cudart", "libnvvm", "cccl") {
116
+ + $zip = Join-Path $env:RUNNER_TEMP "$name.zip"
117
+ + curl.exe -fsSL -o $zip "$base/$($manifest.$name.'windows-x86_64'.relative_path)"
118
+ + if ($LASTEXITCODE -ne 0) { throw "cannot download $name" }
119
+ + 7z x $zip "-o$parts" | Out-Null
120
+ + if ($LASTEXITCODE -ne 0) { throw "cannot unpack $name" }
121
+ + }
122
+ + # Each archive unpacks into its own directory; merge them into one toolkit.
123
+ + foreach ($dir in Get-ChildItem $parts -Directory) {
124
+ + robocopy $dir.FullName $cuda /E /NFL /NDL /NJH /NJS /NP | Out-Null
125
+ + if ($LASTEXITCODE -ge 8) { throw "cannot merge $($dir.Name)" }
126
+ + }
127
+ + "CUDA_PATH=$cuda" >> $env:GITHUB_ENV
128
+ + "$cuda\bin" >> $env:GITHUB_PATH
129
+ + & "$cuda\bin\nvcc.exe" --version
130
+ + - name: Build for every consumer GPU target
131
+ + run: ./gpu/build-cuda.ps1 -Out dist
132
+ + - uses: actions/upload-artifact@v4
133
+ + with:
134
+ + name: gpu-windows-nvidia
135
+ + path: dist/altd_gpu.dll
136
+ + if-no-files-found: error
137
+ +
138
+ package:
139
+ name: package (${{ matrix.target }})
140
+ - needs: [version, gpu-library]
141
+ + needs: [version, gpu-linux-amd, gpu-linux-nvidia, gpu-windows-amd, gpu-windows-nvidia]
142
+ runs-on: ${{ matrix.os }}
143
+ timeout-minutes: 45
144
+ strategy:
145
+ @@ -108,18 +216,29 @@ jobs:
146
+ - os: ubuntu-22.04
147
+ target: x86_64-unknown-linux-gnu
148
+ rustflags: -C target-cpu=x86-64
149
+ - gpu: true
150
+ + system: linux
151
+ + library: libaltd_gpu.so
152
+ + variants: cpu amd nvidia
153
+ - os: windows-latest
154
+ target: x86_64-pc-windows-msvc
155
+ rustflags: -C target-cpu=x86-64
156
+ exe: .exe
157
+ + system: windows
158
+ + library: altd_gpu.dll
159
+ + variants: cpu amd nvidia
160
+ - os: macos-latest
161
+ target: aarch64-apple-darwin
162
+ + system: macos
163
+ + variants: cpu
164
+ env:
165
+ # Overrides target-cpu=native from .cargo/config.toml on x86 hosts.
166
+ RUSTFLAGS: ${{ matrix.rustflags }}
167
+ ALTD_BUILD_VERSION: ${{ needs.version.outputs.version }}
168
+ + # Each variant becomes the archive $PACKAGE-<variant>: cpu has no GPU
169
+ + # library, amd and nvidia carry that vendor's library beside the binary.
170
+ PACKAGE: altd-sim-${{ needs.version.outputs.label }}-${{ matrix.target }}
171
+ + VARIANTS: ${{ matrix.variants }}
172
+ + LIBRARY: ${{ matrix.library }}
173
+ defaults:
174
+ run:
175
+ shell: bash
176
+ @@ -134,48 +253,72 @@ jobs:
177
+ with:
178
+ key: release-${{ matrix.target }}
179
+ - run: cargo build --locked --release --bin altd-sim --target ${{ matrix.target }}
180
+ - - name: Assemble the package
181
+ - run: |
182
+ - mkdir -p "dist/$PACKAGE"
183
+ - cp "target/${{ matrix.target }}/release/altd-sim${{ matrix.exe }}" README.md LICENSE GODOT_LICENSE "dist/$PACKAGE/"
184
+ - cp -R assets docs "dist/$PACKAGE/"
185
+ - mkdir -p "dist/$PACKAGE/math"
186
+ - cp math/README.md "dist/$PACKAGE/math/"
187
+ - - if: matrix.gpu
188
+ + - if: matrix.library
189
+ uses: actions/download-artifact@v4
190
+ with:
191
+ - name: gpu-library
192
+ - path: dist/${{ env.PACKAGE }}
193
+ + pattern: gpu-${{ matrix.system }}-*
194
+ + path: gpu-libraries
195
+ + - name: Assemble the packages
196
+ + run: |
197
+ + for variant in $VARIANTS; do
198
+ + name="$PACKAGE-$variant"
199
+ + mkdir -p "dist/$name/math"
200
+ + cp "target/${{ matrix.target }}/release/altd-sim${{ matrix.exe }}" README.md LICENSE GODOT_LICENSE "dist/$name/"
201
+ + cp -R assets docs "dist/$name/"
202
+ + cp math/README.md "dist/$name/math/"
203
+ + if [ "$variant" != cpu ]; then
204
+ + cp "gpu-libraries/gpu-${{ matrix.system }}-$variant/$LIBRARY" "dist/$name/"
205
+ + fi
206
+ + done
207
+ - name: Archive
208
+ working-directory: dist
209
+ run: |
210
+ - if [ "$RUNNER_OS" = Windows ]; then
211
+ - 7z a -tzip "$PACKAGE.zip" "$PACKAGE" > /dev/null
212
+ - else
213
+ - tar -czf "$PACKAGE.tar.gz" "$PACKAGE"
214
+ - fi
215
+ - rm -rf "$PACKAGE"
216
+ - - name: Smoke test the unpacked archive
217
+ + for variant in $VARIANTS; do
218
+ + name="$PACKAGE-$variant"
219
+ + if [ "$RUNNER_OS" = Windows ]; then
220
+ + 7z a -tzip "$name.zip" "$name" > /dev/null
221
+ + else
222
+ + tar -czf "$name.tar.gz" "$name"
223
+ + fi
224
+ + rm -rf "$name"
225
+ + done
226
+ + - name: Smoke test the unpacked archives
227
+ run: |
228
+ - mkdir smoke
229
+ - cd smoke
230
+ - if [ "$RUNNER_OS" = Windows ]; then 7z x "../dist/$PACKAGE.zip" > /dev/null; else tar -xzf "../dist/$PACKAGE.tar.gz"; fi
231
+ - cd "$PACKAGE"
232
+ - ./altd-sim --version | tee version.txt
233
+ - grep -qxF "altd-sim $ALTD_BUILD_VERSION" version.txt
234
+ - ./altd-sim --threads 2 train-scratch \
235
+ - --scene assets/scenes/rally_template.json --track-mode random \
236
+ - --random-track-settings assets/random_track_settings.json \
237
+ - --population 16 --generations 1 --ticks 60 --seed 1 --out-dir smoke-run
238
+ - test -s smoke-run/run.json
239
+ - if [ "${{ matrix.gpu }}" = true ]; then
240
+ - # Hosted runners lack ROCm: the packaged library must be found and
241
+ - # its missing HIP runtime reported. gpu-verify loads it with ROCm.
242
+ - if ./altd-sim gpu-info 2> gpu-info.txt; then exit 1; fi
243
+ - cat gpu-info.txt
244
+ - grep -q "$PWD/libaltd_gpu.so" gpu-info.txt
245
+ - grep -q "ROCm 7.x runtime" gpu-info.txt
246
+ - fi
247
+ + for variant in $VARIANTS; do
248
+ + name="$PACKAGE-$variant"
249
+ + mkdir -p "smoke/$variant"
250
+ + cd "smoke/$variant"
251
+ + if [ "$RUNNER_OS" = Windows ]; then 7z x "../../dist/$name.zip" > /dev/null; else tar -xzf "../../dist/$name.tar.gz"; fi
252
+ + cd "$name"
253
+ + ./altd-sim --version | tee version.txt
254
+ + grep -qxF "altd-sim $ALTD_BUILD_VERSION" version.txt
255
+ + ./altd-sim --threads 2 train-scratch \
256
+ + --scene assets/scenes/rally_template.json --track-mode random \
257
+ + --random-track-settings assets/random_track_settings.json \
258
+ + --population 16 --generations 1 --ticks 60 --seed 1 --out-dir smoke-run
259
+ + test -s smoke-run/run.json
260
+ + # The path the binary reports for the library beside it.
261
+ + if [ "$RUNNER_OS" = Windows ]; then library=$(cygpath -w "$PWD/$LIBRARY"); else library="$PWD/$LIBRARY"; fi
262
+ + case "$variant" in
263
+ + amd)
264
+ + # Hosted runners lack the HIP runtime: the packaged library must be
265
+ + # found and fail to load. gpu-verify and gpu-windows-amd load it with HIP.
266
+ + if ./altd-sim gpu-info 2> gpu-info.txt; then exit 1; fi
267
+ + cat gpu-info.txt
268
+ + grep -qF "$library" gpu-info.txt
269
+ + if [ "$RUNNER_OS" = Linux ]; then grep -q "ROCm 7.x runtime" gpu-info.txt; fi
270
+ + ;;
271
+ + nvidia)
272
+ + # The CUDA runtime is linked in and finds no driver, so the library
273
+ + # loads and gpu-info checks its layouts without a GPU.
274
+ + ./altd-sim gpu-info | tee gpu-info.json
275
+ + grep -q '"layout": "ok"' gpu-info.json
276
+ + grep -q '"platform": "CUDA"' gpu-info.json
277
+ + grep -qF "\"${library//\\/\\\\}\"" gpu-info.json
278
+ + ;;
279
+ + esac
280
+ + cd "$GITHUB_WORKSPACE"
281
+ + done
282
+ - uses: actions/upload-artifact@v4
283
+ with:
284
+ name: ${{ env.PACKAGE }}
285
+ @@ -195,8 +338,8 @@ jobs:
286
+ name: ${{ env.PACKAGE }}
287
+ - name: Load the packaged HIP library with the ROCm runtime
288
+ run: |
289
+ - tar -xzf "$PACKAGE.tar.gz"
290
+ - cd "$PACKAGE"
291
+ + tar -xzf "$PACKAGE-amd.tar.gz"
292
+ + cd "$PACKAGE-amd"
293
+ # No GPU is needed: gpu-info checks the device struct layouts on the host.
294
+ ./altd-sim gpu-info | tee gpu-info.json
295
+ grep -q '"layout": "ok"' gpu-info.json
296
+ @@ -242,3 +385,7 @@ jobs:
297
+ gh release create nightly --prerelease --latest=false --verify-tag --title "$title" --notes "$notes"
298
+ fi
299
+ gh release upload nightly dist/* --clobber
300
+ + # Drop assets this build no longer produces, such as renamed archives.
301
+ + gh release view nightly --json assets --jq '.assets[].name' | while read -r asset; do
302
+ + if [ ! -e "dist/$asset" ]; then gh release delete-asset nightly "$asset" --yes; fi
303
+ + done
304
+ diff --git a/Cargo.lock b/Cargo.lock
305
+ index 26d9448..dd79258 100644
306
+ --- a/Cargo.lock
307
+ +++ b/Cargo.lock
308
+ @@ -4,7 +4,7 @@ version = 4
309
+
310
+ [[package]]
311
+ name = "altd_sim"
312
+ -version = "1.2.0"
313
+ +version = "1.3.0"
314
+ dependencies = [
315
+ "clap",
316
+ "console_error_panic_hook",
317
+ diff --git a/Cargo.toml b/Cargo.toml
318
+ index 5d466cd..2fbcad8 100644
319
+ --- a/Cargo.toml
320
+ +++ b/Cargo.toml
321
+ @@ -1,6 +1,6 @@
322
+ [package]
323
+ name = "altd_sim"
324
+ -version = "1.2.0"
325
+ +version = "1.3.0"
326
+ edition = "2021"
327
+ description = "CPU game-fidelity simulator and trainer for AI Learns To Drive"
328
+ license = "MIT"
329
+ diff --git a/README.md b/README.md
330
+ index 9e9cdc3..d8384d3 100644
331
+ --- a/README.md
332
+ +++ b/README.md
333
+ @@ -16,15 +16,19 @@ Download the archive for your system from [Releases](https://github.com/Zorro909
334
+
335
+ | System | Archive | Training on |
336
+ | --- | --- | --- |
337
+ -| Linux x86_64 | `altd-sim-<version>-x86_64-unknown-linux-gnu.tar.gz` | CPU, or AMD GPU through HIP |
338
+ -| Windows x86_64 | `altd-sim-<version>-x86_64-pc-windows-msvc.zip` | CPU |
339
+ -| macOS, Apple silicon | `altd-sim-<version>-aarch64-apple-darwin.tar.gz` | CPU |
340
+ +| Linux x86_64 | `altd-sim-<version>-x86_64-unknown-linux-gnu-cpu.tar.gz` | CPU |
341
+ +| | `altd-sim-<version>-x86_64-unknown-linux-gnu-amd.tar.gz` | CPU, or AMD GPU through HIP |
342
+ +| | `altd-sim-<version>-x86_64-unknown-linux-gnu-nvidia.tar.gz` | CPU, or NVIDIA GPU through CUDA |
343
+ +| Windows x86_64 | `altd-sim-<version>-x86_64-pc-windows-msvc-cpu.zip` | CPU |
344
+ +| | `altd-sim-<version>-x86_64-pc-windows-msvc-amd.zip` | CPU, or AMD GPU through HIP |
345
+ +| | `altd-sim-<version>-x86_64-pc-windows-msvc-nvidia.zip` | CPU, or NVIDIA GPU through CUDA |
346
+ +| macOS, Apple silicon | `altd-sim-<version>-aarch64-apple-darwin-cpu.tar.gz` | CPU |
347
+
348
+ -Unpack it and open a terminal in the unpacked folder:
349
+ +The `amd` and `nvidia` archives add that vendor's GPU library beside the same `altd-sim` binary. Unpack one and open a terminal in the unpacked folder:
350
+
351
+ ```sh
352
+ -tar -xzf altd-sim-nightly-x86_64-unknown-linux-gnu.tar.gz
353
+ -cd altd-sim-nightly-x86_64-unknown-linux-gnu
354
+ +tar -xzf altd-sim-nightly-x86_64-unknown-linux-gnu-cpu.tar.gz
355
+ +cd altd-sim-nightly-x86_64-unknown-linux-gnu-cpu
356
+ ./altd-sim --version
357
+ ```
358
+
359
+ @@ -68,13 +72,13 @@ Each browser connection gets its own session. Only one session at a time can use
360
+
361
+ All builds include all three math profiles. Windows 11 24H2 and newer default to `win11-fma3`; earlier Windows releases use `win10-fma3`; Linux and macOS use `proton`. To train on Linux for a game running on current Windows, for example, pass `--math-profile win11-fma3`. Checkpoints retain their profile. [Math profiles](math/README.md) describes the kernels and captured reference data.
362
+
363
+ -### Training on an AMD GPU
364
+ +### Training on a GPU
365
+
366
+ -The Linux archive contains `libaltd_gpu.so` next to `altd-sim`. It needs a ROCm 7.x runtime and one of the [covered GPU architectures](gpu/README.md). `./altd-sim gpu-info` checks that the library loads and prints `"layout": "ok"`; with a GPU present it also runs one kernel and prints the device, and fails if the library has no code for that GPU; the server's `HIP:` line shows the device or why HIP is unavailable.
367
+ +The `amd` and `nvidia` archives contain the GPU library next to `altd-sim`: `libaltd_gpu.so` on Linux, `altd_gpu.dll` on Windows. AMD libraries need a ROCm 7.x runtime that provides `libamdhip64.so.7` on Linux, or an AMD driver or HIP SDK 7.1 that provides `amdhip64_7.dll` on Windows, and one of the [covered GPU architectures](gpu/README.md). NVIDIA libraries need only an NVIDIA driver that supports CUDA 13 (580 or newer) and a consumer GPU from RTX 20 (Turing) to RTX 50 (Blackwell) or newer; datacenter GPUs such as A100 and H100 need a library built for their target, see the [GPU guide](gpu/README.md#nvidia-cuda). `./altd-sim gpu-info` checks that the library loads and prints `"layout": "ok"`; with a GPU present it also runs one kernel and prints the device, and fails if the library has no code for that GPU; the server's `HIP:` line shows the device or why HIP is unavailable.
368
+
369
+ A HIP session drives its first 12 ticks on both the GPU and the CPU and compares them. If they differ, or the network or track needs something HIP does not support, the session trains on CPU and Drive Lab shows the reason. Native CPU and HIP produce the same results. Browser training can differ from both in the last digits of a few values ([issue #3](https://github.com/Zorro909/driving_sim_rs/issues/3)), so a run moved between the browser and the server can develop differently from then on.
370
+
371
+ -NVIDIA GPUs use the same backend: build the library with `gpu/build-cuda.sh` (Linux) or `gpu/build-cuda.ps1` (Windows) as described in the [GPU guide](gpu/README.md#nvidia-cuda). The release archives do not include it.
372
+ +NVIDIA GPUs use the same backend, so HIP in Drive Lab and the server output also covers CUDA. To build a library yourself, see the [GPU guide](gpu/README.md).
373
+
374
+ ### Troubleshooting
375
+
376
+ @@ -178,6 +182,6 @@ cargo build --offline --target wasm32-unknown-unknown --no-default-features --fe
377
+
378
+ Tests retain self-contained native captures and label generated golden data as current-code regressions. Browser integration checks live in `wasm/test/`; HIP equivalence checks use `gpu_check`. The exhaustive trigonometry scan and hardware-dependent tests are opt-in. See [performance](docs/performance.md), [GPU internals](docs/gpu.md) and [WASM fidelity](docs/wasm.md).
379
+
380
+ -GitHub Actions checks formatting, native and WASM Clippy, native release and debug tests, Windows and macOS Clippy and release tests, the HIP library build and layout, rustdoc, Rust 1.93 compatibility, and WASM packages with CPU browser comparisons. The release workflow builds and smoke-tests the archives, then publishes tags and nightly builds. Its native jobs override `target-cpu=native` with `x86-64` and include the flags in their cache keys, so cached builds can move between runner CPUs. Serial/threaded browser tests retain the documented expanded native differences. HIP equivalence and hardware WebGPU checks run separately because the hosted runners have no GPU.
381
+ +GitHub Actions checks formatting, native and WASM Clippy, native release and debug tests, Windows and macOS Clippy and release tests, the HIP library build and layout, rustdoc, Rust 1.93 compatibility, and WASM packages with CPU browser comparisons. The release workflow builds the AMD and NVIDIA libraries for Linux and Windows, smoke-tests the CPU, AMD and NVIDIA archives, then publishes tags and nightly builds. Its native jobs override `target-cpu=native` with `x86-64` and include the flags in their cache keys, so cached builds can move between runner CPUs. Serial/threaded browser tests retain the documented expanded native differences. HIP equivalence and hardware WebGPU checks run separately because the hosted runners have no GPU.
382
+
383
+ The project uses the [MIT license](LICENSE). Godot-derived code retains the [Godot notice](GODOT_LICENSE), and numerical modules retain their source notices.
384
+ diff --git a/docs/server.md b/docs/server.md
385
+ index 3c7c41d..937fb1e 100644
386
+ --- a/docs/server.md
387
+ +++ b/docs/server.md
388
+ @@ -39,7 +39,7 @@ There is no LAN binding, TLS or authentication token. These checks restrict brow
389
+ The first frame is a JSON text greeting:
390
+
391
+ ```json
392
+ -{"type":"hello","protocol":1,"version":"1.2.0","threads":8,"carStateStride":14,"carStateFields":["x","y","..."],"hip":{"available":true,"device":"AMD Radeon RX 7900 XTX","platform":"HIP"},"mathProfile":"proton","mathProfiles":["proton","win10-fma3","win11-fma3"]}
393
+ +{"type":"hello","protocol":1,"version":"1.3.0","threads":8,"carStateStride":14,"carStateFields":["x","y","..."],"hip":{"available":true,"device":"AMD Radeon RX 7900 XTX","platform":"HIP"},"mathProfile":"proton","mathProfiles":["proton","win10-fma3","win11-fma3"]}
394
+ ```
395
+
396
+ Read `carStateStride` and `carStateFields` from the greeting rather than hard-coding them. The example's fields are abbreviated. `platform` is `"HIP"` for the AMD library and `"CUDA"` for the NVIDIA one. When HIP is unavailable, `hip` instead contains `{"available":false,"reason":"..."}`. Availability means the process opened the library and device; a particular session can still fall back to CPU. `mathProfile` is the default math profile and `mathProfiles` lists every profile a session can choose; [math profiles](../math/README.md) documents their runtime variants.
397
+ diff --git a/gpu/README.md b/gpu/README.md
398
+ index 4a51bb6..5fbc237 100644
399
+ --- a/gpu/README.md
400
+ +++ b/gpu/README.md
401
+ @@ -4,7 +4,7 @@ The GPU library runs whole driving generations on an AMD GPU (HIP) or an NVIDIA
402
+
403
+ ## Build and use
404
+
405
+ -Linux release archives include `libaltd_gpu.so` beside `altd-sim`, built with ROCm 7.1 for the targets in `release-targets`. They need a ROCm 7.x runtime that provides `libamdhip64.so.7`, but no compiler. `altd-sim gpu-info` reports the loaded library. To build the library yourself, install ROCm with `hipcc`, then build from the repository root:
406
+ +The `amd` release archives include the library beside `altd-sim`, built for the targets in `release-targets`: `libaltd_gpu.so` with ROCm 7.1 on Linux, `altd_gpu.dll` with the HIP SDK 7.1 on Windows. They need a ROCm 7.x runtime that provides `libamdhip64.so.7` (Linux), or an AMD driver or HIP SDK 7.1 that provides `amdhip64_7.dll` (Windows), but no compiler. `altd-sim gpu-info` reports the loaded library. To build the library yourself, install ROCm with `hipcc` (or the HIP SDK on Windows, then use `gpu/build.ps1`), and build from the repository root:
407
+
408
+ ```sh
409
+ gpu/build.sh
410
+ @@ -46,6 +46,8 @@ gpu/build-cuda.sh # Linux, writes target/gpu/libaltd_gpu.so
411
+ gpu/build-cuda.ps1 # Windows, writes target/gpu/altd_gpu.dll
412
+ ```
413
+
414
+ +The `nvidia` release archives include a library built with CUDA 13.4 for `sm_75,sm_86,sm_89,sm_120` plus `sm_120` PTX: RTX 20 to RTX 50 GPUs, and later GPUs through the PTX. Other targets, such as `sm_80` (A100) and `sm_90` (H100), need their own build. It links the CUDA runtime statically, so it needs only an NVIDIA driver that supports CUDA 13 (580 or newer).
415
+ +
416
+ `OUT` overrides the output directory. `CUDA_ARCH` defaults to `native`, which builds for the GPUs of the build machine. Without a GPU, nvcc 13.4 warns and builds `sm_75` code and PTX instead, which newer GPUs compile at load time. To build for other GPUs, or several, list `sm_` targets separated by commas or spaces; `nvidia-smi --query-gpu=compute_cap --format=csv` reports the number, so 8.6 is `sm_86`. A list also embeds PTX for its newest target, which the driver compiles at load time for a newer GPU. CUDA 13 builds for Turing (`sm_75`, RTX 20 series) and newer only; older GPUs need a CUDA 12 toolkit, which is untested. Both scripts check the double tables with `gpu/gen_tables.py --check` (`python3` on Linux, the `py` launcher or `python` on Windows). The binary loads `ALTD_GPU_LIB`, then the library beside the executable, then `target/gpu`, as on AMD. `altd-sim gpu-info` runs one kernel when a GPU is present, so a library built for another GPU fails there with HIP error 209.
417
+
418
+ nvcc rejects a Visual Studio newer than the toolkit supports. `gpu/build-cuda.ps1 -AllowUnsupportedCompiler` (or `CUDA_ALLOW_UNSUPPORTED_COMPILER=1`) builds anyway with a warning; NVIDIA has not validated that combination, so run the checks below before trusting the library.
419
+ diff --git a/gpu/build.ps1 b/gpu/build.ps1
420
+ new file mode 100644
421
+ index 0000000..499450f
422
+ --- /dev/null
423
+ +++ b/gpu/build.ps1
424
+ @@ -0,0 +1,28 @@
425
+ +# Build altd_gpu.dll (the GPU simulator parts) for AMD GPUs with the HIP SDK for Windows into $OUT.
426
+ +# GPU_ARCH lists one or more offload targets separated by commas or spaces.
427
+ +# -ffp-contract=off: hipcc otherwise fuses a*b+c into FMA, which rounds once.
428
+ +# HIP_PATH is the HIP SDK root, which its installer sets.
429
+ +param(
430
+ + [string]$Out = $(if ($env:OUT) { $env:OUT } else { Join-Path $PSScriptRoot "..\target\gpu" }),
431
+ + [string]$Arch = $(if ($env:GPU_ARCH) { $env:GPU_ARCH } else { "gfx1100" })
432
+ +)
433
+ +$ErrorActionPreference = "Stop"
434
+ +New-Item -ItemType Directory -Force $Out | Out-Null
435
+ +$Out = (Resolve-Path $Out).Path
436
+ +
437
+ +# The py launcher first: python3 on Windows is often the Microsoft Store placeholder.
438
+ +$tables = Join-Path $PSScriptRoot "gen_tables.py"
439
+ +if (Get-Command py -ErrorAction SilentlyContinue) { py -3 $tables --check } else { python $tables --check }
440
+ +if ($LASTEXITCODE -ne 0) { throw "gen_tables.py --check failed" }
441
+ +
442
+ +$targets = @($Arch -split '[,\s]+' | Where-Object { $_ })
443
+ +if (-not $targets) { throw "GPU_ARCH lists no targets" }
444
+ +if (-not $env:HIP_PATH) { throw "HIP_PATH is not set; install the HIP SDK for Windows" }
445
+ +$hipcc = Join-Path $env:HIP_PATH "bin\hipcc.exe"
446
+ +
447
+ +$src = Join-Path $PSScriptRoot "sim\altd_gpu.hip"
448
+ +$dll = Join-Path $Out "altd_gpu.dll"
449
+ +& $hipcc -O3 -ffp-contract=off @($targets | ForEach-Object { "--offload-arch=$_" }) -shared -std=c++20 `
450
+ + -fhip-fp32-correctly-rounded-divide-sqrt -o $dll $src -L (Join-Path $env:HIP_PATH "lib") -lamdhip64
451
+ +if ($LASTEXITCODE -ne 0) { throw "hipcc failed" }
452
+ +Write-Host "built $dll for $($targets -join ' ')"
453
+ diff --git a/gpu/sim/altd_gpu.hip b/gpu/sim/altd_gpu.hip
454
+ index b0962e3..fafb3ee 100644
455
+ --- a/gpu/sim/altd_gpu.hip
456
+ +++ b/gpu/sim/altd_gpu.hip
457
+ @@ -502,7 +502,8 @@ double thread_cpu_seconds() {
458
+ // runtime's single-dispatch limit, so by default every launch allocates and
459
+ // frees it (0.2-1.7 ms per launch). Keeping the scratch avoids that. Runs at
460
+ // load, before the first HIP call initialises HSA; an explicit setting wins.
461
+ -#if !defined(__CUDACC__)
462
+ +// HIP on Windows runs on PAL instead of HSA, and its C runtime has no setenv.
463
+ +#if !defined(__CUDACC__) && !defined(_WIN32)
464
+ __attribute__((constructor)) void keep_scratch() { setenv("HSA_NO_SCRATCH_RECLAIM", "1", 0); }
465
+ #endif
466
+