Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_site
tmp
pdfs
tex2pdf*
Expand Down
3 changes: 2 additions & 1 deletion build_with_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
set -x
IMAGE_NAME=acle_build
# Build the image.
docker build -t $IMAGE_NAME tools/docker
docker build -t $IMAGE_NAME --network host tools/docker
# Run the image, mounting the current folder into the /src folder of
# the docker image. Run as the host user so that the output files are owned by them.
docker run --rm -u $(id -u):$(id -g) --mount type=bind,source="$(pwd)",target=/src $IMAGE_NAME
rm -rf ./tmp
Comment thread
rgwott marked this conversation as resolved.
6 changes: 3 additions & 3 deletions mve_intrinsics/mve.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ version: 2021Q4
date-of-issue: 11 January 2022
# LaTeX specific variables
landscape: true
copyright-text: Copyright 2019-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>.
Comment thread
rgwott marked this conversation as resolved.
Outdated
copyright-text: Copyright 2019-2022, 2026 Arm Limited and/or its affiliates <open-source-office@arm.com>.
draftversion: true
# Jekyll specific variables
header_counter: true
toc: true
---

<!--
SPDX-FileCopyrightText: Copyright 2019-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
SPDX-FileCopyrightText: Copyright 2019-2022, 2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
CC-BY-SA-4.0 AND Apache-Patent-License
See LICENSE.md file for details
-->
Expand All @@ -24,7 +24,7 @@ to generate the Table of Contents via Jekyll.
They are automatically removed by the scripts that generate the pdfs.
-->
* TOC
{{:toc}}
{:toc}
# Preface

## Abstract
Expand Down
2 changes: 1 addition & 1 deletion neon_intrinsics/advsimd.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ to generate the Table of Contents via Jekyll.
They are automatically removed by the scripts that generate the pdfs.
-->
* TOC
{{:toc}}
{:toc}
# Preface

## Abstract
Expand Down
20 changes: 16 additions & 4 deletions tools/build-github-pages.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# SPDX-FileCopyrightText: Copyright 2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-FileCopyrightText: Copyright 2023, 2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0

########################### BUILD GITHUB PAGES ################################
Expand Down Expand Up @@ -36,7 +36,8 @@ TEMPDIR=$(mktemp -d)
cd $TEMPDIR
git clone --depth 1 https://github.com/github/pages-gem.git
cd pages-gem
docker build -t gh-pages --build-arg RUBY_VERSION=3.2 .
docker image inspect gh-pages >/dev/null 2>&1 || \
docker build -t gh-pages --build-arg RUBY_VERSION=3.2 .
cd $ROOTDIR
echo -e "plugins:\n \
- jekyll-coffeescript\n \
Expand All @@ -50,11 +51,22 @@ echo -e "plugins:\n \
- jekyll-relative-links\n" >> _config.yml
cd $TEMPDIR/pages-gem

docker_run_params="--rm \
-u "$(id -u):$(id -g)" \
-v $TEMPDIR/pages-gem:/src/gh/pages-gem \
-v $ROOTDIR:/src/site \
-w /src/site \
--entrypoint /usr/local/bin/ruby \
gh-pages \
-r/src/site/tools/jekyll-page-timing.rb \
/usr/local/bundle/bin/jekyll"

if [ "$1" == "build" ]; then
SITE=$ROOTDIR
docker run --rm -p 4000:4000 -v `realpath ${SITE}`:/src/site gh-pages jekyll build
docker run $docker_run_params build
elif [ "$1" == "serve" ]; then
SITE=$ROOTDIR make server
SITE=$ROOTDIR
docker run --network host $docker_run_params serve --host 127.0.0.1 --port 4000
fi

return_code=$?
Expand Down
5 changes: 3 additions & 2 deletions tools/gen-intrinsics-specs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# SPDX-FileCopyrightText: Copyright 2021, 2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-FileCopyrightText: Copyright 2021, 2023, 2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -965,7 +965,8 @@ def get_intrinsics_db(path):
intrinsics_db = get_intrinsics_db(cli_args.intrinsic_defs)
doc_template = read_template(cli_args.template)
intrinsic_table = process_db(intrinsics_db, classification_map, cli_args.workflow)
md_output = doc_template.format(intrinsic_table=intrinsic_table)
normalized_template = doc_template.replace("{{", "{").replace("}}", "}")
md_output = normalized_template.replace("{intrinsic_table}", intrinsic_table)
with (open(cli_args.outfile, 'w')) as f:
f.write(md_output)
# Always run the unit tests.
Expand Down
3 changes: 2 additions & 1 deletion tools/generate-pdfs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -ex

# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-FileCopyrightText: Copyright 2021-2022, 2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -49,3 +49,4 @@ generate_pdfs_from_md ./morello/morello.md ./pdfs/morello.pdf
generate_pdfs_from_md ./main/acle.md ./pdfs/acle.pdf
generate_pdfs_from_md ./tmp/mve.for-pdf.md ./pdfs/mve.pdf
generate_pdfs_from_md ./tmp/advsimd.for-pdf.md ./pdfs/advsimd.pdf
rm -rf ./tmp
64 changes: 64 additions & 0 deletions tools/jekyll-page-timing.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-FileCopyrightText: Copyright 2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# frozen_string_literal: true

require "jekyll"

module JekyllPageTiming
@start_times = {}

def self.name(item)
if item.respond_to?(:relative_path) && item.relative_path
item.relative_path
elsif item.respond_to?(:path) && item.path
item.path
elsif item.respond_to?(:url) && item.url
item.url
else
item.inspect
end
end

def self.start(item)
@start_times[item.object_id] =
Process.clock_gettime(Process::CLOCK_MONOTONIC)

warn "START PAGE: #{name(item)}"
end

def self.finish(item)
started_at = @start_times.delete(item.object_id)

if started_at
elapsed =
Process.clock_gettime(Process::CLOCK_MONOTONIC) - started_at

warn format("END PAGE: %s (%.3fs)", name(item), elapsed)
else
warn "END PAGE: #{name(item)}"
end
end
end

[:pages, :documents].each do |owner|
Jekyll::Hooks.register owner, :pre_render do |item|
JekyllPageTiming.start(item)
end

Jekyll::Hooks.register owner, :post_render do |item|
JekyllPageTiming.finish(item)
end
end
Loading