Skip to content

Commit cfa8d6d

Browse files
authored
Merge branch 'master' into push-ppyroxovrrzn
2 parents 405ff98 + 66984eb commit cfa8d6d

File tree

144 files changed

+2760
-821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+2760
-821
lines changed

.github/workflows/ci.yml

+16-6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
- { config: release, test-category: full }
4848
# default not full gpu tests
4949
- full-gpu-tests: false
50+
- build-llvm: true
51+
- { platform: wasm, build-llvm: false }
5052
# The runners don't have a GPU by default except for the self-hosted ones
5153
- has-gpu: false
5254
# Self-hosted aarch64 build
@@ -56,8 +58,9 @@ jobs:
5658
platform: aarch64
5759
test-category: smoke
5860
full-gpu-tests: false
59-
runs-on: [self-hosted, Linux, ARM64]
60-
has-gpu: true
61+
runs-on: ubuntu-22.04-arm
62+
has-gpu: false
63+
build-llvm: false
6164
# Self-hosted full gpu build
6265
- os: windows
6366
config: release
@@ -110,7 +113,7 @@ jobs:
110113
compiler: ${{matrix.compiler}}
111114
platform: ${{matrix.platform}}
112115
config: ${{matrix.config}}
113-
build-llvm: ${{ matrix.platform != 'wasm' }}
116+
build-llvm: ${{ matrix.build-llvm }}
114117
- name: Build Slang
115118
if: steps.filter.outputs.should-run == 'true'
116119
run: |
@@ -140,6 +143,12 @@ jobs:
140143
"-DSLANG_SLANG_LLVM_BINARY_URL=$(pwd)/build/dist-release/slang-llvm.zip" \
141144
"-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}}"
142145
cmake --workflow --preset "${{matrix.config}}"
146+
elif [[ "${{ matrix.build-llvm }}" = "false" ]]; then
147+
# linux aarch64 cannot build llvm.
148+
cmake --preset default --fresh \
149+
-DSLANG_SLANG_LLVM_FLAVOR=DISABLE \
150+
-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}}
151+
cmake --workflow --preset "${{matrix.config}}"
143152
else
144153
# Otherwise, use the "system" llvm we have just build or got from the
145154
# cache in the setup phase
@@ -150,7 +159,7 @@ jobs:
150159
fi
151160
fi
152161
- name: Test Slang
153-
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm'
162+
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm' && matrix.platform != 'aarch64'
154163
run: |
155164
export SLANG_RUN_SPIRV_VALIDATION=1
156165
export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1
@@ -166,7 +175,8 @@ jobs:
166175
-use-test-server \
167176
-category ${{ matrix.test-category }} \
168177
-api all-dx12 \
169-
-expected-failure-list tests/expected-failure-github.txt
178+
-expected-failure-list tests/expected-failure-github.txt \
179+
-expected-failure-list tests/expected-failure-record-replay-tests.txt
170180
else
171181
"$bin_dir/slang-test" \
172182
-use-test-server \
@@ -176,7 +186,7 @@ jobs:
176186
-expected-failure-list tests/expected-failure-record-replay-tests.txt
177187
fi
178188
- name: Run Slang examples
179-
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm'
189+
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm' && matrix.full-gpu-tests
180190
run: |
181191
.github/workflows/ci-examples.sh \
182192
--bin-dir "$bin_dir" \

.github/workflows/release.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@ jobs:
2424
platform: [x86_64, aarch64]
2525
test-category: [smoke]
2626
include:
27-
- { os: linux, runs-on: ubuntu-20.04, compiler: gcc }
27+
- {
28+
os: linux,
29+
platform: x86_64,
30+
runs-on: ubuntu-22.04,
31+
compiler: gcc,
32+
}
33+
- {
34+
os: linux,
35+
platform: aarch64,
36+
runs-on: ubuntu-22.04-arm,
37+
compiler: gcc,
38+
}
2839
- { os: windows, runs-on: windows-latest, compiler: cl }
2940
- { os: macos, runs-on: macos-latest, compiler: clang }
3041

CMakePresets.json

+15
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,21 @@
104104
"configurePreset": "default",
105105
"configuration": "RelWithDebInfo"
106106
},
107+
{
108+
"name": "vs2022-debug",
109+
"configurePreset": "vs2022",
110+
"configuration": "Debug"
111+
},
112+
{
113+
"name": "vs2022-release",
114+
"configurePreset": "vs2022",
115+
"configuration": "Release"
116+
},
117+
{
118+
"name": "vs2022-releaseWithDebugInfo",
119+
"configurePreset": "vs2022",
120+
"configuration": "RelWithDebInfo"
121+
},
107122
{
108123
"name": "emscripten",
109124
"configurePreset": "emscripten",

docs/_layouts/deprecated.html

+225
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ site.lang | default: " en-US" }}">
3+
4+
<head>
5+
<meta charset='utf-8'>
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
8+
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
9+
<link rel="stylesheet" type="text/css" href="{{ '/assets/css/print.css' | relative_url }}" media="print">
10+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TMTZVLLMBP"></script>
11+
<script>
12+
window.dataLayer = window.dataLayer || [];
13+
function gtag(){dataLayer.push(arguments);}
14+
gtag('js', new Date());
15+
gtag('config', 'G-TMTZVLLMBP');
16+
</script>
17+
<!--[if lt IE 9]>
18+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
19+
<![endif]-->
20+
<style>
21+
#centeringDiv {
22+
margin: auto;
23+
max-width: 1200px;
24+
}
25+
#navDiv
26+
{
27+
display: block;
28+
box-sizing: border-box;
29+
padding-top: 5px;
30+
padding-bottom: 5px;
31+
border-bottom-width: 3px;
32+
border-bottom-style: solid;
33+
border-bottom-color: #F0F0F0;
34+
}
35+
#navDiv nav
36+
{
37+
float:left;
38+
}
39+
#navDiv::after {
40+
content: "";
41+
clear: both;
42+
display: table;
43+
}
44+
#navDiv nav li::after
45+
{
46+
content: "/";
47+
padding-left: 10px;
48+
padding-right: 0px;
49+
color: #808080;
50+
}
51+
#navDiv nav li
52+
{
53+
display:inline;
54+
padding-left: 10px;
55+
padding-right: 0px;
56+
}
57+
#tocColumn {
58+
width: 350px;
59+
position: fixed;
60+
overflow-y: auto;
61+
box-sizing: border-box;
62+
display: block;
63+
}
64+
65+
#tocInner {
66+
padding: 20px;
67+
}
68+
69+
#rightColumn {
70+
padding-left: 390px;
71+
padding-right: 40px;
72+
padding-top: 20px;
73+
}
74+
75+
.toc_root_list {
76+
list-style-type: none;
77+
list-style-position: outside;
78+
background-color: initial;
79+
padding-left: 0px;
80+
}
81+
.toc_list {
82+
padding-left: 16px;
83+
background-color: initial;
84+
list-style-type: none;
85+
margin-bottom: 0px;
86+
}
87+
.toc_item {
88+
cursor: pointer;
89+
user-select: none;
90+
list-style-type: none;
91+
padding-left: 0px;
92+
padding-top: 5px;
93+
}
94+
.toc_item_expanded::before {
95+
content: "\25be";
96+
cursor: pointer;
97+
}
98+
.toc_item_collapsed::before {
99+
content: "\25b8";
100+
cursor: pointer;
101+
}
102+
.toc_item_leaf {
103+
padding-left: 14px;
104+
cursor: pointer;
105+
list-style-type: none;
106+
}
107+
.toc_span:hover
108+
{
109+
color: #d5000d;
110+
}
111+
.tocIcon
112+
{
113+
vertical-align: -2.5px;
114+
}
115+
.editButton
116+
{
117+
float: right;
118+
margin-right: 10px;
119+
color:#808080;
120+
}
121+
.editIcon
122+
{
123+
fill: currentColor;
124+
vertical-align: text-top;
125+
}
126+
#btnToggleTOC {
127+
display: none;
128+
width: fit-content;
129+
margin-left: 10px;
130+
margin-top: 10px;
131+
padding: 10px;
132+
border-style: solid;
133+
border-color: #808080;
134+
border-width: 1px;
135+
background-color: #E8E8E8;
136+
}
137+
#btnToggleTOC:hover {
138+
background-color: #F0F0E8;
139+
}
140+
#btnToggleTOC:active {
141+
background-color: #D4D4D4;
142+
}
143+
@media screen and (max-width: 900px) {
144+
#tocColumn {
145+
width: 300px;
146+
display: block;
147+
box-sizing: border-box;
148+
}
149+
#rightColumn {
150+
padding-left: 320px;
151+
padding-right: 20px;
152+
}
153+
}
154+
155+
@media screen and (max-width: 700px) {
156+
#tocColumn {
157+
width: 100%;
158+
position: static;
159+
display: none;
160+
border-right-style: none;
161+
box-sizing: content-box;
162+
}
163+
#tocInner {
164+
padding: 10px;
165+
}
166+
#rightColumn {
167+
padding-left: 10px;
168+
padding-right: 10px;
169+
}
170+
#centeringDiv {
171+
padding-left: 0px;
172+
}
173+
#btnToggleTOC {
174+
display: block;
175+
}
176+
}
177+
</style>
178+
{% seo %}
179+
</head>
180+
181+
<body>
182+
<div id="centeringDiv">
183+
<div id="navDiv">
184+
<a class="editButton" title="Edit this page" href="https://github.com/{{ site.github.repository_nwo }}/edit/master/docs/{{ page.path }}">
185+
<svg class="editIcon" height="16" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true">
186+
<path fill-rule="evenodd"
187+
d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z">
188+
</path>
189+
</svg>
190+
</a>
191+
</div>
192+
<div id="rightColumn">
193+
<section id="main_content">
194+
{% include anchor_headings.html html=content anchorBody="" %}
195+
</section>
196+
<a href="javascript:;" id="_content_end_"></a>
197+
<footer>
198+
{% if site.github.is_project_page %}
199+
{{ site.title | default: site.github.repository_name }} is maintained by <a
200+
href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a><br>
201+
{% endif %}
202+
This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.
203+
</footer>
204+
</div>
205+
</div>
206+
<script type="text/x-mathjax-config">
207+
MathJax.Hub.Config({
208+
tex2jax: {
209+
inlineMath: [ ['$$','$$'], ["\\(","\\)"] ],
210+
displayMath: [ ['$$','$$'], ["\\(","\\)"] ],
211+
},
212+
TeX: {
213+
Macros: {
214+
bra: ["\\langle{#1}|", 1],
215+
ket: ["|{#1}\\rangle", 1],
216+
braket: ["\\langle{#1}\\rangle", 1],
217+
bk: ["\\langle{#1}|{#2}|{#3}\\rangle", 3]
218+
}
219+
}
220+
});
221+
</script>
222+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
223+
</body>
224+
225+
</html>

docs/deprecated/a1-02-slangpy.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
layout: user-guide
3-
permalink: "docs/user-guide
4-
/a1-02-slangpy"
2+
layout: deprecated
3+
permalink: "docs/user-guide/a1-02-slangpy"
54
---
65

76
Using Slang to Write PyTorch Kernels

docs/user-guide/02-conventional-features.md

+1
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ In this example, the `vertexMain` shader indicates that it is meant for the `ver
655655
Rasterization, compute, and ray-tracing pipelines each define their own stages, and new versions of graphics APIs may introduce new stages.
656656

657657
For compatibility with legacy codebases, Slang supports code that leaves off `[shader(...)]` attributes; in these cases application developers must specify the names and stages for their entry points via explicit command-line or API options.
658+
Such entry points will not be found via `IModule::findEntryPointByName()`. Instead `IModule::findAndCheckEntryPoint()` must be used, and a stage must be specified.
658659
It is recommended that new codebases always use `[shader(...)]` attributes both to simplify their workflow, and to make code more explicit and "self-documenting."
659660

660661
> #### Note ####

docs/user-guide/08-compiling.md

+4
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,10 @@ for compiling GLSL code. Without this setting, compiling GLSL code will result i
603603
> Currently, the global session type is *not* thread-safe.
604604
> Applications that wish to compile on multiple threads will need to ensure that each concurrent thread compiles with a distinct global session.
605605
606+
> #### Note ####
607+
> Currently, the global session should be freed after any objects created from it.
608+
> See [issue 6344](https://github.com/shader-slang/slang/issues/6344).
609+
606610
### Creating a Session
607611
608612
A _session_ uses the interface `slang::ISession`, and represents a scope for compilation with a consistent set of compiler options.

examples/reflection-api/compute-simple.slang

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// compute-simple.slang
22

3+
static const uint THREADGROUP_SIZE_X = 8;
4+
static const uint THREADGROUP_SIZE_Y = THREADGROUP_SIZE_X;
5+
36
struct ImageProcessingOptions
47
{
58
float3 tintColor;
@@ -10,7 +13,7 @@ struct ImageProcessingOptions
1013
}
1114

1215
[shader("compute")]
13-
[numthreads(8, 8)]
16+
[numthreads(THREADGROUP_SIZE_X, THREADGROUP_SIZE_Y)]
1417
void processImage(
1518
uint3 threadID : SV_DispatchThreadID,
1619
uniform Texture2D inputImage,

0 commit comments

Comments
 (0)