Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -39,7 +39,8 @@ echo " $commithash"
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 $finalversion $commithash $cleanrepo
rm -rf ./tmp
Comment thread
rgwott marked this conversation as resolved.
2 changes: 1 addition & 1 deletion mve_intrinsics/mve.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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 @@ -23,7 +23,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
6 changes: 4 additions & 2 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 @@ -81,7 +81,8 @@ trap cleanup EXIT
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 @@ -102,6 +103,7 @@ docker_run_params="--rm \
-w /src/site \
--entrypoint /usr/local/bin/ruby \
gh-pages \
-r/src/site/tools/jekyll-page-timing.rb \
/usr/local/bundle/bin/jekyll"

if [ "$mode" == "build" ]; then
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
1 change: 1 addition & 0 deletions tools/generate-pdfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,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