Skip to content

Commit

Permalink
Merge branch 'master' into cheneym2/moduledocs
Browse files Browse the repository at this point in the history
  • Loading branch information
cheneym2 authored Mar 3, 2025
2 parents e071f4c + a99ee55 commit cc0cdd9
Show file tree
Hide file tree
Showing 146 changed files with 3,998 additions and 1,280 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
- { config: release, test-category: full }
# default not full gpu tests
- full-gpu-tests: false
- build-llvm: true
- { platform: wasm, build-llvm: false }
# The runners don't have a GPU by default except for the self-hosted ones
- has-gpu: false
# Self-hosted aarch64 build
Expand All @@ -56,8 +58,9 @@ jobs:
platform: aarch64
test-category: smoke
full-gpu-tests: false
runs-on: [self-hosted, Linux, ARM64]
has-gpu: true
runs-on: ubuntu-22.04-arm
has-gpu: false
build-llvm: false
# Self-hosted full gpu build
- os: windows
config: release
Expand Down Expand Up @@ -110,7 +113,7 @@ jobs:
compiler: ${{matrix.compiler}}
platform: ${{matrix.platform}}
config: ${{matrix.config}}
build-llvm: ${{ matrix.platform != 'wasm' }}
build-llvm: ${{ matrix.build-llvm }}
- name: Build Slang
if: steps.filter.outputs.should-run == 'true'
run: |
Expand Down Expand Up @@ -140,6 +143,12 @@ jobs:
"-DSLANG_SLANG_LLVM_BINARY_URL=$(pwd)/build/dist-release/slang-llvm.zip" \
"-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}}"
cmake --workflow --preset "${{matrix.config}}"
elif [[ "${{ matrix.build-llvm }}" = "false" ]]; then
# linux aarch64 cannot build llvm.
cmake --preset default --fresh \
-DSLANG_SLANG_LLVM_FLAVOR=DISABLE \
-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}}
cmake --workflow --preset "${{matrix.config}}"
else
# Otherwise, use the "system" llvm we have just build or got from the
# cache in the setup phase
Expand All @@ -150,7 +159,7 @@ jobs:
fi
fi
- name: Test Slang
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm'
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm' && matrix.platform != 'aarch64'
run: |
export SLANG_RUN_SPIRV_VALIDATION=1
export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1
Expand All @@ -166,7 +175,8 @@ jobs:
-use-test-server \
-category ${{ matrix.test-category }} \
-api all-dx12 \
-expected-failure-list tests/expected-failure-github.txt
-expected-failure-list tests/expected-failure-github.txt \
-expected-failure-list tests/expected-failure-record-replay-tests.txt
else
"$bin_dir/slang-test" \
-use-test-server \
Expand All @@ -176,7 +186,7 @@ jobs:
-expected-failure-list tests/expected-failure-record-replay-tests.txt
fi
- name: Run Slang examples
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm'
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm' && matrix.full-gpu-tests
run: |
.github/workflows/ci-examples.sh \
--bin-dir "$bin_dir" \
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ jobs:
platform: [x86_64, aarch64]
test-category: [smoke]
include:
- { os: linux, runs-on: ubuntu-20.04, compiler: gcc }
- {
os: linux,
platform: x86_64,
runs-on: ubuntu-22.04,
compiler: gcc,
}
- {
os: linux,
platform: aarch64,
runs-on: ubuntu-22.04-arm,
compiler: gcc,
}
- { os: windows, runs-on: windows-latest, compiler: cl }
- { os: macos, runs-on: macos-latest, compiler: clang }

Expand Down
15 changes: 15 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@
"configurePreset": "default",
"configuration": "RelWithDebInfo"
},
{
"name": "vs2022-debug",
"configurePreset": "vs2022",
"configuration": "Debug"
},
{
"name": "vs2022-release",
"configurePreset": "vs2022",
"configuration": "Release"
},
{
"name": "vs2022-releaseWithDebugInfo",
"configurePreset": "vs2022",
"configuration": "RelWithDebInfo"
},
{
"name": "emscripten",
"configurePreset": "emscripten",
Expand Down
225 changes: 225 additions & 0 deletions docs/_layouts/deprecated.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: " en-US" }}">

<head>
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<link rel="stylesheet" type="text/css" href="{{ '/assets/css/print.css' | relative_url }}" media="print">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TMTZVLLMBP"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-TMTZVLLMBP');
</script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
#centeringDiv {
margin: auto;
max-width: 1200px;
}
#navDiv
{
display: block;
box-sizing: border-box;
padding-top: 5px;
padding-bottom: 5px;
border-bottom-width: 3px;
border-bottom-style: solid;
border-bottom-color: #F0F0F0;
}
#navDiv nav
{
float:left;
}
#navDiv::after {
content: "";
clear: both;
display: table;
}
#navDiv nav li::after
{
content: "/";
padding-left: 10px;
padding-right: 0px;
color: #808080;
}
#navDiv nav li
{
display:inline;
padding-left: 10px;
padding-right: 0px;
}
#tocColumn {
width: 350px;
position: fixed;
overflow-y: auto;
box-sizing: border-box;
display: block;
}

#tocInner {
padding: 20px;
}

#rightColumn {
padding-left: 390px;
padding-right: 40px;
padding-top: 20px;
}

.toc_root_list {
list-style-type: none;
list-style-position: outside;
background-color: initial;
padding-left: 0px;
}
.toc_list {
padding-left: 16px;
background-color: initial;
list-style-type: none;
margin-bottom: 0px;
}
.toc_item {
cursor: pointer;
user-select: none;
list-style-type: none;
padding-left: 0px;
padding-top: 5px;
}
.toc_item_expanded::before {
content: "\25be";
cursor: pointer;
}
.toc_item_collapsed::before {
content: "\25b8";
cursor: pointer;
}
.toc_item_leaf {
padding-left: 14px;
cursor: pointer;
list-style-type: none;
}
.toc_span:hover
{
color: #d5000d;
}
.tocIcon
{
vertical-align: -2.5px;
}
.editButton
{
float: right;
margin-right: 10px;
color:#808080;
}
.editIcon
{
fill: currentColor;
vertical-align: text-top;
}
#btnToggleTOC {
display: none;
width: fit-content;
margin-left: 10px;
margin-top: 10px;
padding: 10px;
border-style: solid;
border-color: #808080;
border-width: 1px;
background-color: #E8E8E8;
}
#btnToggleTOC:hover {
background-color: #F0F0E8;
}
#btnToggleTOC:active {
background-color: #D4D4D4;
}
@media screen and (max-width: 900px) {
#tocColumn {
width: 300px;
display: block;
box-sizing: border-box;
}
#rightColumn {
padding-left: 320px;
padding-right: 20px;
}
}

@media screen and (max-width: 700px) {
#tocColumn {
width: 100%;
position: static;
display: none;
border-right-style: none;
box-sizing: content-box;
}
#tocInner {
padding: 10px;
}
#rightColumn {
padding-left: 10px;
padding-right: 10px;
}
#centeringDiv {
padding-left: 0px;
}
#btnToggleTOC {
display: block;
}
}
</style>
{% seo %}
</head>

<body>
<div id="centeringDiv">
<div id="navDiv">
<a class="editButton" title="Edit this page" href="https://github.com/{{ site.github.repository_nwo }}/edit/master/docs/{{ page.path }}">
<svg class="editIcon" height="16" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true">
<path fill-rule="evenodd"
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">
</path>
</svg>
</a>
</div>
<div id="rightColumn">
<section id="main_content">
{% include anchor_headings.html html=content anchorBody="" %}
</section>
<a href="javascript:;" id="_content_end_"></a>
<footer>
{% if site.github.is_project_page %}
{{ site.title | default: site.github.repository_name }} is maintained by <a
href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a><br>
{% endif %}
This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.
</footer>
</div>
</div>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$$','$$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\(","\\)"] ],
},
TeX: {
Macros: {
bra: ["\\langle{#1}|", 1],
ket: ["|{#1}\\rangle", 1],
braket: ["\\langle{#1}\\rangle", 1],
bk: ["\\langle{#1}|{#2}|{#3}\\rangle", 3]
}
}
});
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</body>

</html>
5 changes: 2 additions & 3 deletions docs/deprecated/a1-02-slangpy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: user-guide
permalink: "docs/user-guide
/a1-02-slangpy"
layout: deprecated
permalink: "docs/user-guide/a1-02-slangpy"
---

Using Slang to Write PyTorch Kernels
Expand Down
4 changes: 4 additions & 0 deletions docs/user-guide/08-compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ for compiling GLSL code. Without this setting, compiling GLSL code will result i
> Currently, the global session type is *not* thread-safe.
> Applications that wish to compile on multiple threads will need to ensure that each concurrent thread compiles with a distinct global session.
> #### Note ####
> Currently, the global session should be freed after any objects created from it.
> See [issue 6344](https://github.com/shader-slang/slang/issues/6344).
### Creating a Session
A _session_ uses the interface `slang::ISession`, and represents a scope for compilation with a consistent set of compiler options.
Expand Down
2 changes: 1 addition & 1 deletion external/slang-rhi
Submodule slang-rhi updated 273 files
Loading

0 comments on commit cc0cdd9

Please sign in to comment.