diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1c439d7e31..bfb58c3ffa 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,10 +6,10 @@ RUN apt-get update && \ apt-get -y install vim wget sudo git RUN case ${TARGETPLATFORM} in \ - "linux/amd64") HUGO=hugo_0.111.2_linux-amd64 ;; \ - "linux/arm64") HUGO=hugo_0.111.2_linux-arm64 ;; \ + "linux/amd64") HUGO=hugo_0.130.0_linux-amd64 ;; \ + "linux/arm64") HUGO=hugo_0.130.0_linux-arm64 ;; \ esac \ - && HUGO_VER=v0.111.2 \ + && HUGO_VER=v0.130.0 \ && wget https://github.com/gohugoio/hugo/releases/download/${HUGO_VER}/${HUGO}.deb && apt-get -y install ./${HUGO}.deb # User account diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7eb712efe8..2ceda69325 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,6 +7,6 @@ "remoteUser": "ubuntu", - "postStartCommand": "nohup bash -c 'hugo ; bin/pagefind --site public --output-subdir ../static/pagefind ; hugo server --baseUrl=/ --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 &' " + "postStartCommand": "nohup bash -c 'hugo ; bin/pagefind --site public --output-subdir ../static/pagefind ; hugo server --baseURL=/ --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 &' " } diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 72d7958a3f..67d666c1c8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,7 @@ Before submitting a pull request for a new Learning Path, please review [Create a Learning Path](https://learn.arm.com//learning-paths/cross-platform/_example-learning-path/) - [ ] I have reviewed Create a Learning Path -Please do not include any confidential information in your contribution. This includes confidential microarchitecture details and unannounced product information. No AI tool can be used to generate either content or code when creating a learning path or install guide. +Please do not include any confidential information in your contribution. This includes confidential microarchitecture details and unannounced product information. - [ ] I have checked my contribution for confidential information diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2e8c95a066..f88caac4b2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,6 +19,12 @@ on: required: true HUGO_RAG_API: required: true + HUGO_AUDIO_API: + required: true + HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: + required: true + HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: + required: true env: HUGO_VERSION: 0.130.0 @@ -26,7 +32,7 @@ env: jobs: build_and_deploy: # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm permissions: id-token: write contents: read @@ -43,7 +49,10 @@ jobs: with: hugo-version: ${{ env.HUGO_VERSION }} extended: true - + + - name: Clear npm cache + run: npm cache clean --force + # Installs Post-CSS - name: Install Post-CSS run: npm install postcss-cli @@ -59,10 +68,13 @@ jobs: run: | hugo --minify cp learn-image-sitemap.xml public/learn-image-sitemap.xml - bin/pagefind --site "public" + bin/pagefind.aarch64 --site "public" env: HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }} HUGO_RAG_API: ${{ secrets.HUGO_RAG_API }} + HUGO_AUDIO_API: ${{ secrets.HUGO_AUDIO_API }} + HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: ${{ secrets.HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID }} + HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: ${{ secrets.HUGO_FORM_ID_FOR_PROGRAM_SIGNUP }} # Deploys website to AWS S3 and invalidate CloudFront Cache - name: Deploy to S3 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bfb645e2bc..4e3dad94e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,3 +23,6 @@ jobs: AWS_OIDC_ROLE: ${{ secrets.AWS_OIDC_ROLE_INTERNAL }} HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }} HUGO_RAG_API: ${{ secrets.HUGO_RAG_API }} + HUGO_AUDIO_API: ${{ secrets.HUGO_AUDIO_API }} + HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: ${{ secrets.HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID }} + HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: ${{ secrets.HUGO_FORM_ID_FOR_PROGRAM_SIGNUP }} diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 69981fd264..1fbe6be03b 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -23,3 +23,6 @@ jobs: AWS_OIDC_ROLE: ${{ secrets.AWS_OIDC_ROLE_PRODUCTION }} HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }} HUGO_RAG_API: ${{ secrets.HUGO_RAG_API }} + HUGO_AUDIO_API: ${{ secrets.HUGO_AUDIO_API }} + HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: ${{ secrets.HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID }} + HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: ${{ secrets.HUGO_FORM_ID_FOR_PROGRAM_SIGNUP }} diff --git a/.github/workflows/stats-pr.yml b/.github/workflows/stats-pr.yml index 0d867b4822..f414b2eae3 100644 --- a/.github/workflows/stats-pr.yml +++ b/.github/workflows/stats-pr.yml @@ -9,10 +9,10 @@ permissions: pull-requests: write jobs: stats-pr: - runs-on: arm-linux-runner + runs-on: ubuntu-24.04-arm steps: - name: Checkout main branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: main - name: Download stats report as artifact @@ -21,19 +21,36 @@ jobs: # Run ID of the workflow that uploaded the artifact run-id: ${{ github.event.workflow_run.id }} github-token: ${{ github.token }} + - name: Check if artifact exists + run: | + if [ ! -d stats_current_test_info ]; then + echo "No stats artifact found" + echo "ARTIFACT_EXIST=false" >> "$GITHUB_ENV" + else + echo "Stats artifact found" + echo "ARTIFACT_EXIST=true" >> "$GITHUB_ENV" + fi - name: Move stats file # Unpack the artifact and move the stats file to the correct location + if: env.ARTIFACT_EXIST == 'true' run: | mv stats_current_test_info/stats_current_test_info.yml data/stats_current_test_info.yml rm -rf stats_current_test_info + - name: Set workflow link as environment variable + if: env.ARTIFACT_EXIST == 'true' + run: echo "WORKFLOW_URL=${{ github.event.workflow_run.workflow_url }}" >> $GITHUB_ENV + - name: Echo Workflow URL + if: env.ARTIFACT_EXIST == 'true' + run: echo $WORKFLOW_URL - name: Create Pull Request uses: peter-evans/create-pull-request@v6 - if: success() + if: env.ARTIFACT_EXIST == 'true' && success() with: commit-message: Update stats_current_test_info.yml title: Update stats_current_test_info.yml body: | Update test result file with recent run + Triggered by workflow run ${ WORKFLOW_URL } Auto-generated by create-pull-request: https://github.com/peter-evans/create-pull-request branch: update-stats-current-test-info - base: main \ No newline at end of file + base: main diff --git a/.github/workflows/test-lp.yml b/.github/workflows/test-lp.yml index 3bb6f2b35c..b029dd2e97 100644 --- a/.github/workflows/test-lp.yml +++ b/.github/workflows/test-lp.yml @@ -2,18 +2,34 @@ name: Test Learning Path on: pull_request jobs: Test-Pull-Request: - runs-on: arm-linux-runner + runs-on: ubuntu-24.04-arm steps: - name: Check out repository code uses: actions/checkout@v4 with: ref: ${{ steps.vars.outputs.branch-name }} + - name: Run hugo command to test site builds + run: | + sudo apt-get install -y hugo + hugo - name: Get all changed markdown files id: changed-markdown-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v46 with: files: | **.md + - name: Check for capital letters or spaces in content directory + run: | + echo "Checking for capital letters or spaces in content directory paths..." + + git diff --name-only origin/${{ github.base_ref }}...HEAD | + grep '^content/' | + grep -E '[A-Z]|[[:space:]]' && { + echo "❌ Found invalid file or directory names with capital letters or spaces in 'content/'" + exit 1 + } + + echo "✅ No capital letters or spaces found in 'content/' paths." - name: Install dependencies if: steps.changed-markdown-files.outputs.any_changed == 'true' run: pip install -r tools/requirements.txt @@ -22,7 +38,7 @@ jobs: if: steps.changed-markdown-files.outputs.any_changed == 'true' # Run the test suite run: | - set -o pipefail; ./tools/test_lp.sh ${{ steps.changed-markdown-files.outputs.all_changed_files }} 2>&1 | tee test-lp-output.txt + set -o pipefail; ./tools/test_lp.sh ${{ steps.changed-markdown-files.outputs.all_changed_files }} 2>&1 | tee test-lp-output.txt - name: Parse test suite errors id: test-suite-state if: success() @@ -51,4 +67,4 @@ jobs: if: success() && env.MAINTENANCE == 'on' with: name: stats_current_test_info - path: data/stats_current_test_info.yml \ No newline at end of file + path: data/stats_current_test_info.yml diff --git a/.github/workflows/update-roadmap-project-dates.yml b/.github/workflows/update-roadmap-project-dates.yml new file mode 100644 index 0000000000..6f1f572b75 --- /dev/null +++ b/.github/workflows/update-roadmap-project-dates.yml @@ -0,0 +1,110 @@ +name: Update Project Fields on Label and Status Change + +on: + pull_request: + types: + - labeled + workflow_dispatch: + +jobs: + update-project-dates: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Run GitHub Script + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} # replace with your token secret name + script: | + const projectId = "PVT_kwDOBVR2-M4A2QVf"; // Replace with your actual project node ID + const fieldStartId = "PVTF_lADOBVR2-M4A2QVfzgrvSF4"; // Replace with Start Date field node ID + const fieldPublishId = "PVTF_lADOBVR2-M4A2QVfzgrvSMA"; // Replace with Publish Date field node ID + + const label = context.payload.label ? context.payload.label.name : null; + + if (!label) { + console.log("No label found in the payload."); + return; + } + const prNodeId = context.payload.pull_request.node_id; + + // Get the project item for this PR + const { repository } = await github.graphql(` + query($owner: String!, $repo: String!, $prNumber: Int!) { + repository(owner: $owner, name: $repo) { + pullRequest(number: $prNumber) { + projectItems(first: 10) { + nodes { + id + fieldValues(first: 10) { + nodes { + field { + name + } + ... on ProjectV2ItemFieldDateValue { + date + } + ... on ProjectV2ItemFieldTextValue { + text + } + ... on ProjectV2ItemFieldSingleSelectValue { + name + } + } + } + } + } + + `, { + owner: context.repo.owner, + repo: context.repo.repo, + prNumber: context.issue.number, + }); + + const item = repository.pullRequest.projectItems.nodes[0]; + if (!item) { + console.log("No project item found for this PR."); + return; + } + + const itemId = item.id; + + const today = new Date().toISOString().split("T")[0]; // e.g., "2025-04-10" + + if (label === "awaiting_tech_review") { + console.log("Setting Start Date..."); + await github.graphql(` + mutation { + updateProjectV2ItemFieldValue(input: { + projectId: "${projectId}", + itemId: "${itemId}", + fieldId: "${fieldStartId}", + value: { date: "${today}" } + }) { + projectV2Item { + id + } + } + } + `); + } + + if (label === "publish") { + console.log("Setting Publish Date..."); + await github.graphql(` + mutation { + updateProjectV2ItemFieldValue(input: { + projectId: "${projectId}", + itemId: "${itemId}", + fieldId: "${fieldPublishId}", + value: { date: "${today}" } + }) { + projectV2Item { + id + } + } + } + `); + } diff --git a/.gitignore b/.gitignore index 79dcdce94f..c92386632d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,20 @@ node_modules/ package-lock.json .hugo_build.lock .vscode +.env +startup.sh # macOS files *.DS_Store nohup.out -venv/ \ No newline at end of file +venv/ +z_local_saved/ +/.idea/ +/tools/.python-version +/.python-version +*.iml +*.xml + +# CTags symbol index +tags diff --git a/.wordlist.txt b/.wordlist.txt index b9e309625b..4c06eab2bd 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -3558,4 +3558,412 @@ threadCount threadNum useAPL vvenc -workspaces \ No newline at end of file +workspaces +ETDump +ETRecord +FAISS +IVI +PDFs +Powertrain +SpinTheCubeInGDI +TaaS +cloudsdk +highcpu +proj +sln +uploader +AAPCS +AOvVaw +ASR +AoT +Authtoken +Bc +ConstraintLayout +DIMPL +DNNL +Damo +Disambiguating +FMMLA +FunASR +FunASR's +GAxUDSKQEHfyWClAQFnoECA +ImageOperation +ImageProcessor +Inductor +KleidiCV +ModelScope +NOPASSWD +OSCI +PMUs +PUNC +PWD +Paraformer +PerformanceMetrics +ProfilerActivity +QAQ +RemoteImage +STT +Sobel's +SystemC +VAD +VER +VL +VSIX +ViTFeatureExtractor +ViTForImageClassification +Webhook +YPQ +aG +aQsHmumnZykaFxM +aaa +aaaaa +adduser +afc +ahUKEwisi +alpineImage +asr +authtoken +autoregressive +baremetal +chpasswd +cn +codebases +combobox +compileSdk +csv +da +dai +databinding +deallocated +debconf +debuggability +defsym +demangle +durations +dy +f'Predicted +fcb +fmopa +fsSL +hotspot +idx +iic +impl +inductor +inferencing +inout +instain +intr +kickstart +kleidicv +kleidicvdemo +lcrt +lsemihost +lst +modelscope +modularity +mymodel +nanoTime +nat +ngrok +nostartfiles +opi +paraformer +picolibc +preprocessor +punc +rct +recommender +rtti +semihost +sme +svcntsw +tvb +uninstallation +usermod +usg +vad +ved +ver +vit +wav +za +zh +ACM +APs +ASG +AutoModelForSpeechSeq +AutoProcessor +Avin +Bioinformatics +CDK +Dropbear +DxeCore +EFI +FFTW +HMMER +ILP +IoC +Jython +LCP +Maranget +Minimap +NFS +NVPL +OMP +OSR +OneAPI +OpenRNG +OpenSSH +Phttps +RNG +Runbook +SSM +Shrinkwrap +Shrinkwrap's +TSO +TSan +TSan's +ThreadSanitizer +Toolkits +ULP +ULPs +VSL +Yury +Zarlez +ada +armtest +atomicity +autoscaling +cmath +cuBLAS +cuDNN +distro's +dtype +dxecore +foir +fourier +getter +libm +miniconda +msg +nInferencing +oneAPI +oneapi +openai +pseudorandom +quasirandom +reorderings +rootfs +runbook +safetensors +superset +sysroot +testroot +threadsanitizercppmanual +toolchain's +transpiles +vectorstore +vlen +vv +webhook +xE +Baichuan +Checkpointing +Choi +CustomData +Das +DataCollatorForSeq +DingTalk +FFXM +FSR +FastLanguageModel +FeaturedContent +FfxmFsr +FurthestReflectionCaptureDistance +GBuffer +GLES +HLSL +Halton +JITTERED +JKS +Jitter +KHR +LoFTQ +LoRA +MNN +MSM +MTL +MaliManga +Mip +Mipmap +NDC +PEFT +Parichay +QLoRA +Qianwen +RCAS +RLHF +RelaxedPrecision +RenderTargets +SFT +SFTTrainer +ScreenPercentage +ShaderQualityMode +ShareGPT +Shuheng +TAA +Taobao +TemporalUpscaler +ThirdParty +Tmall +Tokenize +TrainingArguments +UVs +Unsloth +Upscaling +UpscalingRatio +VRAM +XD +Xianyu +Youku +Zhipu +aar +adamw +agentic +antialiasing +arxiv +csn +docstring +ffx +func +getPipelinePermutationFlags +ggml +hoc +jitter +jittered +jittering +lastestlora +luminance +mipmap +mnn +motionVectorScale +mutators +proc +qwen +raytraced +reactiveness +renderdoc +renderers +sharegpt +sym +tokenization +tokenize +tokenizes +tokenizing +tonemapped +tonemapping +trl +unjittered +unsloth +upscaled +upscalers +upscales +upscaling +vl +webbot +APKs +ASR's +DLRM +DLRMv +DeepSeek +Geremy +MERCHANTABILITY +MoE +NONINFRINGEMENT +NaN +OCPU +OCaml +Ollama +Ollama's +Prefill +Unsloth’s +YAMLs +Yiyang +bartowski +bc +checkboxes +deepseek +diy +fenv +gguf +highmem +inria +lfs +lora +ollama +opam +perceptrons +personalization +rclone +screenspace +significand +stdbuf +sublicense +tok +truncations +ulp +unmangled +unportable +zeropoint +AO +Autoware +CCC +ECUs +HTTPs +Hawksbill +HelloworldPublisher +HelloworldSubscriber +IMU +Jalisco +LiDAR +OTA +OpenAD +OpenADKit +ROS +RViz +Rviz +SDV +SDVs +SOAFEE +SSO +Unsloth’s +Veraison's +amazonq +autoware +autowarefoundation +casted +certifiability +codewhisperer +cyclonedds +distros +dlrm +musl +openadkit +printenv +qdeveloper +ros +rviz +testbed +ug +vnc +Acyclic +Bedrust +MLPerf's +bedrust +darko +mesaros +multilayer +renderbuffer +rosdep +suboptimally \ No newline at end of file diff --git a/README.md b/README.md index fb65046964..f2934b727d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The Learning Paths created here are maintained by Arm and the Arm software devel All contributions are welcome as long as they relate to software development for the Arm architecture. * Write a Learning Path (or improve existing content) - * Fork this repo and submit pull requests; follow the step by step instructions in [Create a Learning Path](https://learn.arm.com//learning-paths/cross-platform/_example-learning-path/) on the website. + * Fork this repo and submit pull requests; follow the step by step instructions in [Create a Learning Path](https://learn.arm.com/learning-paths/cross-platform/_example-learning-path/) on the website. * Ideas for a new Learning Path * Create a new GitHub idea under the [Discussions](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/discussions) area in this GitHub repo. * Log a code issue (or other general issues) diff --git a/archetypes/learning-path/_index.md b/archetypes/learning-path/_index.md index cb9ffb0e50..ec8f0e4589 100644 --- a/archetypes/learning-path/_index.md +++ b/archetypes/learning-path/_index.md @@ -13,7 +13,7 @@ prerequisites: - PLACEHOLDER PREREQ 1 - PLACEHOLDER PREREQ 2 -author_primary: PLACEHOLDER NAME +author: PLACEHOLDER NAME ### Tags skilllevels: PLACEHOLDER SKILLLEVEL @@ -28,6 +28,23 @@ operatingsystems: - PLACEHOLDER OS G + +further_reading: + - resource: + title: PLACEHOLDER MANUAL + link: PLACEHOLDER MANUAL LINK + type: documentation + - resource: + title: PLACEHOLDER BLOG + link: PLACEHOLDER BLOG LINK + type: blog + - resource: + title: PLACEHOLDER GENERAL WEBSITE + link: PLACEHOLDER GENERAL WEBSITE LINK + type: website + + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/archetypes/learning-path/_next-steps.md b/archetypes/learning-path/_next-steps.md index c4ae77cc92..c3db0de5a2 100644 --- a/archetypes/learning-path/_next-steps.md +++ b/archetypes/learning-path/_next-steps.md @@ -1,27 +1,8 @@ --- -next_step_guidance: PLACEHOLDER TEXT 1 - -recommended_path: /learning-paths/PLACEHOLDER_CATEGORY/PLACEHOLDER_LEARNING_PATH/ - -further_reading: - - resource: - title: PLACEHOLDER MANUAL - link: PLACEHOLDER MANUAL LINK - type: documentation - - resource: - title: PLACEHOLDER BLOG - link: PLACEHOLDER BLOG LINK - type: blog - - resource: - title: PLACEHOLDER GENERAL WEBSITE - link: PLACEHOLDER GENERAL WEBSITE LINK - type: website - - # ================================================================================ -# FIXED, DO NOT MODIFY +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/assets/contributors.csv b/assets/contributors.csv index a3a1425fda..1d0b48cc52 100644 --- a/assets/contributors.csv +++ b/assets/contributors.csv @@ -15,6 +15,7 @@ Julie Gaskin,Arm,,,, Pranay Bakre,Arm,,,, Elham Harirpoush,Arm,,,, Frédéric -lefred- Descamps,OCI,,,,lefred.be +Fr�d�ric -lefred- Descamps,OCI,,,,lefred.be Kristof Beyls,Arm,,,, David Spickett,Arm,,,, Uma Ramalingam,Arm,uma-ramalingam,,, @@ -22,7 +23,7 @@ Konstantinos Margaritis,VectorCamp,markos,konstantinosmargaritis,@freevec1,https Diego Russo,Arm,diegorusso,diegor,diegor,https://www.diegor.it Jonathan Davies,Arm,,,, Zhengjun Xing,Arm,,,, -Diego Russo and Leandro Nunes,Arm,,,, +Leandro Nunes,Arm,,,, Dawid Borycki,,dawidborycki,,, Ying Yu,Arm,,,, Bolt Liu,Arm,,,, @@ -46,7 +47,40 @@ Alaaeddine Chakroun,Day Devs,Alaaeddine-Chakroun,alaaeddine-chakroun,,https://da Koki Mitsunami,Arm,,kmitsunami,, Chen Zhang,Zilliz,,,, Tianyu Li,Arm,,,, -Georgios Mermigkis,VectorCamp,gMerm,georgios-mermigkis,,https://vectorcamp.gr/ +Georgios Mermigkis,VectorCamp,gMerm,georgios-mermigkis,,https://vectorcamp.gr/ Ben Clark,Arm,,,, Han Yin,Arm,hanyin-arm,nacosiren,, Willen Yang,Arm,,,, +Daniel Gubay,,,,, +Paul Howard,,,,, +Iago Calvo Lista,Arm,,,, +Stephen Theobald,Arm,,,, +ThirdAI,,,,, +Preema Merlin Dsouza,,,,, +Dominica Abena O. Amanfo,,,,, +Arm,,,,, +Albin Bernhardsson,,,,, +Przemyslaw Wirkus,,,,, +Zach Lasiuk,,,,, +Daniel Nguyen,,,,, +Joe Stech,Arm,JoeStech,joestech,, +visualSilicon,,,,, +Konstantinos Margaritis,VectorCamp,,,, +Kieran Hejmadi,,,,, +Alex Su,,,,, +Chaodong Gong,,,,, +Owen Wu,Arm,,,, +Koki Mitsunami,,,,, +Nikhil Gupta,,,,, +Nobel Chowdary Mandepudi,Arm,,,, +Ravi Malhotra,Arm,,,, +Masoud Koleini,,,,, +Na Li,Arm,,,, +Tom Pilar,,,,, +Cyril Rohr,,,,, +Odin Shen,Arm,odincodeshen,odin-shen-lmshen,, +Avin Zarlez,Arm,AvinZarlez,avinzarlez,,https://www.avinzarlez.com/ +Shuheng Deng,Arm,,,, +Yiyang Fan,Arm,,,, +Julien Jayat,Arm,,,, +Geremy Cohen,Arm,geremyCohen,geremyinanutshell,, diff --git a/assets/css/demo.css b/assets/css/demo.css index 738441e6f5..27853c9886 100644 --- a/assets/css/demo.css +++ b/assets/css/demo.css @@ -5,7 +5,7 @@ margin-top: 16px; min-width: 200px; - min-height: 200px; + min-height: 150px; text-align: center; } @@ -264,14 +264,19 @@ margin-bottom: 8px; line-height: 1.3; } +.chatbot-response-text li { + margin-bottom: 0; +} +.chatbot-response-text ul, .chatbot-response-text ol { + line-height: 0.4; +} + #notification-popup { position: absolute; - /*top: -34px;*/ - bottom: 46px; /* 66 at 2 lines....86 at 3 lines....106px at 4 lines */ left: 0; width: calc(100% - 32px); /* Subtract gutter space from width */ @@ -294,6 +299,13 @@ transition: opacity 1s ease-in-out; /* Fade-in effect */ visibility: hidden; } +#notification-popup.chatbot { + bottom: 46px; /* 66 at 2 lines....86 at 3 lines....106px at 4 lines */ +} +#notification-popup.audio { + bottom: -8px; /* 66 at 2 lines....86 at 3 lines....106px at 4 lines */ +} + #initial-message-span { font-size: 16px; } @@ -332,10 +344,74 @@ +/**************************************************/ +/* Whisper audio demo components */ +#audio-icon-div { + cursor: pointer; +} +#audio-action-icon { + font-size: 65px; +} +#audio-playback { +} + +#audio-playback-substitute { + margin: 8px; + height: 90px; + display: flex; + flex-direction: column; + justify-content: flex-end; /* Push content to the bottom */ +} +#audio-playback-substitute.empty { + border: 1px solid var(--arm-dark-grey); +} +#audio-playback-substitute.full { + border: none; +} + +#audio-action-icon { + color: var(--arm-light-blue); +} +#audio-action-icon.pulse { + animation: pulse 1s infinite; +} + +@keyframes pulse { + 0% { + color: red; + } + 50% { + color: #ffcccc; /* Even lighter shade of red */ + } + 100% { + color: red; + } +} + +#audio-action-icon.pulse { + animation: pulse 2s infinite; /* Slower and more natural pulse */ +} +#transcription-div { + text-align: left; + margin: 8px; + width: 95%; +} + +#transcription-p { + font-size: 24px!important; + margin-left: 8px; +} +#transcription-p.placeholder { + color: #ccc; + font-style: italic; + margin-bottom: 64px; +} +/**************************************************/ + diff --git a/assets/css/feedback.css b/assets/css/feedback.css index 67bbd2f590..9e5f0b2cad 100644 --- a/assets/css/feedback.css +++ b/assets/css/feedback.css @@ -1,7 +1,6 @@ #feedback-container { min-height: 200px; - } /****************************************************/ diff --git a/assets/css/prism-dark.css b/assets/css/prism-dark.css index e61f5835a9..b026f20b0f 100644 --- a/assets/css/prism-dark.css +++ b/assets/css/prism-dark.css @@ -1,9 +1,541 @@ /* PrismJS 1.29.0 https://prismjs.com/download.html#themes=prism-twilight&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+armasm+arturo+asciidoc+aspnet+asm6502+asmatmel+autohotkey+autoit+avisynth+avro-idl+awk+bash+basic+batch+bbcode+bbj+bicep+birb+bison+bnf+bqn+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+cilkc+cilkcpp+clojure+cmake+cobol+coffeescript+concurnas+csp+cooklang+coq+crystal+css-extras+csv+cue+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gap+gcode+gdscript+gedcom+gettext+gherkin+git+glsl+gn+linker-script+go+go-module+gradle+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+hoon+http+hpkp+hsts+ichigojam+icon+icu-message-format+idris+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keepalived+keyman+kotlin+kumir+kusto+latex+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+magma+makefile+markdown+markup-templating+mata+matlab+maxscript+mel+mermaid+metafont+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+odin+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plant-uml+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+cshtml+jsx+tsx+reason+regex+rego+renpy+rescript+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+stata+iecst+stylus+supercollider+swift+systemd+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+tremor+turtle+twig+typescript+typoscript+unrealscript+uorazor+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+web-idl+wgsl+wiki+wolfram+wren+xeora+xml-doc+xojo+xquery+yaml+yang+zig&plugins=line-highlight+line-numbers+autolinker+highlight-keywords+command-line+normalize-whitespace+toolbar+copy-to-clipboard+treeview */ -code[class*=language-],pre[class*=language-]{color:#fff;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;text-shadow:0 -.1em .2em #000;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}:not(pre)>code[class*=language-],pre[class*=language-]{background:#141414}pre[class*=language-]{border-radius:.5em;border:.3em solid #545454;box-shadow:1px 1px .5em #000 inset;margin:.5em 0;overflow:auto;padding:1em}pre[class*=language-]::-moz-selection{background:#27292a}pre[class*=language-]::selection{background:#27292a}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:hsla(0,0%,93%,.15)}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:hsla(0,0%,93%,.15)}:not(pre)>code[class*=language-]{border-radius:.3em;border:.13em solid #545454;box-shadow:1px 1px .3em -.1em #000 inset;padding:.15em .2em .05em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#777}.token.punctuation{opacity:.7}.token.namespace{opacity:.7}.token.boolean,.token.deleted,.token.number,.token.tag{color:#ce6849}.token.builtin,.token.constant,.token.keyword,.token.property,.token.selector,.token.symbol{color:#f9ed99}.language-css .token.string,.style .token.string,.token.attr-name,.token.attr-value,.token.char,.token.entity,.token.inserted,.token.operator,.token.string,.token.url,.token.variable{color:#909e6a}.token.atrule{color:#7385a5}.token.important,.token.regex{color:#e8c062}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.language-markup .token.attr-name,.language-markup .token.punctuation,.language-markup .token.tag{color:#ac885c}.token{position:relative;z-index:1}.line-highlight.line-highlight{background:hsla(0,0%,33%,.25);background:linear-gradient(to right,hsla(0,0%,33%,.1) 70%,hsla(0,0%,33%,0));border-bottom:1px dashed #545454;border-top:1px dashed #545454;margin-top:.75em;z-index:0}.line-highlight.line-highlight:before,.line-highlight.line-highlight[data-end]:after{background-color:#8693a6;color:#f4f1ef} -pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:#f4f1ef;font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:after,.line-numbers .line-highlight:before{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:rgba(128,128,128,.2)} -pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right} -.token a{color:inherit} -.command-line-prompt{border-right:1px solid #999;display:block;float:left;font-size:100%;letter-spacing:-1px;margin-right:1em;pointer-events:none;text-align:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.command-line-prompt>span:before{opacity:.7;content:' ';display:block;padding-right:.8em}.command-line-prompt>span[data-user]:before{content:"[" attr(data-user) "@" attr(data-host) "] $"}.command-line-prompt>span[data-user=root]:before{content:"[" attr(data-user) "@" attr(data-host) "] #"}.command-line-prompt>span[data-prompt]:before{content:attr(data-prompt)}.command-line-prompt>span[data-continuation-prompt]:before{content:attr(data-continuation-prompt)}.command-line span.token.output{opacity:.7} -div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none} -.token.treeview-part .entry-line{position:relative;text-indent:-99em;display:inline-block;vertical-align:top;width:1.2em}.token.treeview-part .entry-line:before,.token.treeview-part .line-h:after{content:"";position:absolute;top:0;left:50%;width:50%;height:100%}.token.treeview-part .line-h:before,.token.treeview-part .line-v:before{border-left:1px solid #ccc}.token.treeview-part .line-v-last:before{height:50%;border-left:1px solid #ccc;border-bottom:1px solid #ccc}.token.treeview-part .line-h:after{height:50%;border-bottom:1px solid #ccc}.token.treeview-part .entry-name{position:relative;display:inline-block;vertical-align:top}.token.treeview-part .entry-name.dotfile{opacity:.5}@font-face{font-family:PrismTreeview;src:url(data:application/font-woff;base64,d09GRgABAAAAAAgYAAsAAAAAEGAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPwAAAFY1UkH9Y21hcAAAAYQAAAB/AAACCtvO7yxnbHlmAAACBAAAA+MAAAlACm1VqmhlYWQAAAXoAAAAKgAAADZfxj5jaGhlYQAABhQAAAAYAAAAJAFbAMFobXR4AAAGLAAAAA4AAAA0CGQAAGxvY2EAAAY8AAAAHAAAABwM9A9CbWF4cAAABlgAAAAfAAAAIAEgAHZuYW1lAAAGeAAAATcAAAJSfUrk+HBvc3QAAAewAAAAZgAAAIka0DSfeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGRYyjiBgZWBgaGQoRZISkLpUAYOBj0GBiYGVmYGrCAgzTWFweEV4ysehs1ArgDDFgZGIA3CDAB2tQjAAHic7ZHLEcMwCESfLCz/VEoKSEE5parURxMOC4c0Ec283WGFdABgBXrwCAzam4bOK9KWeefM3Hhmjyn3ed+hTRq1pS7Ra/HjYGPniHcXMy4G/zNTP7/KW5HTXArkvdBW3ArN19dCG/NRIN8K5HuB/CiQn4U26VeBfBbML9NEH78AeJyVVc1u20YQ3pn905JcSgr/YsuSDTEg3cR1bFEkYyS1HQcQ2jQF2hot6vYSoECKnnPLA/SWUy9NTr31Bfp+6azsNI0SGiolzu7ODnfn+2Z2lnHG3rxhr9nfLGKbLGesncAYYnUHpsVnMG/uwyzNdFIVd6HI6twp8+R3LpT4TSglLoTHwwJgG2/dFvKrl9yI507/p5CCq4LTxB/PlPjkFaMHnWB/0S9je7RTPS+utnGtom1T2q5pk/e3H0M1S18rsXAL7wgpxQuhAmteGGvNjmcfGXuwnFNOPCXxeOGmnjrBLWNyBeNtVq2Hs03yus1aPS3mzSyNVSfu588iW1Q93x/4fjcHn+5EkS2tMxr4xIRa8ese+4L9uKZnxEqs8+ldyN9atU02a5t5uQ8hZGms1QTKpaKYqnipiNNOAIeIADC0JNEOYY+jtSgFoOchiAjRGFACpUTRje8bwIYWGCDEgENY8MEu9bnCYCdAxftoNg0KiSpUtPaHcanYwzXRu6T4r40b5npal3V7UHWCPJW9niyl1vIHgoujEXZjudBkeWkOeMQBRmbEPhKzij1i52t6/TadL+3q7H0U1eq4E8cG4gIIwQLx8VX7ToPXgPrehVc5QXHR7gMSmwjKfaYAP4KvZV+yn9bE18y2IY37LvtyrSg3i7ZK++B603ndlg/gBJpZRsfpBI6hyiaQ6FjlnThz8lAC3LgBIMnXDOAXxBQ4SIgiEhx2AcGCAwAhwjXRpCQms42bwAUt75BvAwgONzdgOfWEwzk4Ylzj4mz+5YEzzXzWX9aNlk7ot65y5QnBHsNlm6zDTu7sspRqG4V+fgJ1lVBZ07Nm7s5nemo3Lf3PO7iwtnroQ5/YDGwPRUip6fV6L+27p+wCHwSvPs85UnHqId8NAn5IBsKdv95KrL9m31Gsf2a/rluDslk1y1J9GE+LUmmVT/OyOHaFKGnapt2H5XeJTmKd6qYNoVVZOy+pWzr7rMip3ndG/4mQSoUcMbAqG/YNIAdXhkAqTVruXhocSKN0iS4Rwj7vSS4fcF/La07BfeQSuRAcFeW+9igjwPhhYPpGCBCBHhxiKMyFMFT7ziRH7RtfIWdiha+TdW+Rqs7bLHdN2ZJIKl0um0x3op9saYr0REeRdj09pl43pMzz4tjztrY8L4o8bzT+oLY27PR/eFtXs/YY5vtwB5Iqad14eYN0ujveMaGWqkdU3TKbQSC5Uvxaf4fA7SAQ3r2tEfIhd4duld91bwMisjqBw22orthNcroXl7KqO1329HBgAexgoCfGAwiDPoBnriki3lmNojrzvD0tjo6E3vPYP6E2BMIAeJxjYGRgYADiY8t3FsTz23xl4GbYzIAB/v9nWM6wBcjgYGAC8QH+QQhZAAB4nGNgZGBg2MzAACeXMzAyoAJeADPyAh14nGNgAILNpGEA0fgIZQAAAAAAAAA2AHIAvgE+AZgCCAKMAv4DlgPsBEYEoHicY2BkYGDgZchi4GQAASYg5gJCBob/YD4DABTSAZcAeJx9kU1uwjAQhV/4qwpqhdSqi67cTTeVEmBXDgBbhBD7AHYISuLUMSD2PUdP0HNwjp6i676k3qQS9Ujjb968mYUNoI8zPJTHw02Vy9PAFatfbpLuHbfIT47b6MF33KH+6riLF0wc93CHN27wWtdUHvHuuIFbfDhuUv903CKfHbfxgC/HHerfjrtYen3HPTx7ambiIl0YKQ+xPM5ltE9CU9NqxVKaItaZGPqDmj6VmTShlRuxOoniEI2sVUIZnYqJzqxMEi1yo3dybf2ttfk4CJTT/bVOMYNBjAIpFiTJOLCWOGLOHGGPBCE7l32XO0tmw04MjQwCQ7774B//lDmrZkJY3hvOrHBiLuiJMKJqoVgrejQ3CP5Yubt0JwxNJa96Oypr6j621VSOMQKG+uP36eKmHylcb0MAeJxtwdEOgjAMBdBeWEFR/Mdl7bTJtMsygc/nwVfPoYF+QP+tGDAigDFhxgVXLLjhjhUPCtmKTtmLaGN7x6dy/Io5bybqoevRQ3LRObb0sk3HKpn1SFqW6ru26vbpYfcmRCccJhqsAAA=) format("woff")}.token.treeview-part .entry-name:before{content:"\ea01";font-family:PrismTreeview;font-size:inherit;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:2.5ex;display:inline-block}.token.treeview-part .entry-name.dir:before{content:"\ea02"}.token.treeview-part .entry-name.ext-bmp:before,.token.treeview-part .entry-name.ext-eps:before,.token.treeview-part .entry-name.ext-gif:before,.token.treeview-part .entry-name.ext-jpe:before,.token.treeview-part .entry-name.ext-jpeg:before,.token.treeview-part .entry-name.ext-jpg:before,.token.treeview-part .entry-name.ext-png:before,.token.treeview-part .entry-name.ext-svg:before,.token.treeview-part .entry-name.ext-tiff:before{content:"\ea03"}.token.treeview-part .entry-name.ext-cfg:before,.token.treeview-part .entry-name.ext-conf:before,.token.treeview-part .entry-name.ext-config:before,.token.treeview-part .entry-name.ext-csv:before,.token.treeview-part .entry-name.ext-ini:before,.token.treeview-part .entry-name.ext-log:before,.token.treeview-part .entry-name.ext-md:before,.token.treeview-part .entry-name.ext-nfo:before,.token.treeview-part .entry-name.ext-txt:before{content:"\ea06"}.token.treeview-part .entry-name.ext-asp:before,.token.treeview-part .entry-name.ext-aspx:before,.token.treeview-part .entry-name.ext-c:before,.token.treeview-part .entry-name.ext-cc:before,.token.treeview-part .entry-name.ext-cpp:before,.token.treeview-part .entry-name.ext-cs:before,.token.treeview-part .entry-name.ext-css:before,.token.treeview-part .entry-name.ext-h:before,.token.treeview-part .entry-name.ext-hh:before,.token.treeview-part .entry-name.ext-htm:before,.token.treeview-part .entry-name.ext-html:before,.token.treeview-part .entry-name.ext-jav:before,.token.treeview-part .entry-name.ext-java:before,.token.treeview-part .entry-name.ext-js:before,.token.treeview-part .entry-name.ext-php:before,.token.treeview-part .entry-name.ext-rb:before,.token.treeview-part .entry-name.ext-xml:before{content:"\ea07"}.token.treeview-part .entry-name.ext-7z:before,.token.treeview-part .entry-name.ext-bz2:before,.token.treeview-part .entry-name.ext-bz:before,.token.treeview-part .entry-name.ext-gz:before,.token.treeview-part .entry-name.ext-rar:before,.token.treeview-part .entry-name.ext-tar:before,.token.treeview-part .entry-name.ext-tgz:before,.token.treeview-part .entry-name.ext-zip:before{content:"\ea08"}.token.treeview-part .entry-name.ext-aac:before,.token.treeview-part .entry-name.ext-au:before,.token.treeview-part .entry-name.ext-cda:before,.token.treeview-part .entry-name.ext-flac:before,.token.treeview-part .entry-name.ext-mp3:before,.token.treeview-part .entry-name.ext-oga:before,.token.treeview-part .entry-name.ext-ogg:before,.token.treeview-part .entry-name.ext-wav:before,.token.treeview-part .entry-name.ext-wma:before{content:"\ea04"}.token.treeview-part .entry-name.ext-avi:before,.token.treeview-part .entry-name.ext-flv:before,.token.treeview-part .entry-name.ext-mkv:before,.token.treeview-part .entry-name.ext-mov:before,.token.treeview-part .entry-name.ext-mp4:before,.token.treeview-part .entry-name.ext-mpeg:before,.token.treeview-part .entry-name.ext-mpg:before,.token.treeview-part .entry-name.ext-ogv:before,.token.treeview-part .entry-name.ext-webm:before{content:"\ea05"}.token.treeview-part .entry-name.ext-pdf:before{content:"\ea09"}.token.treeview-part .entry-name.ext-xls:before,.token.treeview-part .entry-name.ext-xlsx:before{content:"\ea0a"}.token.treeview-part .entry-name.ext-doc:before,.token.treeview-part .entry-name.ext-docm:before,.token.treeview-part .entry-name.ext-docx:before{content:"\ea0c"}.token.treeview-part .entry-name.ext-pps:before,.token.treeview-part .entry-name.ext-ppt:before,.token.treeview-part .entry-name.ext-pptx:before{content:"\ea0b"} +code[class*=language-], +pre[class*=language-] { + color: #fff; + background: 0 0; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + font-size: 1em; + text-align: left; + text-shadow: 0 -.1em .2em #000; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none +} + +:not(pre)>code[class*=language-], +pre[class*=language-] { + background: #141414 +} + +pre[class*=language-] { + border-radius: .5em; + border: .3em solid #545454; + box-shadow: 1px 1px .5em #000 inset; + margin: .5em 0; + overflow: auto; + padding: 1em +} + +pre[class*=language-]::-moz-selection { + background: #27292a +} + +pre[class*=language-]::selection { + background: #27292a +} + +code[class*=language-] ::-moz-selection, +code[class*=language-]::-moz-selection, +pre[class*=language-] ::-moz-selection, +pre[class*=language-]::-moz-selection { + text-shadow: none; + background: hsla(0, 0%, 93%, .15) +} + +code[class*=language-] ::selection, +code[class*=language-]::selection, +pre[class*=language-] ::selection, +pre[class*=language-]::selection { + text-shadow: none; + background: hsla(0, 0%, 93%, .15) +} + +:not(pre)>code[class*=language-] { + border-radius: .3em; + border: .13em solid #545454; + box-shadow: 1px 1px .3em -.1em #000 inset; + padding: .15em .2em .05em; + white-space: pre +} + +.token.cdata, +.token.comment, +.token.doctype, +.token.prolog { + color: #777 +} + +.token.punctuation { + opacity: .7 +} + +.token.namespace { + opacity: .7 +} + +.token.boolean, +.token.deleted, +.token.number, +.token.tag { + color: #ce6849 +} + +.token.builtin, +.token.constant, +.token.keyword, +.token.property, +.token.selector, +.token.symbol { + color: #f9ed99 +} + +.language-css .token.string, +.style .token.string, +.token.attr-name, +.token.attr-value, +.token.char, +.token.entity, +.token.inserted, +.token.operator, +.token.string, +.token.url, +.token.variable { + color: #909e6a +} + +.token.atrule { + color: #7385a5 +} + +.token.important, +.token.regex { + color: #e8c062 +} + +.token.bold, +.token.important { + font-weight: 700 +} + +.token.italic { + font-style: italic +} + +.token.entity { + cursor: help +} + +.language-markup .token.attr-name, +.language-markup .token.punctuation, +.language-markup .token.tag { + color: #ac885c +} + +.token { + position: relative; + z-index: 1 +} + +.line-highlight.line-highlight { + background: hsla(0, 0%, 33%, .25); + background: linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0)); + border-bottom: 1px dashed #545454; + border-top: 1px dashed #545454; + margin-top: .75em; + z-index: 0 +} + +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { + background-color: #8693a6; + color: #f4f1ef +} + +pre[data-line] { + position: relative; + padding: 1em 0 1em 3em +} + +.line-highlight { + position: absolute; + left: 0; + right: 0; + padding: inherit 0; + margin-top: 1em; + background: hsla(24, 20%, 50%, .08); + background: linear-gradient(to right, hsla(24, 20%, 50%, .1) 70%, hsla(24, 20%, 50%, 0)); + pointer-events: none; + line-height: inherit; + white-space: pre +} + +@media print { + .line-highlight { + -webkit-print-color-adjust: exact; + color-adjust: exact + } +} + +.line-highlight:before, +.line-highlight[data-end]:after { + content: attr(data-start); + position: absolute; + top: .4em; + left: .6em; + min-width: 1em; + padding: 0 .5em; + background-color: hsla(24, 20%, 50%, .4); + color: #f4f1ef; + font: bold 65%/1.5 sans-serif; + text-align: center; + vertical-align: .3em; + border-radius: 999px; + text-shadow: none; + box-shadow: 0 1px #fff +} + +.line-highlight[data-end]:after { + content: attr(data-end); + top: auto; + bottom: .4em +} + +.line-numbers .line-highlight:after, +.line-numbers .line-highlight:before { + content: none +} + +pre[id].linkable-line-numbers span.line-numbers-rows { + pointer-events: all +} + +pre[id].linkable-line-numbers span.line-numbers-rows>span:before { + cursor: pointer +} + +pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before { + background-color: rgba(128, 128, 128, .2) +} + +pre[class*=language-].line-numbers { + position: relative; + padding-left: 3.8em; + counter-reset: linenumber +} + +pre[class*=language-].line-numbers>code { + position: relative; + white-space: inherit +} + +.line-numbers .line-numbers-rows { + position: absolute; + pointer-events: none; + top: 0; + font-size: 100%; + left: -3.8em; + width: 3em; + letter-spacing: -1px; + border-right: 1px solid #999; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none +} + +.line-numbers-rows>span { + display: block; + counter-increment: linenumber +} + +.line-numbers-rows>span:before { + content: counter(linenumber); + color: #999; + display: block; + padding-right: .8em; + text-align: right +} + +.token a { + color: inherit +} + +.command-line-prompt { + border-right: 1px solid #999; + display: block; + float: left; + font-size: 100%; + letter-spacing: -1px; + margin-right: 1em; + pointer-events: none; + text-align: right; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none +} + +.command-line-prompt>span:before { + opacity: .7; + content: ' '; + display: block; + padding-right: .8em +} + +.command-line-prompt>span[data-user]:before { + content: "[" attr(data-user) "@" attr(data-host) "] $" +} + +.command-line-prompt>span[data-user=root]:before { + content: "[" attr(data-user) "@" attr(data-host) "] #" +} + +.command-line-prompt>span[data-prompt]:before { + content: attr(data-prompt) +} + +.command-line-prompt>span[data-continuation-prompt]:before { + content: attr(data-continuation-prompt) +} + +.command-line span.token.output { + opacity: .7 +} + +div.code-toolbar { + position: relative +} + +div.code-toolbar>.toolbar { + position: absolute; + z-index: 10; + top: .3em; + right: .2em; + transition: opacity .3s ease-in-out; + opacity: 0 +} + +div.code-toolbar:hover>.toolbar { + opacity: 1 +} + +div.code-toolbar:focus-within>.toolbar { + opacity: 1 +} + +div.code-toolbar>.toolbar>.toolbar-item { + display: inline-block +} + +div.code-toolbar>.toolbar>.toolbar-item>a { + cursor: pointer +} + +div.code-toolbar>.toolbar>.toolbar-item>button { + background: 0 0; + border: 0; + color: inherit; + font: inherit; + line-height: normal; + overflow: visible; + padding: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none +} + +div.code-toolbar>.toolbar>.toolbar-item>a, +div.code-toolbar>.toolbar>.toolbar-item>button, +div.code-toolbar>.toolbar>.toolbar-item>span { + color: #bbb; + font-size: .8em; + padding: 0 .5em; + background: #f5f2f0; + background: rgba(224, 224, 224, .2); + box-shadow: 0 2px 0 0 rgba(0, 0, 0, .2); + border-radius: .5em +} + +div.code-toolbar>.toolbar>.toolbar-item>a:focus, +div.code-toolbar>.toolbar>.toolbar-item>a:hover, +div.code-toolbar>.toolbar>.toolbar-item>button:focus, +div.code-toolbar>.toolbar>.toolbar-item>button:hover, +div.code-toolbar>.toolbar>.toolbar-item>span:focus, +div.code-toolbar>.toolbar>.toolbar-item>span:hover { + color: inherit; + text-decoration: none +} + +.token.treeview-part .entry-line { + position: relative; + text-indent: -99em; + display: inline-block; + vertical-align: top; + width: 1.2em +} + +.token.treeview-part .entry-line:before, +.token.treeview-part .line-h:after { + content: ""; + position: absolute; + top: 0; + left: 50%; + width: 50%; + height: 100% +} + +.token.treeview-part .line-h:before, +.token.treeview-part .line-v:before { + border-left: 1px solid #ccc +} + +.token.treeview-part .line-v-last:before { + height: 50%; + border-left: 1px solid #ccc; + border-bottom: 1px solid #ccc +} + +.token.treeview-part .line-h:after { + height: 50%; + border-bottom: 1px solid #ccc +} + +.token.treeview-part .entry-name { + position: relative; + display: inline-block; + vertical-align: top +} + +.token.treeview-part .entry-name.dotfile { + opacity: .5 +} + +@font-face { + font-family: PrismTreeview; + src: url(data:application/font-woff;base64,d09GRgABAAAAAAgYAAsAAAAAEGAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPwAAAFY1UkH9Y21hcAAAAYQAAAB/AAACCtvO7yxnbHlmAAACBAAAA+MAAAlACm1VqmhlYWQAAAXoAAAAKgAAADZfxj5jaGhlYQAABhQAAAAYAAAAJAFbAMFobXR4AAAGLAAAAA4AAAA0CGQAAGxvY2EAAAY8AAAAHAAAABwM9A9CbWF4cAAABlgAAAAfAAAAIAEgAHZuYW1lAAAGeAAAATcAAAJSfUrk+HBvc3QAAAewAAAAZgAAAIka0DSfeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGRYyjiBgZWBgaGQoRZISkLpUAYOBj0GBiYGVmYGrCAgzTWFweEV4ysehs1ArgDDFgZGIA3CDAB2tQjAAHic7ZHLEcMwCESfLCz/VEoKSEE5parURxMOC4c0Ec283WGFdABgBXrwCAzam4bOK9KWeefM3Hhmjyn3ed+hTRq1pS7Ra/HjYGPniHcXMy4G/zNTP7/KW5HTXArkvdBW3ArN19dCG/NRIN8K5HuB/CiQn4U26VeBfBbML9NEH78AeJyVVc1u20YQ3pn905JcSgr/YsuSDTEg3cR1bFEkYyS1HQcQ2jQF2hot6vYSoECKnnPLA/SWUy9NTr31Bfp+6azsNI0SGiolzu7ODnfn+2Z2lnHG3rxhr9nfLGKbLGesncAYYnUHpsVnMG/uwyzNdFIVd6HI6twp8+R3LpT4TSglLoTHwwJgG2/dFvKrl9yI507/p5CCq4LTxB/PlPjkFaMHnWB/0S9je7RTPS+utnGtom1T2q5pk/e3H0M1S18rsXAL7wgpxQuhAmteGGvNjmcfGXuwnFNOPCXxeOGmnjrBLWNyBeNtVq2Hs03yus1aPS3mzSyNVSfu588iW1Q93x/4fjcHn+5EkS2tMxr4xIRa8ese+4L9uKZnxEqs8+ldyN9atU02a5t5uQ8hZGms1QTKpaKYqnipiNNOAIeIADC0JNEOYY+jtSgFoOchiAjRGFACpUTRje8bwIYWGCDEgENY8MEu9bnCYCdAxftoNg0KiSpUtPaHcanYwzXRu6T4r40b5npal3V7UHWCPJW9niyl1vIHgoujEXZjudBkeWkOeMQBRmbEPhKzij1i52t6/TadL+3q7H0U1eq4E8cG4gIIwQLx8VX7ToPXgPrehVc5QXHR7gMSmwjKfaYAP4KvZV+yn9bE18y2IY37LvtyrSg3i7ZK++B603ndlg/gBJpZRsfpBI6hyiaQ6FjlnThz8lAC3LgBIMnXDOAXxBQ4SIgiEhx2AcGCAwAhwjXRpCQms42bwAUt75BvAwgONzdgOfWEwzk4Ylzj4mz+5YEzzXzWX9aNlk7ot65y5QnBHsNlm6zDTu7sspRqG4V+fgJ1lVBZ07Nm7s5nemo3Lf3PO7iwtnroQ5/YDGwPRUip6fV6L+27p+wCHwSvPs85UnHqId8NAn5IBsKdv95KrL9m31Gsf2a/rluDslk1y1J9GE+LUmmVT/OyOHaFKGnapt2H5XeJTmKd6qYNoVVZOy+pWzr7rMip3ndG/4mQSoUcMbAqG/YNIAdXhkAqTVruXhocSKN0iS4Rwj7vSS4fcF/La07BfeQSuRAcFeW+9igjwPhhYPpGCBCBHhxiKMyFMFT7ziRH7RtfIWdiha+TdW+Rqs7bLHdN2ZJIKl0um0x3op9saYr0REeRdj09pl43pMzz4tjztrY8L4o8bzT+oLY27PR/eFtXs/YY5vtwB5Iqad14eYN0ujveMaGWqkdU3TKbQSC5Uvxaf4fA7SAQ3r2tEfIhd4duld91bwMisjqBw22orthNcroXl7KqO1329HBgAexgoCfGAwiDPoBnriki3lmNojrzvD0tjo6E3vPYP6E2BMIAeJxjYGRgYADiY8t3FsTz23xl4GbYzIAB/v9nWM6wBcjgYGAC8QH+QQhZAAB4nGNgZGBg2MzAACeXMzAyoAJeADPyAh14nGNgAILNpGEA0fgIZQAAAAAAAAA2AHIAvgE+AZgCCAKMAv4DlgPsBEYEoHicY2BkYGDgZchi4GQAASYg5gJCBob/YD4DABTSAZcAeJx9kU1uwjAQhV/4qwpqhdSqi67cTTeVEmBXDgBbhBD7AHYISuLUMSD2PUdP0HNwjp6i676k3qQS9Ujjb968mYUNoI8zPJTHw02Vy9PAFatfbpLuHbfIT47b6MF33KH+6riLF0wc93CHN27wWtdUHvHuuIFbfDhuUv903CKfHbfxgC/HHerfjrtYen3HPTx7ambiIl0YKQ+xPM5ltE9CU9NqxVKaItaZGPqDmj6VmTShlRuxOoniEI2sVUIZnYqJzqxMEi1yo3dybf2ttfk4CJTT/bVOMYNBjAIpFiTJOLCWOGLOHGGPBCE7l32XO0tmw04MjQwCQ7774B//lDmrZkJY3hvOrHBiLuiJMKJqoVgrejQ3CP5Yubt0JwxNJa96Oypr6j621VSOMQKG+uP36eKmHylcb0MAeJxtwdEOgjAMBdBeWEFR/Mdl7bTJtMsygc/nwVfPoYF+QP+tGDAigDFhxgVXLLjhjhUPCtmKTtmLaGN7x6dy/Io5bybqoevRQ3LRObb0sk3HKpn1SFqW6ru26vbpYfcmRCccJhqsAAA=) format("woff") +} + +.token.treeview-part .entry-name:before { + content: "\ea01"; + font-family: PrismTreeview; + font-size: inherit; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + width: 2.5ex; + display: inline-block +} + +.token.treeview-part .entry-name.dir:before { + content: "\ea02" +} + +.token.treeview-part .entry-name.ext-bmp:before, +.token.treeview-part .entry-name.ext-eps:before, +.token.treeview-part .entry-name.ext-gif:before, +.token.treeview-part .entry-name.ext-jpe:before, +.token.treeview-part .entry-name.ext-jpeg:before, +.token.treeview-part .entry-name.ext-jpg:before, +.token.treeview-part .entry-name.ext-png:before, +.token.treeview-part .entry-name.ext-svg:before, +.token.treeview-part .entry-name.ext-tiff:before { + content: "\ea03" +} + +.token.treeview-part .entry-name.ext-cfg:before, +.token.treeview-part .entry-name.ext-conf:before, +.token.treeview-part .entry-name.ext-config:before, +.token.treeview-part .entry-name.ext-csv:before, +.token.treeview-part .entry-name.ext-ini:before, +.token.treeview-part .entry-name.ext-log:before, +.token.treeview-part .entry-name.ext-md:before, +.token.treeview-part .entry-name.ext-nfo:before, +.token.treeview-part .entry-name.ext-txt:before { + content: "\ea06" +} + +.token.treeview-part .entry-name.ext-asp:before, +.token.treeview-part .entry-name.ext-aspx:before, +.token.treeview-part .entry-name.ext-c:before, +.token.treeview-part .entry-name.ext-cc:before, +.token.treeview-part .entry-name.ext-cpp:before, +.token.treeview-part .entry-name.ext-cs:before, +.token.treeview-part .entry-name.ext-css:before, +.token.treeview-part .entry-name.ext-h:before, +.token.treeview-part .entry-name.ext-hh:before, +.token.treeview-part .entry-name.ext-htm:before, +.token.treeview-part .entry-name.ext-html:before, +.token.treeview-part .entry-name.ext-jav:before, +.token.treeview-part .entry-name.ext-java:before, +.token.treeview-part .entry-name.ext-js:before, +.token.treeview-part .entry-name.ext-php:before, +.token.treeview-part .entry-name.ext-rb:before, +.token.treeview-part .entry-name.ext-xml:before { + content: "\ea07" +} + +.token.treeview-part .entry-name.ext-7z:before, +.token.treeview-part .entry-name.ext-bz2:before, +.token.treeview-part .entry-name.ext-bz:before, +.token.treeview-part .entry-name.ext-gz:before, +.token.treeview-part .entry-name.ext-rar:before, +.token.treeview-part .entry-name.ext-tar:before, +.token.treeview-part .entry-name.ext-tgz:before, +.token.treeview-part .entry-name.ext-zip:before { + content: "\ea08" +} + +.token.treeview-part .entry-name.ext-aac:before, +.token.treeview-part .entry-name.ext-au:before, +.token.treeview-part .entry-name.ext-cda:before, +.token.treeview-part .entry-name.ext-flac:before, +.token.treeview-part .entry-name.ext-mp3:before, +.token.treeview-part .entry-name.ext-oga:before, +.token.treeview-part .entry-name.ext-ogg:before, +.token.treeview-part .entry-name.ext-wav:before, +.token.treeview-part .entry-name.ext-wma:before { + content: "\ea04" +} + +.token.treeview-part .entry-name.ext-avi:before, +.token.treeview-part .entry-name.ext-flv:before, +.token.treeview-part .entry-name.ext-mkv:before, +.token.treeview-part .entry-name.ext-mov:before, +.token.treeview-part .entry-name.ext-mp4:before, +.token.treeview-part .entry-name.ext-mpeg:before, +.token.treeview-part .entry-name.ext-mpg:before, +.token.treeview-part .entry-name.ext-ogv:before, +.token.treeview-part .entry-name.ext-webm:before { + content: "\ea05" +} + +.token.treeview-part .entry-name.ext-pdf:before { + content: "\ea09" +} + +.token.treeview-part .entry-name.ext-xls:before, +.token.treeview-part .entry-name.ext-xlsx:before { + content: "\ea0a" +} + +.token.treeview-part .entry-name.ext-doc:before, +.token.treeview-part .entry-name.ext-docm:before, +.token.treeview-part .entry-name.ext-docx:before { + content: "\ea0c" +} + +.token.treeview-part .entry-name.ext-pps:before, +.token.treeview-part .entry-name.ext-ppt:before, +.token.treeview-part .entry-name.ext-pptx:before { + content: "\ea0b" +} \ No newline at end of file diff --git a/assets/events.csv b/assets/events.csv index eab519fcd4..c908d8883e 100644 --- a/assets/events.csv +++ b/assets/events.csv @@ -1,15 +1,17 @@ Name,Priority,Start Date,End Date,City,Country,Virtual Option,Description,URL,Categories -Everything Open,2,2025-01-20,2025-01-22,Tarntanya,Australia,FALSE,Example description. Example description. Example description. Example description. Example description.,https://everythingopen.au/,Servers and Cloud Computing; AI; IoT -FOSDEM 25,2,2025-02-01,2025-02-02,Brussels,Belgium,FALSE,Example description. Example description. Example description. Example description. Example description.,https://fosdem.org/2025/,AI; Servers and Cloud Computing; IoT; Embedded and Microcontrollers -State of Open,2,2025-02-04,2025-02-05,London,United Kingdom,FALSE,Example description. Example description. Example description. Example description. Example description.,https://stateofopencon.com/,Servers and Cloud Computing; AI; IoT -Arm AI Innovation Day,2,2025-02-15,2025-02-15,Nairobi,Kenya,,Example description. Example description. Example description. Example description. Example description.,TBC,AI -Rust Nation,2,2025-02-19,2025-02-20,London,United Kingdom,FALSE,Example description. Example description. Example description. Example description. Example description.,https://www.rustnationuk.com/,Embedded and Microcontrollers; AI; IoT -SOSS Policy Summit,2,2025-03-04,2025-03-04,Washington,United States,FALSE,Example description. Example description. Example description. Example description. Example description.,https://events.linuxfoundation.org/openssf-policy-summit-dc/,Servers and Cloud Computing -SCaLE,1,2025-03-06,2025-03-09,Pasadena,United States,FALSE,SCaLE is the largest community-run open-source and free software conference in North America. It is held annually in the greater Los Angeles area.,https://www.socallinuxexpo.org/scale/22x,Servers and Cloud Computing -SUSECon,2,2025-03-10,2025-03-14,Orlando,United States,FALSE,Example description. Example description. Example description. Example description. Example description.,https://www.suse.com/susecon/,Servers and Cloud Computing; AI; IoT -Embedded World,1,2025-03-11,2025-03-13,Nuremburg,Germany,FALSE,"Embedded World offers insight into the world of embedded systems, from components and modules to operating systems, hardware and software design, M2M communication, and more.",https://www.embedded-world.de/en,Embedded and Microcontrollers; Automotive -FOSSAsia,2,2025-03-13,2025-03-15,Bangkok,Thailand,TRUE,Example description. Example description. Example description. Example description. Example description.,https://events.fossasia.org/,Servers and Cloud Computing; AI; IoT -NVIDIA GTC,1,2025-03-17,2025-03-21,San Jose,United States,TRUE,"Nvidia GTC is a global artificial intelligence conference for developers that brings together developers, engineers, researchers, inventors, and IT professionals. ",https://www.nvidia.com/gtc/,ML -GDC,1,2025-03-17,2025-03-21,San Fransisco,United States,FALSE,"The Game Developers Conference (GDC) is the world's premier event for developers who make the games we love. GDC is the destination for creativity, innovation, and excellence.",https://gdconf.com/,"Mobile, Graphics, and Gaming" -ATO AI,2,2025-03-17,2025-03-18,Durham,United States,,Example description. Example description. Example description. Example description. Example description.,https://allthingsopen.ai/,AI -KubeCon EU,2,2025-04-01,2025-04-04,London ,United Kingdom,TRUE,Example description. Example description. Example description. Example description. Example description.,https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/,Servers and Cloud Computing \ No newline at end of file +Kubecon Europe 2025,1,2025-04-01,2025-04-04,London,United Kingdom,TRUE,"Visit Arm at KubeCon + CloudNativeCon Europe 2025 at booth N161. See demos on how Arm boosts AI, cloud native workloads, and Kubernetes performance. ",https://events.linuxfoundation.org/kubecon-cloudnativecon-europe,Servers and Cloud Computing +Google Next,2,2025-04-09,2025-04-11,Las Vegas,United States,FALSE,"This global exhibition of inspiration, innovation, and education is where decision-makers, developers, and anyone passionate about cloud challenges, solutions, 10x ideas, and game-changing technologies come together.",https://cloud.withgoogle.com/next/25,Servers and Cloud Computing; AI +Microsoft Build,1,2025-05-19,2025-05-22,Seattle,United States,TRUE,"Microsoft Build 2025 is the ultimate developer conference, featuring AI, cloud, and software innovations, hands-on workshops, and keynotes from Microsoft leaders. Connect, learn, and build.",https://build.microsoft.com/en-US/home,Laptops and Desktops; Servers and Cloud Computing; AI +Rust Week,3,2025-05-13,2025-05-17,Utrecht,Netherlands,FALSE,"A dedicated series of events focused on the Rust programming language, bringing together developers to discuss best practices, security, and performance optimizations.",https://dev.events/conferences/rust-week-2025-utcccotp,Embedded and Microcontrollers; Servers and Cloud Computing +Linaro Connect,3,2025-05-14,2025-05-16,Lisbon,Portugal,FALSE,"A key event for the Arm ecosystem, bringing together engineers and industry leaders to collaborate on open-source software development and Arm-based solutions.",https://www.linaro.org/connect/,Laptops and Desktops; Servers and Cloud Computing +Embedded Recipes,3,2025-05-14,2025-05-16,Nice,France,FALSE,"A technical conference dedicated to embedded systems developers, covering low-level programming, Linux on embedded devices, and real-time system challenges.",https://embedded-recipes.org/2025/,Embedded and Microcontrollers +Red Hat Summit ,3,2025-05-19,2025-05-22,Boston,United States,FALSE,"An enterprise open-source conference highlighting innovations in Linux, Kubernetes, automation, and AI, with sessions led by industry experts.",https://www.redhat.com/en/summit,Servers and Cloud Computing; AI +Computex,1,2025-05-19,2025-05-23,Taipei,Taiwan,FALSE,"COMPUTEX 2025 is set to be a game-changer, and Arm is taking center stage. Join our CEO Keynote for the latest onArm technology, and how we're bringing AI to everyone, everywhere.",https://computex.arm.com/event/a0f7a41d-a2b5-4840-9894-6bd6e9058c7d/home,"Mobile, Graphics, and Gaming; AI" +Kubecon China 2025,2,2025-06-10,2025-06-11,Hong Kong,China,TRUE,"KubeCon is a conference by CNCF, focusing on Kubernetes and cloud-native technologies, featuring keynotes, technical sessions, and workshops.",https://events.linuxfoundation.org/kubecon-cloudnativecon-china/,Servers and Cloud Computing +BSDCan,3,2025-06-13,2025-06-14,Ottawa,Canada,FALSE,"A conference for BSD operating system developers and enthusiasts, offering technical talks, workshops, and discussions.",https://www.bsdcan.org/2025/,Laptops and Desktops; Servers and Cloud Computing +OSS NA,2,2025-06-23,2025-06-25,Denver,United States,TRUE,"The premier event for open-source developers and contributors, covering topics from Linux kernel development to AI, cloud-native computing, and security.",https://events.linuxfoundation.org/open-source-summit-north-america/,Servers and Cloud Computing +Linux Security Summit,3,2025-06-26,2025-06-27,Denver,United States,TRUE,"A highly technical event focusing on advances in Linux security, including kernel hardening, cryptography, access control, and threat mitigation strategies.",https://events.linuxfoundation.org/linux-security-summit-north-america/,Laptops and Desktops; Servers and Cloud Computing +DebCamp & DebConf,3,2025-07-07,2025-07-20,Nantes,France,FALSE,"Annual conference for the Debian community, featuring collaborative development, workshops, and discussions on the future of the Debian Linux distribution.",https://wiki.debian.org/DebConf/25,Laptops and Desktops; Servers and Cloud Computing +We Are Developers,2,2025-07-09,2025-07-11,Berlin,Germany,TRUE,"One of the largest global developer conferences, offering sessions on software engineering trends, AI, DevOps, and emerging programming languages.",https://www.wearedevelopers.com/world-congress,"Mobile, Graphics, and Gaming" +GUADEC,3,2025-07-24,2025-07-29,Brescia,Italy,FALSE,"The leading event for GNOME contributors, featuring talks, hackfests, and discussions about the future of the GNOME desktop environment.",https://events.gnome.org/event/259/,"Laptops and Desktops; Mobile, Graphics and Gaming" +FOSSY,3,2025-07-31,2025-08-03,Portland,United States,FALSE,"An annual event dedicated to the open-source community, bringing together developers, maintainers, and advocates to discuss sustainability, security, and collaboration in open-source projects.", https://2025.fossy.us/, IoT diff --git a/content/install-guides/_images/docker-desktop.png b/content/install-guides/_images/docker-desktop.png new file mode 100644 index 0000000000..e850e3f5ea Binary files /dev/null and b/content/install-guides/_images/docker-desktop.png differ diff --git a/content/install-guides/_images/docker-icon.png b/content/install-guides/_images/docker-icon.png new file mode 100644 index 0000000000..7b76597e4a Binary files /dev/null and b/content/install-guides/_images/docker-icon.png differ diff --git a/content/install-guides/_images/q.gif b/content/install-guides/_images/q.gif new file mode 100644 index 0000000000..401ff3081e Binary files /dev/null and b/content/install-guides/_images/q.gif differ diff --git a/content/install-guides/_images/vs-ext-install.png b/content/install-guides/_images/vs-ext-install.png new file mode 100644 index 0000000000..5e3e5efda0 Binary files /dev/null and b/content/install-guides/_images/vs-ext-install.png differ diff --git a/content/install-guides/_images/wperf-validate.png b/content/install-guides/_images/wperf-validate.png new file mode 100644 index 0000000000..8f23a56522 Binary files /dev/null and b/content/install-guides/_images/wperf-validate.png differ diff --git a/content/install-guides/_images/wperf-winget-installation.gif b/content/install-guides/_images/wperf-winget-installation.gif new file mode 100644 index 0000000000..254b4ff42c Binary files /dev/null and b/content/install-guides/_images/wperf-winget-installation.gif differ diff --git a/content/install-guides/acfl.md b/content/install-guides/acfl.md index cf070251b5..a245253464 100644 --- a/content/install-guides/acfl.md +++ b/content/install-guides/acfl.md @@ -5,7 +5,7 @@ additional_search_terms: - hpc - linux - allinea -author_primary: Florent Lebeau +author: Florent Lebeau layout: installtoolsall minutes_to_complete: 15 multi_install: false @@ -16,9 +16,6 @@ test_images: - fedora:latest test_link: null test_maintenance: true -test_status: -- passed -- passed title: Arm Compiler for Linux tool_install: true weight: 1 @@ -89,7 +86,7 @@ bash <(curl -L https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler- Download releases from the command line using `wget`. Install `wget` if not present. -```console +```bash sudo apt install wget ``` @@ -117,7 +114,7 @@ Each command sequence includes accepting the license agreement to automate the i #### Ubuntu Linux: -```bash { target="ubuntu:latest", env="DEBIAN_FRONTEND=noninteractive" } +```bash { target="ubuntu:latest" } sudo -E apt-get -y install environment-modules python3 libc6-dev tar -xvf arm-compiler-for-linux_24.10.1_Ubuntu-22.04_aarch64.tar cd ./arm-compiler-for-linux_24.10.1_Ubuntu-22.04 @@ -126,10 +123,10 @@ sudo ./arm-compiler-for-linux_24.10.1_Ubuntu-22.04.sh --accept #### Red Hat Linux: -```bash { target="fedora:latest" } +```console sudo yum -y install environment-modules python3 glibc-devel tar -xvf arm-compiler-for-linux_24.10.1_RHEL-9_aarch64.tar -cd arm-compiler-for-linux_24.10.1_RHEL-9 +cd ./arm-compiler-for-linux_24.10.1_RHEL-9 sudo ./arm-compiler-for-linux_24.10.1_RHEL-9.sh --accept ``` @@ -142,70 +139,118 @@ install takes place **after** ACfL, you will no longer be able to fully uninstall ACfL. {{% /notice %}} -## Download and install using System Packages - Ubuntu Linux +## Download and install using System Packages + +### Ubuntu Linux 20.04 and 22.04 Arm Compiler for Linux is available to install with the Ubuntu system package manager `apt` command. -### Setup the ACfL package repository: +#### Set up the ACfL package repository -Add the ACfL `apt` package repository to your Ubuntu 20.04 or 22.04 system: +Add the ACfL `apt` package repository to your system. These instructions apply for Ubuntu 22.04. You can check the [available versions](https://developer.arm.com/packages/) for other releases. -```bash { target="ubuntu:latest" } +After that, the ACfL Ubuntu package repository is now ready to use. Run the commands below to install the dependencies needed. + + +```console sudo apt update -sudo apt install -y curl -source /etc/os-release -curl "https://developer.arm.com/packages/ACfL%3A${NAME}-${VERSION_ID/%.*/}/${VERSION_CODENAME}/Release.key" | sudo tee /etc/apt/trusted.gpg.d/developer-arm-com.asc -echo "deb https://developer.arm.com/packages/ACfL%3A${NAME}-${VERSION_ID/%.*/}/${VERSION_CODENAME}/ ./" | sudo tee /etc/apt/sources.list.d/developer-arm-com.list +sudo apt install -y wget gnupg gpg environment-modules python3 libc6-dev +wget -qO - https://developer.arm.com/packages/ACfL%3AUbuntu-22/jammy/Release.key | sudo tee /etc/apt/trusted.gpg.d/developer-arm-com.asc +echo "deb https://developer.arm.com/packages/ACfL%3AUbuntu-22/jammy/ ./" | sudo tee /etc/apt/sources.list.d/developer-arm-com.list sudo apt update ``` -The ACfL Ubuntu package repository is now ready to use. +Install Arm Compiler for Linux with: -### Install ACfL +```console +sudo apt install acfl -y +``` -Download and install Arm Compiler for Linux with: +### Amazon Linux 2023 -```bash { target="ubuntu:latest" } -sudo apt install acfl +Arm Compiler for Linux is available to install with either the `dnf` or `yum` system package manager. + +#### Install ACfL from the Amazon Linux 2023 package repository + +Install ACfL and prerequisites from the Amazon Linux 2023 `rpm` package repository with `dnf`: + +```console +sudo dnf update -y +sudo dnf -y install 'dnf-command(config-manager)' procps psmisc make environment-modules +sudo dnf config-manager addrepo --from-repofile=https://developer.arm.com/packages/ACfL%3AAmazonLinux-2023/latest/ACfL%3AAmazonLinux-2023.repo +sudo dnf -y install acfl ``` -### Set up environment +Or using the equivalent `yum` commands: -Arm Compiler for Linux uses environment modules to dynamically modify your user environment. Refer to the [Environment Modules documentation](https://lmod.readthedocs.io/en/latest/#id) for more information. +```console +sudo yum update -y +sudo yum -y install 'dnf-command(config-manager)' procps psmisc make environment-modules +sudo yum config-manager addrepo --from-repofile=https://developer.arm.com/packages/ACfL%3AAmazonLinux-2023/latest/ACfL%3AAmazonLinux-2023.repo +sudo yum -y install acfl +``` -Set up the environment, for example, in your `.bashrc` and add module files. +The ACfL tools are now ready to use. -#### Ubuntu Linux: +### Red Hat Enterprise Linux (RHEL) 9 -```bash { target="ubuntu:latest" } -echo "source /usr/share/modules/init/bash" >> ~/.bashrc -echo "module use /opt/arm/modulefiles" >> ~/.bashrc -source ~/.bashrc +Arm Compiler for Linux is available to install with either the `dnf` or `yum` system package manager. + +#### Install ACfL from the RHEL 9 package repository + +Install ACfL and prerequisites from the RHEL 9 `rpm` package repository with `dnf`: + +```console +sudo dnf update -y +sudo dnf -y install 'dnf-command(config-manager)' procps psmisc make environment-modules +sudo dnf config-manager addrepo --from-repofile=https://developer.arm.com/packages/ACfL%3ARHEL-9/standard/ACfL%3ARHEL-9.repo +sudo dnf -y install acfl ``` -#### Red Hat Linux: +Or using the equivalent `yum` commands: -```bash { target="fedora:latest" } -echo "source /usr/share/Modules/init/bash" >> ~/.bashrc -echo "module use /opt/arm/modulefiles" >> ~/.bashrc -source ~/.bashrc +```console +sudo yum update -y +sudo yum -y install 'dnf-command(config-manager)' procps psmisc make environment-modules +sudo yum config-manager addrepo --from-repofile=https://developer.arm.com/packages/ACfL%3ARHEL-9/standard/ACfL%3ARHEL-9.repo +sudo yum -y install acfl ``` -To list available modules: +The ACfL tools are now ready to use. + +### Set up environment + +Arm Compiler for Linux uses environment modules to dynamically modify your user environment. Refer to the [Environment Modules documentation](https://lmod.readthedocs.io/en/latest/#id) for more information. + +Set up the environment, for example, in your `.bashrc` and add module files. Then, list the available modules: + +#### Ubuntu Linux: -```bash { env_source="~/.bashrc" } +```bash { target="ubuntu:latest" pre_cmd=". /usr/share/modules/init/bash" pre_cmd="module use /opt/arm/modulefiles" } +echo ". /usr/share/modules/init/bash" >> $HOME/.bashrc +echo "module use /opt/arm/modulefiles" >> $HOME/.bashrc +source $HOME/.bashrc +module avail +``` + +#### Red Hat or Amazon Linux: + +```console +echo ". /usr/share/Modules/init/bash" >> $HOME/.bashrc +echo "module use /opt/arm/modulefiles" >> $HOME/.bashrc +source $HOME/.bashrc module avail ``` To configure Arm Compiler for Linux: -```bash { env_source="~/.bashrc" } +```console module load acfl/24.10.1 ``` To configure GCC: -```bash { env_source="~/.bashrc" } +```console module load gnu/14.2.0 ``` @@ -217,7 +262,7 @@ Arm Compiler for Linux is available with the [Spack](https://spack.io/) package See the [Arm Compiler for Linux and Arm PL now available in Spack](https://community.arm.com/arm-community-blogs/b/high-performance-computing-blog/posts/arm-compiler-for-linux-and-arm-pl-now-available-in-spack) blog for full details. -### Setup Spack +### Set up Spack Clone the Spack repository and add `bin` directory to the path: @@ -248,7 +293,7 @@ If you wish to install just the Arm Performance Libraries, use: spack install armpl-gcc ``` -### Setup environment +### Set up environment Use the commands below to set up the environment: ```console @@ -264,7 +309,7 @@ ACfL is now [ready to use](#armclang). To get started with the Arm C/C++ Compiler and compile a simple application follow the steps below. Check that the correct compiler version is being used: -```bash { env_source="~/.bashrc", pre_cmd="module load acfl/24.10.1" } +```bash { env_source="$HOME/.bashrc", pre_cmd=". /usr/share/modules/init/bash; module use /opt/arm/modulefiles; module load acfl/24.10.1" } armclang --version ``` @@ -282,13 +327,13 @@ int main() Build the application with: -```console { env_source="~/.bashrc", pre_cmd="module load acfl/24.10.1" } +```console armclang hello.c -o hello ``` Run the application with: -```bash { env_source="~/.bashrc", pre_cmd="module load acfl/24.10.1" } +```console ./hello ``` @@ -302,7 +347,7 @@ Hello, C World! To get started with the Arm Fortran Compiler and compile a simple application follow the steps below. Check that the correct compiler version is being used: -```bash { env_source="~/.bashrc", pre_cmd="module load acfl/24.10.1" } +```bash { env_source="$HOME/.bashrc", pre_cmd=". /usr/share/modules/init/bash; module use /opt/arm/modulefiles; module load acfl/24.10.1" } armflang --version ``` @@ -316,12 +361,12 @@ end program hello ``` Build the application with: -```bash { env_source="~/.bashrc", pre_cmd="module load acfl/24.10.1" } +```console armflang hello.f90 -o hello ``` Run the application with: -```bash { env_source="~/.bashrc", pre_cmd="module load acfl/24.10.1" } +```console ./hello ``` diff --git a/content/install-guides/ambaviz.md b/content/install-guides/ambaviz.md index 9e86cb2e89..acdcaf375d 100644 --- a/content/install-guides/ambaviz.md +++ b/content/install-guides/ambaviz.md @@ -16,7 +16,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://www.arm.com/products/development-tools/embedded-and-software/amba-viz diff --git a/content/install-guides/ams.md b/content/install-guides/ams.md index fd03755b88..6cb678d42e 100644 --- a/content/install-guides/ams.md +++ b/content/install-guides/ams.md @@ -17,7 +17,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://developer.arm.com/documentation/107649 @@ -49,7 +49,7 @@ All features of Arm Performance Studio are available free of charge without any ## Installation -Arm Performance Studio is supported on Windows, Linux, and macOS hosts. Download the appropriate installer from the [Arm Product Download Hub](https://developer.arm.com/downloads/view/MOBST-PRO0). +Arm Performance Studio is supported on Windows, Linux, and macOS hosts. Download the appropriate installer from [Arm Performance Studio Downloads](https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio#Downloads). Full installation and application launch instructions are given in the Arm Performance Studio [Release Notes](https://developer.arm.com/documentation/107649). diff --git a/content/install-guides/anaconda.md b/content/install-guides/anaconda.md index aaf905a029..91b5906759 100644 --- a/content/install-guides/anaconda.md +++ b/content/install-guides/anaconda.md @@ -7,7 +7,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://docs.anaconda.com/ @@ -15,8 +15,6 @@ test_images: - ubuntu:latest test_link: null test_maintenance: true -test_status: -- passed title: Anaconda tool_install: true weight: 1 diff --git a/content/install-guides/ansible.md b/content/install-guides/ansible.md index 7afc03ab21..57deceea1c 100644 --- a/content/install-guides/ansible.md +++ b/content/install-guides/ansible.md @@ -2,7 +2,7 @@ additional_search_terms: - linux - deploy -author_primary: Jason Andrews +author: Jason Andrews layout: installtoolsall minutes_to_complete: 10 multi_install: false @@ -25,7 +25,7 @@ Ansible command-line tools can be installed on a variety of Linux distributions. ## What should I do before I start installing the Ansible command line tools? -This article provides a quick solution to install the Ansible command line tools, such as `ansible-playbook` for Ubuntu on Arm. +This article provides a quick solution to install the Ansible command line tools, such as `ansible-playbook` for macOS and Ubuntu running Arm. Confirm you are using an Arm machine by running: @@ -33,12 +33,19 @@ Confirm you are using an Arm machine by running: uname -m ``` -The output should be: +The output on Ubuntu should be: ```output aarch64 ``` +And for macOS: + +```output +arm64 +``` + + If you see a different result, you are not using an Arm-based machine running 64-bit Linux. ## How do I download and install Ansible for Ubuntu on Arm? @@ -54,6 +61,16 @@ sudo add-apt-repository --yes --update ppa:ansible/ansible sudo apt install ansible -y ``` +## Install Ansible for macOS + +You can use the `brew` package manager to install on `arm64`: + +```console +brew install ansible +``` + +## Confirm installation + Confirm the Ansible command line tools are installed by running: ```bash diff --git a/content/install-guides/aperf.md b/content/install-guides/aperf.md index 0c037cb095..44d852552b 100644 --- a/content/install-guides/aperf.md +++ b/content/install-guides/aperf.md @@ -1,7 +1,7 @@ --- layout: installtoolsall minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://github.com/aws/aperf diff --git a/content/install-guides/arduino-pico.md b/content/install-guides/arduino-pico.md index 72b0b52f4e..8daa05ceb4 100644 --- a/content/install-guides/arduino-pico.md +++ b/content/install-guides/arduino-pico.md @@ -1,6 +1,6 @@ --- title: Arduino core for the Raspberry Pi Pico -author_primary: Michael Hall +author: Michael Hall additional_search_terms: - arduino - raspberrypi diff --git a/content/install-guides/armclang.md b/content/install-guides/armclang.md index b0eb127200..ec4745ace8 100644 --- a/content/install-guides/armclang.md +++ b/content/install-guides/armclang.md @@ -7,7 +7,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 15 -author_primary: Ronan Synnott +author: Ronan Synnott multi_install: false multitool_install_part: false official_docs: https://developer.arm.com/documentation/100748 diff --git a/content/install-guides/armds.md b/content/install-guides/armds.md index 1c2392b8dc..c4a778396a 100644 --- a/content/install-guides/armds.md +++ b/content/install-guides/armds.md @@ -18,7 +18,7 @@ test_maintenance: true test_images: - ubuntu:latest -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://developer.arm.com/documentation/101469 diff --git a/content/install-guides/armie.md b/content/install-guides/armie.md index 3ea15b3642..4b2f37550e 100644 --- a/content/install-guides/armie.md +++ b/content/install-guides/armie.md @@ -7,7 +7,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://developer.arm.com/documentation/102190 diff --git a/content/install-guides/armpl.md b/content/install-guides/armpl.md index 5da02437a1..6993f77ab2 100644 --- a/content/install-guides/armpl.md +++ b/content/install-guides/armpl.md @@ -20,7 +20,7 @@ test_images: ### Link to official documentation official_docs: https://developer.arm.com/documentation/101004 -author_primary: Pareena Verma +author: Pareena Verma ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. @@ -74,31 +74,31 @@ For more information refer to [Get started with Arm Performance Libraries](https In a terminal, run the command shown below to download the macOS package: ```console -wget https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/24-10/macos/arm-performance-libraries_24.10_macOS.tgz +wget https://developer.arm.com/-/cdn-downloads/permalink/Arm-Performance-Libraries/Version_25.04/arm-performance-libraries_25.04_macOS.tgz ``` Use tar to extract the file: ```console -tar zxvf arm-performance-libraries_24.10_macOS.tgz +tar zxvf arm-performance-libraries_25.04_macOS.tgz ``` Output of above command: ```console -armpl_24.10_flang-new_clang_19.dmg +armpl_25.04_flang-new_clang_19.dmg ``` Mount the disk image by running from a terminal: ```console -hdiutil attach armpl_24.10_flang-new_clang_19.dmg +hdiutil attach armpl_25.04_flang-new_clang_19.dmg ``` Now run the installation script as a superuser: ```console -/Volumes/armpl_24.10_flang-new_clang_19_installer/armpl_24.10_flang-new_clang_19_install.sh -y +/Volumes/armpl_25.04_flang-new_clang_19_installer/armpl_25.04_flang-new_clang_19_install.sh -y ``` -Using this command you automatically accept the End User License Agreement and the packages are installed to the `/opt/arm` directory. If you want to change the installation directory location use the `--install_dir` option with the script and provide the desired directory location. +Using this command you automatically accept the End User License Agreement and the packages are installed to the `/opt/arm` directory. If you want to change the installation directory location use the `--install_dir=` option with the script and provide the desired directory location. To get started, compile and test the examples included in the `/opt/arm//examples/`, or `//examples/` directory, if you have installed to a different location than the default. @@ -107,7 +107,9 @@ For more information refer to [Get started with Arm Performance Libraries](https ## Linux {#linux} -Arm Performance Libraries are supported on most Linux Distributions like Ubuntu, RHEL, SLES and Amazon Linux on an `AArch64` host and compatible with various versions of GCC and NVHPC. The GCC compatible releases are built with GCC 14 and tested with GCC versions 7 to 14. The NVHPC compatible releases are built and tested with NVHPC 24.7. +Arm Performance Libraries are supported on most Linux distributions like Ubuntu, RHEL, SLES and Amazon Linux on an `AArch64` host and compatible with various versions of GCC, LLVM, and NVHPC. The GCC compatible releases are built with GCC 14 and tested with GCC versions 7 to 14. The LLVM compatible releases are tested with LLVM 19.1. The NVHPC compatible releases are tested with NVHPC 24.7. + +### Manual download and installation [Download](https://developer.arm.com/downloads/-/arm-performance-libraries) the appropriate package for your Linux distribution. The deb based installers can be used on Ubuntu 20 and Ubuntu 22. The RPM based installers can be used on the following supported distributions: @@ -117,30 +119,48 @@ Arm Performance Libraries are supported on most Linux Distributions like Ubuntu, The instructions shown below are for deb based installers for GCC users. -In a terminal, run the command shown below to download the debian package: +In a terminal, run the command shown below to download the Debian package: ```bash - -wget https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/24-10/linux/arm-performance-libraries_24.10_deb_gcc.tar +wget https://developer.arm.com/-/cdn-downloads/permalink/Arm-Performance-Libraries/Version_25.04/arm-performance-libraries_25.04_deb_gcc.tar ``` Use `tar` to extract the file and then change directory: ```bash -tar -xf arm-performance-libraries_24.10_deb_gcc.tar -cd arm-performance-libraries_24.10_deb/ +tar xf arm-performance-libraries_25.04_deb_gcc.tar ``` Run the installation script as a super user: ```bash -sudo ./arm-performance-libraries_24.10_deb.sh --accept +sudo ./arm-performance-libraries_25.04_deb/arm-performance-libraries_25.04_deb.sh --accept ``` Using the `--accept` switch you automatically accept the End User License Agreement and the packages are installed to the `/opt/arm` directory. If you want to change the installation directory location use the `--install-to` option with the script and provide the desired directory location. +## Download and installation using system packages + +Arm Performance Libraries are available to install using Linux system package managers. The instructions shown below are for the Ubuntu system package manager `apt` command. + +Add the Arm Performance Libraries `apt` package repository to your system: + +```bash +sudo apt update +. /etc/os-release +curl "https://developer.arm.com/packages/arm-toolchains:${NAME,,}-${VERSION_ID/%.*/}/${VERSION_CODENAME}/Release.key" | sudo tee /etc/apt/trusted.gpg.d/developer-arm-com.asc +echo "deb https://developer.arm.com/packages/arm-toolchains:${NAME,,}-${VERSION_ID/%.*/}/${VERSION_CODENAME}/ ./" | sudo tee /etc/apt/sources.list.d/developer-arm-com.list +sudo apt update +``` + +Download and install Arm Performance Libraries with: + +```bash +sudo apt install arm-performance-libraries +``` + ### Setup your environment Install environment modules on your machine: @@ -170,13 +190,13 @@ module avail The output should be similar to: ```output -armpl/24.10.0_gcc +armpl/25.04.0_gcc ``` Load the appropriate module: ```console -module load armpl/24.10.0_gcc +module load armpl/25.04.0_gcc ``` You can now compile and test the examples included in the `/opt/arm//examples/`, or `//examples/` directory, if you have installed to a different location than the default. diff --git a/content/install-guides/avh.md b/content/install-guides/avh.md index a75365e2ec..958d4133f3 100644 --- a/content/install-guides/avh.md +++ b/content/install-guides/avh.md @@ -14,7 +14,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://arm-software.github.io/AVH/main/overview/html/index.html diff --git a/content/install-guides/aws-cli.md b/content/install-guides/aws-cli.md index 763cf3b798..81a5b8e98a 100644 --- a/content/install-guides/aws-cli.md +++ b/content/install-guides/aws-cli.md @@ -6,7 +6,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html diff --git a/content/install-guides/aws-copilot.md b/content/install-guides/aws-copilot.md index 8680f0ed03..f6161fa314 100644 --- a/content/install-guides/aws-copilot.md +++ b/content/install-guides/aws-copilot.md @@ -6,7 +6,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://aws.github.io/copilot-cli/ diff --git a/content/install-guides/aws-greengrass-v2.md b/content/install-guides/aws-greengrass-v2.md index 2d49679759..0cb88e314a 100644 --- a/content/install-guides/aws-greengrass-v2.md +++ b/content/install-guides/aws-greengrass-v2.md @@ -1,6 +1,6 @@ --- title: AWS IoT Greengrass -author_primary: Michael Hall +author: Michael Hall additional_search_terms: - iot - AWS diff --git a/content/install-guides/aws-q-cli.md b/content/install-guides/aws-q-cli.md new file mode 100644 index 0000000000..dc0dd2b4d5 --- /dev/null +++ b/content/install-guides/aws-q-cli.md @@ -0,0 +1,196 @@ +--- +title: Amazon Q Developer CLI + +author: Jason Andrews +minutes_to_complete: 10 +official_docs: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line.html + +test_maintenance: true +test_images: +- ubuntu:latest + +layout: installtoolsall +multi_install: false +multitool_install_part: false +tool_install: true +weight: 1 +--- + +Amazon Q Developer CLI is a command-line tool for Amazon Q, a generative AI-powered assistant. You can use it to ask questions about AWS architecture, resources, and general development tasks. + +It supports multiple operating systems, including Arm-based Linux distributions and macOS, supports the Arm architecture, and you can install it in several ways. + +## What should I do before installing Amazon Q Developer CLI? + +You need a Builder ID to use the Amazon Q Developer CLI. If you don't have one, visit [Do more with AWS Builder ID](https://community.aws/builderid) and click **Sign up with Builder ID** to create your AWS Builder ID. + +This guide explains how to install Amazon Q Developer CLI on macOS and Arm Linux. + +## How do I download and install Amazon Q Developer CLI? + +The CLI is invoked using the `q` command. + +### How do I install Amazon Q Developer CLI on macOS? + +Install [Homebrew](https://brew.sh/) if it's not already available on your computer. + +Then install the Q CLI: + +```console +brew install amazon-q +``` + +### How do I install the Q CLI on Arm Linux? + +The easiest way to install the Q CLI on any Arm Linux distribution is to download and run the installer. + +Before starting, ensure that `curl` and `unzip` are available on your computer. + +{{% notice Note %}} +For Debian-based distributions such as Ubuntu, use the commands below. For other Linux distributions, use the appropriate package manager to install `curl` and `unzip`. +{{% /notice %}} + +```bash { target="ubuntu:latest" } +sudo apt update +sudo apt install curl unzip -y +``` + +Download the zip file with `curl`: + +```bash { target="ubuntu:latest" } +curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.codewhisperer.us-east-1.amazonaws.com/latest/q-aarch64-linux.zip" -o "q.zip" +``` + +Extract the installer and run it: + +```console +unzip q.zip +bash ./q/install.sh +``` + +You'll then be prompted about updating your shell config: + +```output +✔ Do you want q to modify your shell config (you will have to manually do this otherwise)? +``` + +To automate the install, add the `--no-confirm` flag to the `install.sh` command. + +{{% notice Note %}} +If you're using a Linux distribution with an older version of the GNU C Library - or one that does not use it at all, such as Alpine - you can download an alternative package built with the musl C library and has no external dependencies. + +Substitute the `curl` command above with this one and use the same install instructions: + +```bash { target="ubuntu:latest" } +curl "https://desktop-release.codewhisperer.us-east-1.amazonaws.com/latest/q-aarch64-linux-musl.zip" -o "q.zip" +``` + +{{% /notice %}} + +### How do I confirm the Q CLI is working? + +You now have the latest version of the Amazon Q Developer CLI installed. + +Confirm the CLI is available by invoking the `q` command to print the version. + +```console +q version +``` + +The version is printed: + +```output +q 1.7.2 +``` + +## How can I configure my AWS account to get the most from the Q CLI? + +The Q CLI can answer questions and solve problems related to your AWS resources and help you develop faster on AWS. To get the maximum benefit, you can configure the AWS CLI to use your account. + +Follow the [AWS CLI Install Guide](/install-guides/aws_access_keys/) and the [AWS Credentials Install Guide](/install-guides/aws_access_keys/) to set up the AWS CLI and generate and configure access keys. + +This allows you to use the Amazon Q Developer CLI to ask questions and solve issues specific to your AWS account. + +## What is an example of using the Q CLI? + +You can use `q chat` to find information about your AWS resources. + +```console +q chat +``` + +When the chat session starts you see: + +```output +Hi, I'm Amazon Q. Ask me anything. + +Things to try +• Fix the build failures in this project. +• List my s3 buckets in us-west-2. +• Write unit tests for my application. +• Help me understand my git status + +/acceptall Toggles acceptance prompting for the session. +/profile (Beta) Manage profiles for the chat session +/context (Beta) Manage context files for a profile +/help Show the help dialogue +/quit Quit the application +``` + +For example, you can ask for the IP address of an EC2 instance instead of going to the AWS console or looking up the AWS CLI command to get it. + +An example is shown below: + +![Connect #center](/install-guides/_images/q.gif) + +## How can I set the Q CLI context to tailor responses? + +The Q CLI reads your context when you start it. If you provide more information about yourself, you will get tailored responses that match your development environment. + +There are multiple options to store context. + +Use the `/context` command to see the possible locations to store your context. + +```console +/context show +``` + +The help information is printed. + +```output +current profile: default + +global: + .amazonq/rules/**/*.md + README.md + AmazonQ.md +``` + +For example, you can create a new file to store your context. + +```console +mkdir -p ~/.amazonq/rules/context +echo "I am an Arm Linux developer. I prefer Ubuntu and other Debian based distributions. I don't use any x86 computers so please provide all information assuming I'm working on Arm Linux. Sometimes I use macOS and Windows on Arm, but please only provide information about these operating systems when I ask for it." > ~/.amazonq/rules/context/context.md +``` + +When you invoke `q chat` you can confirm your context information was read by asking. + +```console +did you read my context information? +``` + +The response confirms the context file was read: + +```output +Yes, I've read your context information. I understand that you're an Arm Linux developer who prefers +Ubuntu and other Debian-based distributions. You don't use x86 computers, so I should provide +information assuming you're working on Arm Linux. You sometimes use macOS and Windows on Arm, but I +should only provide information about those operating systems when you specifically ask for it. + +I'll keep this context in mind when answering your questions, focusing on Arm Linux-specific +information and Debian-based distributions by default. +``` + +Give it a try by asking questions such as `how do I install the aws cli?` and check that the answers match the provided context. + +You're ready to use the Q CLI. diff --git a/content/install-guides/aws-sam-cli.md b/content/install-guides/aws-sam-cli.md index 92a70067e0..3e76f4b72b 100644 --- a/content/install-guides/aws-sam-cli.md +++ b/content/install-guides/aws-sam-cli.md @@ -1,7 +1,7 @@ --- title: AWS SAM CLI -author_primary: Jason Andrews +author: Jason Andrews minutes_to_complete: 15 official_docs: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html diff --git a/content/install-guides/aws_access_keys.md b/content/install-guides/aws_access_keys.md index f620de97b6..d2447a4851 100644 --- a/content/install-guides/aws_access_keys.md +++ b/content/install-guides/aws_access_keys.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html diff --git a/content/install-guides/azure-cli.md b/content/install-guides/azure-cli.md index 24bf7057c0..345e8372a3 100644 --- a/content/install-guides/azure-cli.md +++ b/content/install-guides/azure-cli.md @@ -2,7 +2,7 @@ additional_search_terms: - cloud - azure -author_primary: Jason Andrews +author: Jason Andrews layout: installtoolsall minutes_to_complete: 15 multi_install: false @@ -11,8 +11,6 @@ official_docs: https://learn.microsoft.com/en-us/cli/azure test_images: - ubuntu:latest test_maintenance: true -test_status: -- passed title: Azure CLI tool_install: true weight: 1 diff --git a/content/install-guides/azure_login.md b/content/install-guides/azure_login.md index bc0286b3a3..350f8d6549 100644 --- a/content/install-guides/azure_login.md +++ b/content/install-guides/azure_login.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://learn.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest#az-login diff --git a/content/install-guides/bedrust.md b/content/install-guides/bedrust.md new file mode 100644 index 0000000000..6b1dc8b70a --- /dev/null +++ b/content/install-guides/bedrust.md @@ -0,0 +1,207 @@ +--- +title: Bedrust - invoke models on Amazon Bedrock +minutes_to_complete: 10 +author: Jason Andrews + +additional_search_terms: +- rust +- aws + +layout: installtoolsall + +multi_install: false +multitool_install_part: false +official_docs: https://github.com/darko-mesaros/bedrust +test_images: +- ubuntu:latest +test_maintenance: true +tool_install: true +weight: 1 +--- + +Bedrust is a command-line program you can use to easily invoke models on Amazon Bedrock, a managed service that makes it easy for developers to build and scale generative AI applications using foundation models (FMs) from leading AI model providers. + +Bedrust is available as Rust source code, and you can build and run it on an Arm Linux computer. + +## What should I consider before installing Bedrust? + +You will need an AWS account to access Bedrock, which you can create at https://aws.amazon.com. (Click on **Create an AWS Account** in the top right corner. Follow the instructions to register. See the [Creating an AWS account documentation](https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-creating.html) for full instructions.) + +To use Bedrust you need to: + +- Configure your AWS account credentials to talk to the Bedrock service +- Enable foundation model access in the Bedrock console + +### Configure credentials + +To connect to Bedrock, you need to install the [AWS CLI](/install-guides/aws-cli/), generate an access key ID and secret access key, and use the `aws configure` command to enter your credentials. + +Refer to [AWS Credentials](/install-guides/aws_access_keys/) for more details. + +### Enable model access in Bedrock + +To use Bedrock models you need to request access to specific foundation models through the AWS Bedrock console. + +In your AWS account, navigate to "Model access" in the Bedrock console and select the models you want to use. + +Refer to [Getting started with Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html) for additional documentation. + +## How do I download and install Bedrust? + +The easiest way to install Bedrust is by using Cargo, the Rust package manager. + +### Install Rust + +Ensure you have Rust and Cargo installed on your computer. If not, install them using the commands: + +```bash +sudo apt install curl gcc -y +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +source "$HOME/.cargo/env" +``` + +Refer to the [Rust install guide](/install-guides/rust/) for more information. + +### Clone the repository and install Bedrust + +Get the Bedrust source code: + +```bash +git clone https://github.com/darko-mesaros/bedrust.git +cd bedrust +``` + +With Rust and Cargo installed, you can install Bedrust: + +```bash +cargo install bedrust +``` + +### Verify the Installation + +After installation, confirm that Bedrust is installed and available in your search path by checking the version: + +```bash +bedrust --version +``` + +The output displays the installed version: + +```output +bedrust 0.8.8 +``` + +## How do I configure Bedrust? + +You can set the default foundation model you want to use: + +```console +bedrust --init +``` + +Use the menu to select the default model: + +```output +📜 | Initializing Bedrust configuration. +? Select a default model to use press to skip › + meta.llama2-70b-chat-v1 + meta.llama3-1-405b-instruct-v1:0 + meta.llama3-1-70b-instruct-v1:0 + meta.llama3-1-8b-instruct-v1:0 + cohere.command-text-v14 + anthropic.claude-v2 + anthropic.claude-v2:1 + anthropic.claude-3-opus-20240229-v1:0 + anthropic.claude-3-sonnet-20240229-v1:0 + anthropic.claude-3-haiku-20240307-v1:0 + anthropic.claude-3-5-sonnet-20240620-v1:0 + anthropic.claude-3-5-sonnet-20241022-v2:0 + us.anthropic.claude-3-7-sonnet-20250219-v1:0 + anthropic.claude-3-5-haiku-20241022-v1:0 + ai21.j2-ultra-v1 + us.deepseek.r1-v1:0 + amazon.titan-text-express-v1 + mistral.mixtral-8x7b-instruct-v0:1 + mistral.mistral-7b-instruct-v0:2 + mistral.mistral-large-2402-v1:0 + mistral.mistral-large-2407-v1:0 + us.amazon.nova-micro-v1:0 + us.amazon.nova-lite-v1:0 + us.amazon.nova-pro-v1:0 +``` + +## How do I use Bedrust? + +Just run `bedrust` to invoke the CLI with the default model. + +```console +bedrust +``` + +You will see the prompt and can start asking questions like `how do I install the AWS CLI?` to see how it works. + +```output +bedrust +██████╗ ███████╗██████╗ ██████╗ ██╗ ██╗███████╗████████╗ +██╔══██╗██╔════╝██╔══██╗██╔══██╗██║ ██║██╔════╝╚══██╔══╝ +██████╔╝█████╗ ██║ ██║██████╔╝██║ ██║███████╗ ██║ +██╔══██╗██╔══╝ ██║ ██║██╔══██╗██║ ██║╚════██║ ██║ +██████╔╝███████╗██████╔╝██║ ██║╚██████╔╝███████║ ██║ +╚═════╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ + + +---------------------------------------- +Currently supported chat commands: +/c - Clear current chat history +/s - (BETA) Save chat history +/r - (BETA) Recall and load a chat history +/h - (BETA) Export history as HTML(saves in current dir) +/q - Quit +---------------------------------------- + +---------------------------------------- +🤖 | What would you like to know today? +😎 | Human: +``` + +## How do I change foundation models? + +You can use `-m` to change the model: + +```console +bedrust -m nova-micro +``` + +Your queries are now sent to the Amazon Nova Micro model. + +## How do I know which models I can use? + +Use `--help` to see your models. + +```console +bedrust --help +``` + +The models are printed in the output: + +```output +A command-line tool to invoke and work with Large Language models on AWS, using Amazon Bedrock + +Usage: bedrust [OPTIONS] + +Options: + --init + -m, --model-id [possible values: llama270b, llama31405b-instruct, llama3170b-instruct, llama318b-instruct, cohere-command, claude-v2, claude-v21, claude-v3-opus, claude-v3-sonnet, claude-v3-haiku, claude-v35-sonnet, claude-v352-sonnet, claude-v37-sonnet, claude-v35-haiku, jurrasic2-ultra, deep-seek-r1, titan-text-express-v1, mixtral8x7b-instruct, mistral7b-instruct, mistral-large, mistral-large2, nova-micro, nova-lite, nova-pro] + -c, --caption + -s, --source + -x + -h, --help Print help + -V, --version Print version +``` + +The output shows the model strings you can use. Make sure to enable the models you want to use in the Bedrock console. + +Bedrust is a quick way to explore many Bedrock models and easily compare them. + + + diff --git a/content/install-guides/bolt.md b/content/install-guides/bolt.md index 47acc51346..bbabd8dd48 100644 --- a/content/install-guides/bolt.md +++ b/content/install-guides/bolt.md @@ -8,7 +8,7 @@ additional_search_terms: minutes_to_complete: 20 -author_primary: Jonathan Davies +author: Jonathan Davies official_docs: https://github.com/llvm/llvm-project/tree/main/bolt diff --git a/content/install-guides/browsers/_index.md b/content/install-guides/browsers/_index.md index 55ee06e343..2e4851cd70 100644 --- a/content/install-guides/browsers/_index.md +++ b/content/install-guides/browsers/_index.md @@ -1,6 +1,6 @@ --- title: Browsers on Arm -author_primary: Jason Andrews +author: Jason Andrews additional_search_terms: - browser - brave diff --git a/content/install-guides/browsers/brave.md b/content/install-guides/browsers/brave.md index d18f0607c6..854188accf 100644 --- a/content/install-guides/browsers/brave.md +++ b/content/install-guides/browsers/brave.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://support.brave.com/hc/en-us/categories/360001053032-Desktop-Browser diff --git a/content/install-guides/browsers/chrome.md b/content/install-guides/browsers/chrome.md index 8294e800fb..4af0935b99 100644 --- a/content/install-guides/browsers/chrome.md +++ b/content/install-guides/browsers/chrome.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 5 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://support.google.com/chrome/ diff --git a/content/install-guides/browsers/chromium.md b/content/install-guides/browsers/chromium.md index d414fcf7a2..acfb3b6f29 100644 --- a/content/install-guides/browsers/chromium.md +++ b/content/install-guides/browsers/chromium.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://www.chromium.org/Home/ diff --git a/content/install-guides/browsers/edge.md b/content/install-guides/browsers/edge.md index 7ac107b266..831e9acaa5 100644 --- a/content/install-guides/browsers/edge.md +++ b/content/install-guides/browsers/edge.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 5 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://learn.microsoft.com/en-us/microsoft-edge/ diff --git a/content/install-guides/browsers/firefox.md b/content/install-guides/browsers/firefox.md index c1d251f972..5a10ef7ade 100644 --- a/content/install-guides/browsers/firefox.md +++ b/content/install-guides/browsers/firefox.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://support.mozilla.org/en-US/products/firefox/ diff --git a/content/install-guides/browsers/vivaldi.md b/content/install-guides/browsers/vivaldi.md index c11b946d8a..340b839dd7 100644 --- a/content/install-guides/browsers/vivaldi.md +++ b/content/install-guides/browsers/vivaldi.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://help.vivaldi.com/desktop/ diff --git a/content/install-guides/cmake.md b/content/install-guides/cmake.md index 96ff5081bb..2c9305f638 100644 --- a/content/install-guides/cmake.md +++ b/content/install-guides/cmake.md @@ -9,7 +9,7 @@ additional_search_terms: minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews official_docs: https://cmake.org/documentation/ @@ -34,7 +34,7 @@ This article provides quick instructions to install CMake for Arm Linux distribu ### How do I download and install CMake for Windows on Arm? -Confirm you are using a Windows on Arm device such as Windows Dev Kit 2023 or a laptop such as Lenovo ThinkPad X13s or Surface Pro 9 with 5G. +Confirm you are using a Windows on Arm device such as the Lenovo ThinkPad X13s or Surface Pro 9 with 5G. ### How do I download and install CMake for Arm Linux distributions? diff --git a/content/install-guides/cmsis-build.md b/content/install-guides/cmsis-build.md deleted file mode 100644 index 74deb8e215..0000000000 --- a/content/install-guides/cmsis-build.md +++ /dev/null @@ -1,203 +0,0 @@ ---- -### Title the install tools article with the name of the tool to be installed -### Include vendor name where appropriate -title: CMSIS-Build - -# cbuild is now part of CMSIS Toolbox making this obsolete -draft: true - -### Optional additional search terms (one per line) to assist in finding the article -additional_search_terms: -- cbuild -- keil -- mcu -- microcontroller -- cortex-m -- cmsis - -### Estimated completion time in minutes (please use integer multiple of 5) -minutes_to_complete: 15 - -author_primary: Jason Andrews - -### Link to official documentation -official_docs: https://open-cmsis-pack.github.io/devtools/buildmgr/latest/index.html - - -### PAGE SETUP -weight: 1 # Defines page ordering. Must be 1 for first (or only) page. -tool_install: true # Set to true to be listed in main selection page, else false -multi_install: false # Set to true if first page of multi-page article, else false -multitool_install_part: false # Set to true if a sub-page of a multi-page article, else false -layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles ---- -{{% notice Note %}} -CMSIS-Build is a component of the CMSIS-Toolbox. - -For most users, it is recommended to install the complete toolbox package. - -See the [CMSIS-Toolbox Install Guide](/install-guides/cmsis-toolbox/). -{{% /notice %}} - -[CMSIS-Build](https://open-cmsis-pack.github.io/devtools/buildmgr/latest/index.html) is a set of tools to enable IDEs and command-line tools to share the same projects. - -Historically, IDEs have maintained project information in files which are unique to the IDE. Command line users often use tools such as make and cmake to capture project build information. - -CMSIS-Build unifies project information, making it easy to share between IDEs and command line tools. Keil MDK projects can be can be used from the Linux command line. - -The instructions below cover how to install, configure, and use CMSIS-Build from the Linux command line. This is useful for developers who prefer Linux and for automated testing driven by scripts on Linux. - -CMSIS-Build is developed on [GitHub](https://github.com/Open-CMSIS-Pack/devtools) and is part of the [Open-CMSIS-Pack project](https://www.open-cmsis-pack.org/). - -Follow the instructions below to install CMSIS-Build on a Linux machine. - -## Before you begin - -The install instructions are for Ubuntu or Debian Linux, and are the same for the Arm and x86_64 architectures. - -Use the `uname` command to identify your architecture: - -```console -uname -m -``` - -Output values can be `aarch64` or `x86_64` - -CMSIS-Build has the following prerequisites: -- cmake -- ninja -- compiler such as GCC or Arm Compiler for Embedded - -Install the prerequisites. - -```bash -sudo apt update -sudo apt install cmake ninja-build -y -``` - -The minimum `cmake` version is 3.18 - -Print the `cmake` version: - -```bash -cmake --version -``` - -If the `cmake` version from the Linux package manager is less than 3.18 it can be upgraded to a newer version using `snap`. - -```bash -sudo apt remove cmake -y -sudo snap install cmake --classic -``` - -## Download - -Download the latest install file from GitHub. Downloads are provided in the [Releases area](https://github.com/Open-CMSIS-Pack/devtools/releases) - -The current version is 1.5.0. - -```console -wget https://github.com/Open-CMSIS-Pack/devtools/releases/download/tools%2Fbuildmgr%2F1.5.0/cbuild_install.sh -``` - -## Installation - -To install, run the downloaded `cbuild_install.sh` script. - -To interactively answer the questions from the installer run the script and respond to the prompts. - -```console -bash ./cbuild_install.sh -``` - -The default installation directory is `./cbuild` Change the installation directory as needed. - -The default location for storing CMSIS-Packs is `$HOME/.cache/arm/packs` - -All of the compilers are not necessary, just accept the defaults for compilers which are not needed. - -At the end of the installer a message is displayed to source the setup file. - -The path will be different based on your selections. - -```bash -source /home/ubuntu/cbuild/etc/setup -``` - -The command to source the setup file can be added to `.bashrc` or `.profile` - -To change any settings after installation, modify the `etc/setup` file. - -To adjust compiler settings after installation, modify the `.cmake` files in `etc`. These files contain paths and other settings for each compiler. - -## Automated Installation - -To automate installation a text file with answers can be passed to `cbuild_install.sh` - -The inputs are: -- Installation path -- Directory for storing CMSIS PACKS -- Path to Arm Compiler for Embedded -- Path to Arm Compiler 5 -- Path to GNU Arm Embedded compiler -- Path to IAR C/C++ Compiler - -The input file can be created manually with an editor. Each line in the file represents an input to an interactive prompt. Leave a blank line to accept the default for a prompt. - -If the input file creation also needs to be automated use the command below and enter the input for each prompt or leave a blank line to accept the default. - -```bash -cat <>cmsis.input -./ctools -$HOME/packs -$HOME/ArmCompilerforEmbedded6.21 - - - -EOF -``` - -Make sure the directory for the CMSIS Packs exists before running the install. - -Run the installer with the input file: - -```bash -bash ./cbuild_install.sh < cmsis.input -``` - -Source the setup file using the location specified in the `cmsis.input` file: - -```bash -source /home/ubuntu/ctools/etc/setup -``` - -## Setting up product license {#license} - -CMSIS-Build is open source and freely available for use. No licenses need to be set up for use. Compilers, such as Arm Compiler for Embedded, invoked by CMSIS-Build may require a license. - -## Get started {#start} - -Test CMSIS-Build by building a simple example. - -The executables included in CMSIS-Build are [cbuild.sh](https://open-cmsis-pack.github.io/devtools/buildmgr/latest/cbuild.html), [cbuildgen](https://open-cmsis-pack.github.io/devtools/buildmgr/latest/cbuildgen.html) and [cpackget](https://open-cmsis-pack.github.io/devtools/buildmgr/latest/cpackget.html). Refer to the documentation for more details. - -Confirm CMSIS-Build is installed correctly by building a Blinky example. - -Get the Blinky example for the NXP LPCXpresso55S69 board. - -```bash -git clone https://github.com/Arm-Examples/Blinky_LPCXpresso55S69_RTX.git -cd Blinky_LPCXpresso55S69_RTX -``` - -Build it using `cbuild.sh` to confirm CMSIS-Build and the compiler are installed and working. - -```bash -cbuild.sh Blinky.cprj --packs -``` - -The necessary CMSIS Packs will be installed and the project will be compiled. - -If all goes well `Objects/image.axf` will be produced and no errors will occur. - -You are ready to use CMSIS-Build for your projects. diff --git a/content/install-guides/cmsis-toolbox.md b/content/install-guides/cmsis-toolbox.md index f5a70c884a..d2bd6256fa 100644 --- a/content/install-guides/cmsis-toolbox.md +++ b/content/install-guides/cmsis-toolbox.md @@ -17,7 +17,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/README.md diff --git a/content/install-guides/cyclonedds.md b/content/install-guides/cyclonedds.md new file mode 100644 index 0000000000..df3464bbf5 --- /dev/null +++ b/content/install-guides/cyclonedds.md @@ -0,0 +1,122 @@ +--- +title: Cyclone DDS +author: Odin Shen +minutes_to_complete: 20 +official_docs: https://cyclonedds.io/ + +additional_search_terms: +- linux +- automotive + +test_images: +- ubuntu:latest +test_maintenance: true + +layout: installtoolsall +multi_install: false +multitool_install_part: false +tool_install: true +weight: 1 +--- + +The [Eclipse Cyclone DDS](https://cyclonedds.io/) is an open-source implementation of the Data Distribution Service ([DDS](https://en.wikipedia.org/wiki/Data_Distribution_Service)) standard, designed for high-performance, real-time, and scalable communication in autonomous systems, robotics, industrial IoT, and aerospace applications. + +It is part of the Eclipse Foundation and is widely used in Robotic Operating System (ROS) 2 as a key middleware framework for inter-process communication. + +## Before you begin + +This article provides a quick solution to install Cyclone DDS on Arm Linux. + +Confirm you are using an Arm Linux machine by running: + +```bash +uname -m +``` + +The output should be: + +```output +aarch64 +``` + +If you see a different result, you are not using an Arm computer running 64-bit Linux. + +You need to install the following before building Cyclone DDS: + +- C and C++ compilers (such as GCC). +- Git. +- CMake see [How do I install CMake?](/install-guides/cmake/)). +- OpenSSL. + +For Ubuntu Linux, run the commands below. For other Linux distributions, use the package manager to install the software listed above. + +```bash +sudo apt update +sudo apt install -y gcc g++ git cmake libssl-dev +``` + +## How do I build Cyclone DDS? + +You can install Cyclone DDS by building the source code. + +Clone the GitHub repository to create a build folder: + +```bash +cd $HOME +git clone https://github.com/eclipse-cyclonedds/cyclonedds.git +``` + +Once downloaded, you can build and install Cyclone DDS. + +Enable the flags `BUILD_EXAMPLES` (to compile the example applications included) and `BUILD_TESTING` (to compile the test suite). + +Here are the build and install commands: + +```console +cd cyclonedds +mkdir build && cd build +cmake -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON .. +cmake --build . +sudo cmake --build . --target install +``` + +Cyclone DDS is now installed in `/usr/local`. + +{{% notice Note %}} +If you don't want to install Cyclone DDS in the default location of `/usr/local`, you can specify another location +by adding `-DCMAKE_INSTALL_PREFIX=` to the first `cmake` command with your alternative location. +{{% /notice %}} + +## How can I test Cyclone DDS? + +To verify the installation, you can run the `Hello World` example from the build directory. + +Open two terminals and navigate to the `bin/` directory in each. + +Run the commands shown below in each tab in each of your two terminals: + +{{< tabpane code=true >}} + {{< tab header="Publisher" language="bash">}} + cd $HOME/cyclonedds/build/bin/ + ./HelloworldPublisher + {{< /tab >}} + {{< tab header="Subscriber" language="bash">}} + cd $HOME/cyclonedds/build/bin/ + ./HelloworldSubscriber + {{< /tab >}} +{{< /tabpane >}} + +If you observe the following output from each of the terminals, Cyclone DDS is running correctly on your Arm Linux machine. + +{{< tabpane code=true >}} + {{< tab header="Publisher" language="log">}} + === [Publisher] Waiting for a reader to be discovered ... + === [Publisher] Writing : Message (1, Hello World) + {{< /tab >}} + {{< tab header="Subscriber" language="log">}} + === [Subscriber] Waiting for a sample ... + === [Subscriber] Received : Message (1, Hello World) + {{< /tab >}} +{{< /tabpane >}} + +You are now ready to use Cyclone DDS. \ No newline at end of file diff --git a/content/install-guides/docker/_index.md b/content/install-guides/docker/_index.md index 0ca75659ea..133cb6ef6e 100644 --- a/content/install-guides/docker/_index.md +++ b/content/install-guides/docker/_index.md @@ -1,6 +1,6 @@ --- title: Docker -author_primary: Jason Andrews +author: Jason Andrews additional_search_terms: - containers - virtual machine @@ -23,10 +23,10 @@ The operating system of the computer and the architecture (x86 or Arm) determine ### How do I install Docker on Linux and Chrome OS? -- Docker Engine on Linux runs on a variety of Linux distributions and architectures, including arm32v7 and arm64v8 (AArch64). Use these instructions for Linux and Chrome OS (using the Linux feature). This includes the Windows Subsystem for Linux 2 (WSL 2). +- Docker Engine on Linux runs on a variety of Linux distributions and architectures, including arm32v7 and arm64v8 (AArch64). Use the Docker Engine instructions for Linux and Chrome OS (using the Linux feature). This includes the Windows Subsystem for Linux 2 (WSL 2). ### How do I install Docker on Windows and macOS? - Docker Desktop is the easiest way to install Docker on Windows and macOS. The macOS version supports both Intel and Apple Silicon. -- The Windows on Arm version of Docker Desktop was announced at Microsoft Build 2024. -- Docker Desktop for Linux is available if your machine has KVM support and is running a KDE or Gnome desktop environment. +- The Windows on Arm version of Docker Desktop was announced at Microsoft Build 2024 and is available as a Beta release. +- Docker Desktop for Arm Linux is available if your machine has KVM support and is running a KDE or Gnome desktop environment. Refer to Docker Desktop for Arm Linux below for details. diff --git a/content/install-guides/docker/docker-desktop-arm-linux.md b/content/install-guides/docker/docker-desktop-arm-linux.md new file mode 100644 index 0000000000..4486456ec3 --- /dev/null +++ b/content/install-guides/docker/docker-desktop-arm-linux.md @@ -0,0 +1,104 @@ +--- +### Title the install tools article with the name of the tool to be installed +### Include vendor name where appropriate +title: Docker Desktop for Arm Linux + +### Optional additional search terms (one per line) to assist in finding the article +additional_search_terms: +- containers +- virtual machines + +### Estimated completion time in minutes (please use integer multiple of 5) +minutes_to_complete: 15 + +author: Jason Andrews + +### Link to official documentation +official_docs: https://docs.docker.com/desktop/ + +weight: 4 # Defines page ordering. Must be 1 for first (or only) page. +tool_install: false # Set to true to be listed in main selection page, else false +multi_install: false # Set to true if first page of multi-page article, else false +multitool_install_part: true # Set to true if a sub-page of a multi-page article, else false +layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles +--- + +## How do I install Docker Desktop for Arm Linux? + +Docker Desktop is available for Arm Linux, but not yet documented. + +Make sure you are on an Arm Linux computer by running: + +```console +uname -m +``` + +The output should be: + +```output +aarch64 +``` + +Before installing Docker Desktop install Docker Engine using: + +```console +curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh +sudo usermod -aG docker $USER ; newgrp docker +``` + +You can download and install Docker Desktop on Ubuntu and Debian distributions. + +The path to the download depends on the version. The easiest way is to copy the link for the Debian download of Docker Desktop from the latest [Docker Desktop release notes](https://docs.docker.com/desktop/release-notes/) and replace the instances of `amd64` with `arm64`. This will provide the URL to download. + +For example: + +```console +wget https://desktop.docker.com/linux/main/arm64/187762/docker-desktop-arm64.deb +``` + +Install Docker Desktop using: + +```console +sudo apt install ./docker-desktop-arm64.deb +``` + +The Docker icon is now available to start Docker Desktop. + +![img1 #center](/install-guides/_images/docker-icon.png) + +To print the Docker Desktop version use: + +```console +docker version +``` + +The output may be different depending on your version: + +```output +Server: Docker Desktop 4.40.0 (187762) + Engine: + Version: 28.0.4 + API version: 1.48 (minimum version 1.24) + Go version: go1.23.7 + Git commit: 6430e49 + Built: Tue Mar 25 15:07:18 2025 + OS/Arch: linux/arm64 + Experimental: false + containerd: + Version: 1.7.26 + GitCommit: 753481ec61c7c8955a23d6ff7bc8e4daed455734 + runc: + Version: 1.2.5 + GitCommit: v1.2.5-0-g59923ef + docker-init: + Version: 0.19.0 + GitCommit: de40ad0 +``` + +You can now use Docker Desktop on Arm Linux. The image below shows Docker Desktop running on a System76 Thelio Astra with Ubuntu 24.04 desktop. + +![img1 #center](/install-guides/_images/docker-desktop.png) + +Docker Desktop is now ready to use. You can explore [Docker related Learning Paths](/tag/docker/). + +You may want to create an account on [Docker Hub](https://hub.docker.com) to share images and automate workflows. diff --git a/content/install-guides/docker/docker-desktop.md b/content/install-guides/docker/docker-desktop.md index 373a6bc413..dfcb0aabb3 100644 --- a/content/install-guides/docker/docker-desktop.md +++ b/content/install-guides/docker/docker-desktop.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://docs.docker.com/desktop/ @@ -34,7 +34,14 @@ All of the download files are available on the | [Linux](https://docs.docker.com/desktop/install/linux-install/) | | [macOS](https://docs.docker.com/desktop/install/mac-install) | -All of the Docker Desktop products use the `x86_64` / `amd64` architecture except macOS on Apple Silicon. + +{{% notice Note %}} +Docker Desktop for Windows on Arm is available as a Beta release. It is fully documented and works the same as the x86 platform. + +For information about Docker Desktop on Arm Linux refer to [Docker Desktop on Arm Linux](/install-guides/docker/docker-desktop-arm-linux/). +{{% /notice %}} + + On any platform, confirm the Docker Desktop installation is successful with: ```console @@ -71,6 +78,6 @@ uname -m Apple Silicon is reported as `arm64`. -Docker Engine is now ready to use. You can explore [Docker related Learning Paths](/tag/docker/). +Docker Desktop is now ready to use. You can explore [Docker related Learning Paths](/tag/docker/). You may want to create an account on [Docker Hub](https://hub.docker.com) to share images and automate workflows. diff --git a/content/install-guides/docker/docker-engine.md b/content/install-guides/docker/docker-engine.md index e9584fb917..3394cdfe37 100644 --- a/content/install-guides/docker/docker-engine.md +++ b/content/install-guides/docker/docker-engine.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://docs.docker.com/engine/ diff --git a/content/install-guides/docker/docker-woa.md b/content/install-guides/docker/docker-woa.md deleted file mode 100644 index ece519d784..0000000000 --- a/content/install-guides/docker/docker-woa.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -### Title the install tools article with the name of the tool to be installed -### Include vendor name where appropriate -title: Docker for Windows on Arm - -### Optional additional search terms (one per line) to assist in finding the article -additional_search_terms: -- containers -- virtual machines - -### Estimated completion time in minutes (please use integer multiple of 5) -minutes_to_complete: 15 - -author_primary: Jason Andrews - -### Link to official documentation -official_docs: https://docs.docker.com/desktop/ - -weight: 4 # Defines page ordering. Must be 1 for first (or only) page. -tool_install: false # Set to true to be listed in main selection page, else false -multi_install: false # Set to true if first page of multi-page article, else false -multitool_install_part: true # Set to true if a sub-page of a multi-page article, else false -layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles ---- - -## How do I install Docker for Windows on Arm? - -Docker Desktop on Windows requires WSL 2 or Hyper-V. Both are available for Windows on Arm. - -Docker Desktop for Windows on Arm was [announced at Microsoft Build 2024](https://www.docker.com/blog/announcing-docker-desktop-support-for-windows-on-arm/). The first available version is 4.30. - -### What should I do before installing Docker Desktop for Windows on Arm? - -- Install WSL 2 on the Windows on Arm laptop, or turn on Hyper-V and Containers Windows features. - -### Which Windows on Arm computers are supported? - -Here are three examples of Windows on Arm computers: -- Lenovo Thinkpad X13s. -- Microsoft Surface Pro X. -- Samsung Galaxy Book S. - -Additional models of Windows on Arm computers are expected to be available in mid-2024. - -### How do I install and test Docker Desktop for Windows on Arm? - -The current version is 4.33.1 and you can -download [Docker Desktop for Windows on Arm](https://desktop.docker.com/win/main/arm64/161083/Docker%20Desktop%20Installer.exe) and run the installer. - -Check the [Docker Desktop release notes](https://docs.docker.com/desktop/release-notes/) for the latest release information. - -Once the installation is complete, you can test it by running `docker` in a Windows Command Prompt or PowerShell Prompt: - -```console -docker run hello-world -``` - -You should see a welcome message similar to the following: - -```output -Hello from Docker! -This message shows that your installation appears to be working correctly. - -To generate this message, Docker took the following steps: - 1. The Docker client contacted the Docker daemon. - 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. - (arm64v8) - 3. The Docker daemon created a new container from that image which runs the - executable that produces the output you are currently reading. - 4. The Docker daemon streamed that output to the Docker client, which sent it - to your terminal. - -To try something more ambitious, you can run an Ubuntu container with: - $ docker run -it ubuntu bash - -Share images, automate workflows, and more with a free Docker ID: - https://hub.docker.com/ - -For more examples and ideas, visit: - https://docs.docker.com/get-started/ - -``` - -Docker Desktop is now ready to use for Windows on Arm. - -You can explore [Docker related Learning Paths](/tag/docker/). - -You may want to create an account on [Docker Hub](https://hub.docker.com) to share images and automate workflows. diff --git a/content/install-guides/dotnet.md b/content/install-guides/dotnet.md index 7014b73ce5..6598c7d79e 100644 --- a/content/install-guides/dotnet.md +++ b/content/install-guides/dotnet.md @@ -1,7 +1,7 @@ --- layout: installtoolsall minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://learn.microsoft.com/en-us/dotnet/ @@ -11,8 +11,6 @@ test_images: - ubuntu:latest test_link: null test_maintenance: true -test_status: -- passed title: .NET SDK tool_install: true weight: 1 @@ -20,7 +18,7 @@ weight: 1 The [.NET SDK](https://dotnet.microsoft.com/en-us/) is a free, open-source, and cross-platform development environment that provides a broad set of tools and libraries for building applications. You can use it to create a variety of applications including web apps, mobile apps, desktop apps, and cloud services. -The .NET SDK is available for Linux distributions on Arm-based systems. +The .NET SDK is available for Linux distributions on Arm-based systems. ## What should I do before installing the .NET SDK on Arm Linux? @@ -44,7 +42,7 @@ There are two ways to install the .NET SDK on your computer: - Using the Linux package manager. - Using the install script. -Select the one that works best for you. +Select the one that works best for you. ### How can I install .NET SDK using the Linux package manager? @@ -68,11 +66,11 @@ To install the .NET SDK using a script, follow the instructions below: 1. Download the install script: -```bash +```bash wget https://dot.net/v1/dotnet-install.sh ``` -2. Run the script (it will install .NET SDK 8 under the folder .dotnet): +2. Run the script (it will install .NET SDK 8 under the folder .dotnet): You have some options to specify the version you want to install. @@ -104,9 +102,9 @@ You can also add the search path to your `$HOME/.bashrc` so it is set for all ne ## How do I verify the .NET SDK installation? -To check that the installation was successful, type: +To check that the installation was successful, type: -```bash +```bash dotnet --list-sdks ``` @@ -190,7 +188,7 @@ The expected output in the console is: Hello World! ``` -You are ready to use the .NET SDK on Arm Linux. +You are ready to use the .NET SDK on Arm Linux. You can find more information about .NET on Arm in the [AWS Graviton Technical Guide](https://github.com/aws/aws-graviton-getting-started/blob/main/dotnet.md). diff --git a/content/install-guides/eksctl.md b/content/install-guides/eksctl.md index 8888bfe346..d72a281332 100644 --- a/content/install-guides/eksctl.md +++ b/content/install-guides/eksctl.md @@ -4,7 +4,7 @@ additional_search_terms: - EKS - AWS - infrastructure -author_primary: Jason Andrews +author: Jason Andrews layout: installtoolsall minutes_to_complete: 5 multi_install: false @@ -14,8 +14,6 @@ test_images: - ubuntu:latest test_link: null test_maintenance: true -test_status: -- passed title: AWS EKS CLI (eksctl) tool_install: true weight: 1 @@ -27,7 +25,7 @@ The EKS CLI is available for a variety of operating systems and Linux distributi ## What should I do before installing eksctl on Arm Linux and Windows on Arm? -This install guide provides a quick solution to install `eksctl` on Arm Linux and Windows on Arm. +This install guide provides a quick solution to install `eksctl` on Arm Linux and Windows on Arm. 1. Confirm you have an Arm machine @@ -45,11 +43,11 @@ aarch64 If you see a different result, you are not using an Arm computer running 64-bit Linux. -For Windows, confirm the Arm architecture by typing "Settings" in the Windows search box. +For Windows, confirm the Arm architecture by typing "Settings" in the Windows search box. When the settings appear, click System on the left side and then About at the bottom. -In the Device specifications section look for "ARM-based processor" in the System type area. +In the Device specifications section look for "ARM-based processor" in the System type area. 2. Install `kubectl` @@ -57,13 +55,13 @@ Install the Kubernetes command-line tool, `kubectl`, using the [Kubectl install ## How do I download and install eksctl on Arm Linux? -1. Download the `eksctl` package using `curl`: +1. Download the `eksctl` package using `curl`: ```bash { target="ubuntu:latest" } curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_Linux_arm64.tar.gz" ``` -2. Install `eksctl` with: +2. Install `eksctl` with: ```bash { target="ubuntu:latest" } tar -xzf eksctl_Linux_arm64.tar.gz -C /tmp && rm eksctl_Linux_arm64.tar.gz @@ -104,11 +102,11 @@ The output will be similar to: `eksctl` relies on the AWS CLI being installed and configured. Use the [AWS CLI install guide](/install-guides/aws-cli/) to install the AWS CLI. The CLI provides the `aws` command. -You will also need to configure the AWS CLI using the `aws configure` or the `aws configure sso` command. There are multiple ways to configure the CLI, including environment variables, command-line options, and credentials files. Refer to the [Configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) for more details. +You will also need to configure the AWS CLI using the `aws configure` or the `aws configure sso` command. There are multiple ways to configure the CLI, including environment variables, command-line options, and credentials files. Refer to the [Configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) for more details. ## How do I use eksctl to create a simple EKS cluster? -With your AWS account configured, run `eksctl` to create a cluster with 2 nodes with AWS Graviton processors: +With your AWS account configured, run `eksctl` to create a cluster with 2 nodes with AWS Graviton processors: ```console eksctl create cluster \ @@ -116,12 +114,12 @@ eksctl create cluster \ --region us-east-1 \ --node-type t4g.small \ --nodes 2 \ ---nodegroup-name node-group-1 +--nodegroup-name node-group-1 ``` -Use the AWS console to look at the resources associated with the cluster and monitor progress of cluster creation. +Use the AWS console to look at the resources associated with the cluster and monitor progress of cluster creation. -When the cluster is created, use `kubectl` to get the status of the nodes in the cluster. +When the cluster is created, use `kubectl` to get the status of the nodes in the cluster. ```console kubectl get nodes -o wide diff --git a/content/install-guides/fm_fvp/_index.md b/content/install-guides/fm_fvp/_index.md index 17609a7044..a9dd18564e 100644 --- a/content/install-guides/fm_fvp/_index.md +++ b/content/install-guides/fm_fvp/_index.md @@ -1,6 +1,6 @@ --- title: Arm Fast Models and FVPs -author_primary: Ronan Synnott +author: Ronan Synnott additional_search_terms: - virtual platform diff --git a/content/install-guides/fm_fvp/eco_fvp.md b/content/install-guides/fm_fvp/eco_fvp.md index ec7efb7fc7..87af8af5cc 100644 --- a/content/install-guides/fm_fvp/eco_fvp.md +++ b/content/install-guides/fm_fvp/eco_fvp.md @@ -2,7 +2,7 @@ title: Arm Ecosystem FVPs and Architecture Envelope Models minutes_to_complete: 15 official_docs: https://developer.arm.com/documentation/100966 -author_primary: Ronan Synnott +author: Ronan Synnott weight: 4 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/fm_fvp/fm.md b/content/install-guides/fm_fvp/fm.md index 30a03c9959..3f92046535 100644 --- a/content/install-guides/fm_fvp/fm.md +++ b/content/install-guides/fm_fvp/fm.md @@ -2,7 +2,7 @@ title: Arm Fast Models minutes_to_complete: 15 official_docs: https://developer.arm.com/documentation/107572 -author_primary: Ronan Synnott +author: Ronan Synnott weight: 2 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/fm_fvp/fvp.md b/content/install-guides/fm_fvp/fvp.md index 7a64b89943..956ecfbb4a 100644 --- a/content/install-guides/fm_fvp/fvp.md +++ b/content/install-guides/fm_fvp/fvp.md @@ -2,7 +2,7 @@ title: Fixed Virtual Platforms (FVP) minutes_to_complete: 15 official_docs: https://developer.arm.com/documentation/100966/ -author_primary: Ronan Synnott +author: Ronan Synnott weight: 3 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/forge.md b/content/install-guides/forge.md index 51c7b3e6a3..209d3c3564 100644 --- a/content/install-guides/forge.md +++ b/content/install-guides/forge.md @@ -5,7 +5,7 @@ additional_search_terms: - map - performance reports - allinea -author_primary: Florent Lebeau +author: Florent Lebeau layout: installtoolsall minutes_to_complete: 15 multi_install: false @@ -15,8 +15,6 @@ test_images: - ubuntu:latest test_link: null test_maintenance: true -test_status: -- passed title: Linaro Forge tool_install: true weight: 1 @@ -35,7 +33,7 @@ Linaro Forge runs on Linux hosts and multiple architectures. See the Linaro Forg This install guide assumes an Arm AArch64 platform running Ubuntu Linux. -## Download +## Download Download and extract the appropriate installation package from [Linaro Forge Downloads](https://www.linaroforge.com/downloadForge/). @@ -73,9 +71,9 @@ Run the Windows file executable to install the Linaro Forge Remote Client. ### Graphical installer -Optionally, you can run the installer executable with a graphical interface. +Optionally, you can run the installer executable with a graphical interface. -```bash +```console cd linaro-forge-24.0.3-linux-aarch64/ ./installer ``` @@ -171,4 +169,4 @@ perf-report -n 128 myapp ``` Two files `myapp_128p_.html` and `myapp_128p_.txt` will be created in the current directory. -Linaro Forge is now installed and ready to use. +Linaro Forge is now installed and ready to use. diff --git a/content/install-guides/fvps-on-macos.md b/content/install-guides/fvps-on-macos.md index b7de98fb22..107a9f0b9e 100644 --- a/content/install-guides/fvps-on-macos.md +++ b/content/install-guides/fvps-on-macos.md @@ -13,7 +13,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Christopher Seidl +author: Christopher Seidl ### Link to official documentation official_docs: https://github.com/Arm-Examples/FVPs-on-Mac/blob/main/README.md diff --git a/content/install-guides/gcc/_index.md b/content/install-guides/gcc/_index.md index a67fce10c4..4095258c89 100644 --- a/content/install-guides/gcc/_index.md +++ b/content/install-guides/gcc/_index.md @@ -1,6 +1,6 @@ --- title: GNU Compiler -author_primary: Jason Andrews +author: Jason Andrews additional_search_terms: - compiler - GCC diff --git a/content/install-guides/gcc/arm-gnu.md b/content/install-guides/gcc/arm-gnu.md index bf2d7b4814..fa04b1212e 100644 --- a/content/install-guides/gcc/arm-gnu.md +++ b/content/install-guides/gcc/arm-gnu.md @@ -3,7 +3,7 @@ additional_search_terms: - compiler layout: installtoolsall minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: true official_docs: https://gcc.gnu.org/onlinedocs/ @@ -12,9 +12,6 @@ test_images: - fedora:latest test_link: null test_maintenance: true -test_status: -- passed -- passed title: Arm GNU Toolchain tool_install: false weight: 4 @@ -30,19 +27,19 @@ However there are reasons you may wish to use earlier compiler versions, so olde ## How do I download the Arm GNU Toolchain? {#download} Arm GNU Toolchain releases consist of cross toolchains for the following host operating systems: - -Linux + +Linux * Available for x86_64 and AArch64 host architectures - * Available for bare-metal and Linux targets - -Windows + * Available for bare-metal and Linux targets + +Windows * Available for x86 host architecture only (compatible with x86_64) * Available for bare-metal and Linux targets - -macOS + +macOS * Available for x86_64 and Apple silicon (beta) host architectures * Available for bare-metal targets only - + Download the correct toolchain variant for your development needs from the [Arm Developer website](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads). ## How do I install the Arm GNU Toolchain on Linux? @@ -80,7 +77,7 @@ source ~/.bashrc ## How do I install the Arm GNU Toolchain on macOS? -Downloads for `macOS` are available as tar files (`.tar.xz`) and package files (`.pkg`). +Downloads for `macOS` are available as tar files (`.tar.xz`) and package files (`.pkg`). ### tar files For `.tar.xz` files, unpack the downloaded file to the install directory. @@ -89,7 +86,7 @@ tar xJf arm-gnu-toolchain---.tar.xz -C /path/to/inst ``` ### pkg files -For `.pkg` files use the installer. +For `.pkg` files use the installer. ```console sudo installer -pkg arm-gnu-toolchain---.pkg -target / ``` @@ -114,7 +111,7 @@ The `/etc/paths` file is a list of paths to search. ### Apple Silicon -Here is a specific example for macOS with Apple Silicon and the AArch32 bare-metal target. +Here is a specific example for macOS with Apple Silicon and the AArch32 bare-metal target. ```console wget https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-darwin-arm64-arm-none-eabi.pkg @@ -136,15 +133,15 @@ For example, to install the tools silently, amend users `PATH` and add registry ```console gcc-arm---mingw-w64-i686-arm-none-eabi.exe /S /P /R ``` -The zip package is a backup to Windows installer for those who cannot run the installer. You can unzip the package and then invoke the tools directly. +The zip package is a backup to Windows installer for those who cannot run the installer. You can unzip the package and then invoke the tools directly. -## Setting up product license +## Setting up product license Arm GNU Toolchain is open sourced and freely available for use. No licenses need to be set up for use. To use the Arm GNU Toolchain in conjunction with [Arm Development Studio](https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio) you must [register the toolchain](https://developer.arm.com/documentation/101469/2022-0/Installing-and-configuring-Arm-Development-Studio/Register-a-compiler-toolchain). -## Get started +## Get started To verify the installation is correct enter: ```console diff --git a/content/install-guides/gcc/cross.md b/content/install-guides/gcc/cross.md index 8e31795b90..66dd1afae1 100644 --- a/content/install-guides/gcc/cross.md +++ b/content/install-guides/gcc/cross.md @@ -3,7 +3,7 @@ additional_search_terms: - compiler layout: installtoolsall minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: true official_docs: https://gcc.gnu.org/onlinedocs/ @@ -12,14 +12,11 @@ test_images: - fedora:latest test_link: null test_maintenance: true -test_status: -- passed -- passed title: Cross-compiler tool_install: false weight: 3 --- -GCC is available on all Linux distributions and can be installed using the package manager. +GCC is available on all Linux distributions and can be installed using the package manager. This covers `gcc` and `g++` for compiling C and C++ as a cross-compiler targeting the Arm architecture. @@ -27,9 +24,9 @@ This covers `gcc` and `g++` for compiling C and C++ as a cross-compiler targetin GCC is often used to cross-compile software for Arm microcontrollers and embedded devices which have firmware and other low-level software. The executables are `arm-none-eabi-gcc` and `arm-none-eabi-g++`. -GCC is also used to cross compile Linux applications. Applications can be compiled for 32-bit or 64-bit Linux systems. +GCC is also used to cross compile Linux applications. Applications can be compiled for 32-bit or 64-bit Linux systems. -The executables for 32-bit are `arm-linux-gnueabihf-gcc` and `arm-linux-gnueabihf-g++`. +The executables for 32-bit are `arm-linux-gnueabihf-gcc` and `arm-linux-gnueabihf-g++`. The executables for 64-bit are `aarch64-linux-gnu-gcc` and `aarch64-linux-gnu-g++`. @@ -90,7 +87,7 @@ brew install arm-none-eabi-gcc ## Setting up product license {#license} -GCC is open source and freely available for use. +GCC is open source and freely available for use. ## Get started {#start} diff --git a/content/install-guides/gcc/native.md b/content/install-guides/gcc/native.md index 74a07e0ea5..3ba51a6cf5 100644 --- a/content/install-guides/gcc/native.md +++ b/content/install-guides/gcc/native.md @@ -3,7 +3,7 @@ additional_search_terms: - compiler layout: installtoolsall minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: true official_docs: https://gcc.gnu.org/onlinedocs/ @@ -12,9 +12,6 @@ test_images: - fedora:latest test_link: null test_maintenance: true -test_status: -- passed -- passed title: Native compiler tool_install: false weight: 2 @@ -68,16 +65,16 @@ To install the most common development tools use the commands below. If the mach ```bash { target="fedora:latest" } sudo dnf update -y -sudo dnf groupinstall 'Development Tools' -y +sudo dnf group install "development-tools" -y ``` If `sudo` is not available become _root_ and omit the `sudo`. ```console dnf update -y -dnf groupinstall 'Development Tools' -y +sudo dnf group install "development-tools" -y ``` ## Setting up product license -GCC is open source and freely available for use. +GCC is open source and freely available for use. ## Get started {#start} diff --git a/content/install-guides/gcloud.md b/content/install-guides/gcloud.md index 5ed6ae3c32..39dbcfd302 100644 --- a/content/install-guides/gcloud.md +++ b/content/install-guides/gcloud.md @@ -8,10 +8,10 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 5 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false -official_docs: https://cloud.google.com/sdk/docs/install-sdk +official_docs: https://cloud.google.com/sdk/docs/install-sdk#deb test_images: - ubuntu:latest test_maintenance: true @@ -44,7 +44,9 @@ aarch64 If you see a different result, you are not using an Arm computer running 64-bit Linux. -## How do I download and install for Ubuntu on Arm? +## How do I download and install gcloud for Ubuntu on Arm? + +### Install gcloud using the package manager The easiest way to install `gcloud` for Ubuntu on Arm is to use the package manager. @@ -62,13 +64,64 @@ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - sudo apt-get update && sudo apt-get install google-cloud-cli -y ``` -Confirm the executable is available. +### Install gcloud using the archive file + +If you cannot use the package manager or you get a Python version error such as the one below you can use the archive file. + +```output +The following packages have unmet dependencies: + google-cloud-cli : Depends: python3 (< 3.12) but 3.12.3-0ubuntu2 is to be installed +``` + +Download the archive file and extract the contents: + +```bash { target="ubuntu:latest" } +wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-arm.tar.gz +sudo tar -xzf google-cloud-cli-linux-arm.tar.gz -C /opt +``` + +Run the installer: + +```bash { target="ubuntu:latest" } +cd /opt/google-cloud-sdk +sudo ./install.sh -q +``` + +{{% notice Note %}} +You can change the installation directory from `/opt` to a location of your choice. +{{% /notice %}} + +Add the installation directory to your search path. The installer will print the path to a script you can source to add `gcloud` to your search path. + +```output +==> Source [/opt/google-cloud-sdk/completion.bash.inc] in your profile to enable shell command completion for gcloud. +==> Source [/opt/google-cloud-sdk/path.bash.inc] in your profile to add the Google Cloud SDK command line tools to your $PATH. + +For more information on how to get started, please visit: + https://cloud.google.com/sdk/docs/quickstarts +``` + +Source the file to include `gcloud` in your search path: + +```bash { target="ubuntu:latest" } +source /opt/google-cloud-sdk/path.bash.inc +``` + +Alternatively, you can add the `bin` directory to your path by adding the line below to your `$HOME/.bashrc` file. + +```console +export PATH="/opt/google-cloud-sdk/bin:$PATH" +``` + +## Test gcloud + +Confirm the executable is available and print the version: ```bash { target="ubuntu:latest" } gcloud -v ``` -The output should be similar to: +The output is similar to: ```output Google Cloud SDK 418.0.0 diff --git a/content/install-guides/gfortran.md b/content/install-guides/gfortran.md index 5f664e3c4f..d37613e292 100644 --- a/content/install-guides/gfortran.md +++ b/content/install-guides/gfortran.md @@ -9,7 +9,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 15 -author_primary: Florent Lebeau +author: Florent Lebeau multi_install: false multitool_install_part: false official_docs: https://gcc.gnu.org/onlinedocs/gfortran/ @@ -18,8 +18,6 @@ test_images: - fedora:latest test_link: null test_maintenance: true -test_status: -- passed title: GFortran tool_install: true weight: 1 @@ -47,7 +45,7 @@ aarch64 If you see a different result, you are not using an Arm computer running 64-bit Linux. -## Download +## Download The Linux package manager downloads the required files so there are no special instructions. @@ -64,7 +62,7 @@ sudo apt install gfortran -y ### Installing on Red Hat / Fedora / Amazon Linux -These Linux distributions use `yum` as the package manager. +These Linux distributions use `yum` as the package manager. To install the most common development tools use the commands below. If the machine has `sudo` you can use it. diff --git a/content/install-guides/git-woa.md b/content/install-guides/git-woa.md index 432f39e75b..913be2aa44 100644 --- a/content/install-guides/git-woa.md +++ b/content/install-guides/git-woa.md @@ -17,7 +17,7 @@ minutes_to_complete: 10 ### Link to official documentation official_docs: https://git-scm.com/doc -author_primary: Jason Andrews +author: Jason Andrews ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. diff --git a/content/install-guides/go.md b/content/install-guides/go.md index d865c0f0e9..8f063617bc 100644 --- a/content/install-guides/go.md +++ b/content/install-guides/go.md @@ -6,7 +6,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://go.dev/doc/ diff --git a/content/install-guides/helm.md b/content/install-guides/helm.md index 3da98842a5..a4e510b3af 100644 --- a/content/install-guides/helm.md +++ b/content/install-guides/helm.md @@ -1,7 +1,7 @@ --- title: Helm -author_primary: Jason Andrews +author: Jason Andrews minutes_to_complete: 10 official_docs: https://helm.sh/docs/ diff --git a/content/install-guides/hyper-v.md b/content/install-guides/hyper-v.md index 61f94da653..59bd6c7adf 100644 --- a/content/install-guides/hyper-v.md +++ b/content/install-guides/hyper-v.md @@ -19,7 +19,7 @@ minutes_to_complete: 15 ### Link to official documentation official_docs: https://learn.microsoft.com/en-us/virtualization/ -author_primary: Jason Andrews +author: Jason Andrews ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. diff --git a/content/install-guides/ipexplorer.md b/content/install-guides/ipexplorer.md index f760bbf8ae..04b9b6fe25 100644 --- a/content/install-guides/ipexplorer.md +++ b/content/install-guides/ipexplorer.md @@ -16,7 +16,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://www.arm.com/products/ip-explorer diff --git a/content/install-guides/java.md b/content/install-guides/java.md index 363bcf0daa..9549075a08 100644 --- a/content/install-guides/java.md +++ b/content/install-guides/java.md @@ -1,6 +1,6 @@ --- title: Java -author_primary: Jason Andrews +author: Jason Andrews minutes_to_complete: 15 official_docs: https://docs.oracle.com/en/java/ diff --git a/content/install-guides/keilstudio_vs.md b/content/install-guides/keilstudio_vs.md index 5b80a50ea5..1c2b383fec 100644 --- a/content/install-guides/keilstudio_vs.md +++ b/content/install-guides/keilstudio_vs.md @@ -19,7 +19,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://developer.arm.com/documentation/108029 diff --git a/content/install-guides/keilstudiocloud.md b/content/install-guides/keilstudiocloud.md index fb09193928..22db643dec 100644 --- a/content/install-guides/keilstudiocloud.md +++ b/content/install-guides/keilstudiocloud.md @@ -16,7 +16,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 5 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://developer.arm.com/documentation/102497 diff --git a/content/install-guides/kubectl.md b/content/install-guides/kubectl.md index 6fb122e592..670a72fe12 100644 --- a/content/install-guides/kubectl.md +++ b/content/install-guides/kubectl.md @@ -9,7 +9,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://kubernetes.io/docs/reference/kubectl @@ -17,8 +17,6 @@ test_images: - ubuntu:latest test_link: null test_maintenance: true -test_status: -- passed title: Kubectl tool_install: true weight: 1 @@ -30,7 +28,7 @@ The Kubernetes command-line tool, [kubectl](https://kubernetes.io/docs/reference ## What should I consider before installing kubectl for Ubuntu on Arm? -[General installation information](https://kubernetes.io/docs/tasks/tools/) is available which covers all supported operating systems, but it doesn't talk about Arm. +[General installation information](https://kubernetes.io/docs/tasks/tools/) is available which covers all supported operating systems, but it doesn't talk about Arm. This article provides a quick solution to install `kubectl` for Ubuntu on Arm. @@ -48,7 +46,7 @@ If you see a different result, you are not using an Arm computer running 64-bit ## How do I download and Install kubectl for Ubuntu on Arm? -The easiest way to install `kubectl` for Ubuntu on Arm is to use curl and copy the executable to a common location. +The easiest way to install `kubectl` for Ubuntu on Arm is to use curl and copy the executable to a common location. To install curl, for example on ubuntu: @@ -62,7 +60,7 @@ Download and install the latest version of `kubctl`. There is just 1 executable curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl" ``` -If you have sudo or root access, install the executable in a common location for all users. +If you have sudo or root access, install the executable in a common location for all users. ```bash { target="ubuntu:latest" } sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl diff --git a/content/install-guides/license/_index.md b/content/install-guides/license/_index.md index 630411f673..e28f4ab5e8 100644 --- a/content/install-guides/license/_index.md +++ b/content/install-guides/license/_index.md @@ -1,6 +1,6 @@ --- title: Arm Software Licensing -author_primary: Ronan Synnott +author: Ronan Synnott additional_search_terms: - success kits - ssk diff --git a/content/install-guides/license/cloud.md b/content/install-guides/license/cloud.md index 491f259b24..ba7d7190c1 100644 --- a/content/install-guides/license/cloud.md +++ b/content/install-guides/license/cloud.md @@ -2,7 +2,7 @@ title: UBL Cloud server setup minutes_to_complete: 15 official_docs: https://developer.arm.com/documentation/107573 -author_primary: Ronan Synnott +author: Ronan Synnott weight: 4 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/license/flexnet.md b/content/install-guides/license/flexnet.md index c6c88ed639..32328f2db1 100644 --- a/content/install-guides/license/flexnet.md +++ b/content/install-guides/license/flexnet.md @@ -2,7 +2,7 @@ title: FlexNet Publisher Floating license setup minutes_to_complete: 15 official_docs: https://developer.arm.com/documentation/dui0209 -author_primary: Ronan Synnott +author: Ronan Synnott weight: 5 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/license/ubl_license_admin.md b/content/install-guides/license/ubl_license_admin.md index b9bf69d1bb..7dee53b4e7 100644 --- a/content/install-guides/license/ubl_license_admin.md +++ b/content/install-guides/license/ubl_license_admin.md @@ -2,7 +2,7 @@ title: UBL Local License Server (LLS) setup minutes_to_complete: 15 official_docs: https://developer.arm.com/documentation/107573 -author_primary: Ronan Synnott +author: Ronan Synnott weight: 2 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/license/ubl_license_enduser.md b/content/install-guides/license/ubl_license_enduser.md index 45baccb6fb..9d73929379 100644 --- a/content/install-guides/license/ubl_license_enduser.md +++ b/content/install-guides/license/ubl_license_enduser.md @@ -2,7 +2,7 @@ title: UBL LLS End-user setup minutes_to_complete: 15 official_docs: https://developer.arm.com/documentation/102516 -author_primary: Ronan Synnott +author: Ronan Synnott weight: 3 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/llvm-embedded.md b/content/install-guides/llvm-embedded.md index 9279c839fc..12796aab75 100644 --- a/content/install-guides/llvm-embedded.md +++ b/content/install-guides/llvm-embedded.md @@ -17,7 +17,7 @@ minutes_to_complete: 10 ### Link to official documentation official_docs: https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm -author_primary: Ronan Synnott +author: Ronan Synnott ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. diff --git a/content/install-guides/llvm-woa.md b/content/install-guides/llvm-woa.md index e4f626b12b..44e0dfb81a 100644 --- a/content/install-guides/llvm-woa.md +++ b/content/install-guides/llvm-woa.md @@ -19,7 +19,7 @@ minutes_to_complete: 10 ### Link to official documentation official_docs: -author_primary: Pareena Verma +author: Pareena Verma ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. diff --git a/content/install-guides/mcuxpresso_vs.md b/content/install-guides/mcuxpresso_vs.md index 07d8a1cc30..a0e2e0ac7a 100644 --- a/content/install-guides/mcuxpresso_vs.md +++ b/content/install-guides/mcuxpresso_vs.md @@ -20,7 +20,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://github.com/nxp-mcuxpresso/vscode-for-mcux/wiki diff --git a/content/install-guides/mdk.md b/content/install-guides/mdk.md index ae03119eb5..94f4762543 100644 --- a/content/install-guides/mdk.md +++ b/content/install-guides/mdk.md @@ -16,7 +16,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://www2.keil.com/mdk5/docs diff --git a/content/install-guides/multipass.md b/content/install-guides/multipass.md index abdcfbc29b..0e04942a6a 100644 --- a/content/install-guides/multipass.md +++ b/content/install-guides/multipass.md @@ -16,7 +16,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 30 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://multipass.run/docs @@ -91,7 +91,7 @@ sudo apt install cpu-checker -y To check if KVM is available run: ```console -kvm-ok +sudo kvm-ok ``` If KVM is available the output will be similar to: diff --git a/content/install-guides/nomachine.md b/content/install-guides/nomachine.md index fe7a202405..2b0f1104f0 100644 --- a/content/install-guides/nomachine.md +++ b/content/install-guides/nomachine.md @@ -6,7 +6,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 30 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://www.nomachine.com/all-documents diff --git a/content/install-guides/oci-cli.md b/content/install-guides/oci-cli.md index 984c64407b..ecf4ed435e 100644 --- a/content/install-guides/oci-cli.md +++ b/content/install-guides/oci-cli.md @@ -2,33 +2,31 @@ additional_search_terms: - cloud - OCI -- Oracle +- Oracle - infrastructure layout: installtoolsall minutes_to_complete: 10 -author_primary: Daniel Gubay +author: Daniel Gubay multi_install: false multitool_install_part: false official_docs: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm test_images: - ubuntu:latest test_maintenance: true -test_status: -- passed title: Oracle Cloud Infrastructure (OCI) CLI tool_install: true weight: 1 --- -The Oracle Cloud Infrastructure Command Line Interface (OCI CLI) is a cross-platform command-line tool that can be installed locally on development computers. OCI CLI is used to connect to OCI and execute administrative commands on OCI resources. +The Oracle Cloud Infrastructure Command Line Interface (OCI CLI) is a cross-platform command-line tool that can be installed locally on development computers. OCI CLI is used to connect to OCI and execute administrative commands on OCI resources. -It is available for a variety of operating systems and Linux distributions and has multiple ways to install it. +It is available for a variety of operating systems and Linux distributions and has multiple ways to install it. ## Before you begin -[General installation information](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#InstallingCLI__linux_and_unix) is available which covers all supported Linux distributions. - +[General installation information](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#InstallingCLI__linux_and_unix) is available which covers all supported Linux distributions. + This install guide provides a quick solution to install OCI CLI for Ubuntu on Arm. Confirm you are using an Arm machine by running: @@ -47,46 +45,40 @@ If you see a different result, you are not using an Arm computer running 64-bit ## Download and Install -The easiest way to install OCI CLI for Ubuntu on Arm is to use the install script. +The easiest way to install OCI CLI for Ubuntu on Arm is to use the install script. You can run an automated install with default values or an interactive install to change the default values. -To run an an automated install with default values run: +To run an an automated install with default values run: ```bash { target="ubuntu:latest" } curl -o install.sh https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh -bash ./install.sh --accept-all-defaults +bash ./install.sh --accept-all-defaults --update-path-and-enable-tab-completion --rc-file-path $HOME/.bashrc ``` -To run an interactive install that allows you to change default values run: +To run an interactive install that allows you to change default values run: ```console bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" ``` -Run the command below to add the `oci` command to your search path: - -```bash { target="ubuntu:latest" } -source $HOME/.bashrc -``` - Verify OCI CLI is installed using the `--version` option: -```bash { target="ubuntu:latest", env_source="~/.bashrc" } +```console oci --version ``` -Configure OCI CLI using the `setup config` command: +Configure OCI CLI using the `setup config` command: ```console oci setup config ``` -To complete the setup you will need your OCID and API key. +To complete the setup you will need your OCID and API key. Log in to the OCI web console to access your OCID and API key. -Open the Profile menu and click Tenancy: to locate your OCID. +Open the Profile menu and click Tenancy: to locate your OCID. ![oci1 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/40816837/7d5faf0a-2b62-41a8-ac1c-66e11aa01e5d) diff --git a/content/install-guides/openvscode-server.md b/content/install-guides/openvscode-server.md index 16633e8e86..e865855a26 100644 --- a/content/install-guides/openvscode-server.md +++ b/content/install-guides/openvscode-server.md @@ -13,7 +13,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 30 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://github.com/gitpod-io/openvscode-server/tree/docs diff --git a/content/install-guides/papi.md b/content/install-guides/papi.md index b6b84385ed..01eaf744eb 100644 --- a/content/install-guides/papi.md +++ b/content/install-guides/papi.md @@ -2,7 +2,7 @@ title: Performance API (PAPI) minutes_to_complete: 15 official_docs: https://github.com/icl-utk-edu/papi/wiki/Downloading-and-Installing-PAPI -author_primary: Jason Andrews +author: Jason Andrews additional_search_terms: - perf diff --git a/content/install-guides/pdh/_index.md b/content/install-guides/pdh/_index.md index 22f4bdb6da..ef61540974 100644 --- a/content/install-guides/pdh/_index.md +++ b/content/install-guides/pdh/_index.md @@ -1,6 +1,6 @@ --- title: Arm Product Download Hub -author_primary: Ronan Synnott +author: Ronan Synnott additional_search_terms: - pdh diff --git a/content/install-guides/pdh/api.md b/content/install-guides/pdh/api.md index 5c7e6862f1..f4fd8c07a3 100644 --- a/content/install-guides/pdh/api.md +++ b/content/install-guides/pdh/api.md @@ -2,7 +2,7 @@ title: Access via API minutes_to_complete: 15 official_docs: https://anypoint.mulesoft.com/exchange/portals/arm-3/f5af04c7-2f93-4d1e-8355-a60625973e1f/product-entitlement-customer-experience-api/ -author_primary: Ronan Synnott +author: Ronan Synnott weight: 3 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/pdh/browser.md b/content/install-guides/pdh/browser.md index b39f40ab39..ea5fcd5577 100644 --- a/content/install-guides/pdh/browser.md +++ b/content/install-guides/pdh/browser.md @@ -2,7 +2,7 @@ title: Access via Internet Browser minutes_to_complete: 15 official_docs: https://developer.arm.com/documentation/107572 -author_primary: Ronan Synnott +author: Ronan Synnott weight: 2 ### FIXED, DO NOT MODIFY diff --git a/content/install-guides/perf.md b/content/install-guides/perf.md index d69ab029cd..716d8bf880 100644 --- a/content/install-guides/perf.md +++ b/content/install-guides/perf.md @@ -14,7 +14,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://perf.wiki.kernel.org/index.php/Main_Page @@ -116,15 +116,19 @@ Building Perf from source requires `gcc`, `flex`, `bison`, `git`, and `make`. In For Debian and Ubuntu run: ```bash -sudo apt install gcc flex bison make git -y +sudo apt update +sudo apt install make gcc flex bison pkg-config linux-tools-generic linux-tools-$(uname -r) \ +libzstd1 libdwarf-dev libdw-dev binutils-dev libcap-dev libelf-dev libnuma-dev python3 python3-dev python3-setuptools \ +libssl-dev libunwind-dev libdwarf-dev zlib1g-dev liblzma-dev libaio-dev libtraceevent-dev debuginfod \ +libpfm4-dev libslang2-dev systemtap-sdt-dev libperl-dev binutils-dev libbabeltrace-dev libiberty-dev libzstd-dev -y ``` Use `git` to get the source code. Use `--branch` to specify the Linux kernel source tree closest to your kernel version. -For example, if your kernel version is 5.15, use: +For example, if your kernel version is 6.8, use: ```bash -git clone --depth=1 --branch v5.15 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git +git clone --depth=1 --branch v6.8 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git ``` Change to the `linux` directory and build: diff --git a/content/install-guides/porting-advisor.md b/content/install-guides/porting-advisor.md index ef5a6894b5..43c2e4a4d1 100644 --- a/content/install-guides/porting-advisor.md +++ b/content/install-guides/porting-advisor.md @@ -17,13 +17,11 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://github.com/aws/porting-advisor-for-graviton/ -author_primary: Jason Andrews - ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. tool_install: true # Set to true to be listed in main selection page, else false diff --git a/content/install-guides/powershell.md b/content/install-guides/powershell.md index 4df61ba700..ec2d3d9169 100644 --- a/content/install-guides/powershell.md +++ b/content/install-guides/powershell.md @@ -2,7 +2,7 @@ title: PowerShell minutes_to_complete: 10 official_docs: https://learn.microsoft.com/en-us/powershell/ -author_primary: Jason Andrews +author: Jason Andrews additional_search_terms: - pwsh - linux diff --git a/content/install-guides/pulumi.md b/content/install-guides/pulumi.md index 1f2130053f..9deb5556c5 100644 --- a/content/install-guides/pulumi.md +++ b/content/install-guides/pulumi.md @@ -2,7 +2,7 @@ title: Pulumi minutes_to_complete: 5 official_docs: https://www.pulumi.com/docs/ -author_primary: Jason Andrews +author: Jason Andrews test_maintenance: true test_images: diff --git a/content/install-guides/py-woa.md b/content/install-guides/py-woa.md index 7502154418..bd482fb1c4 100644 --- a/content/install-guides/py-woa.md +++ b/content/install-guides/py-woa.md @@ -17,7 +17,7 @@ minutes_to_complete: 15 ### Link to official documentation official_docs: https://www.python.org/doc/ -author_primary: Jason Andrews +author: Jason Andrews ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. diff --git a/content/install-guides/pytorch.md b/content/install-guides/pytorch.md index 6a723c9eb9..a4bc339996 100644 --- a/content/install-guides/pytorch.md +++ b/content/install-guides/pytorch.md @@ -6,7 +6,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 15 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://pytorch.org/docs/stable/index.html @@ -14,8 +14,6 @@ test_images: - ubuntu:latest test_link: null test_maintenance: true -test_status: -- passed title: PyTorch tool_install: true weight: 1 @@ -46,7 +44,7 @@ aarch64 If you see a different result, then you are not using an Arm computer running 64-bit Linux. -PyTorch requires Python 3, and this can be installed with `pip`. +PyTorch requires Python 3, and this can be installed with `pip`. For Ubuntu, run: @@ -65,7 +63,7 @@ alias python=python3 It is recommended that you install PyTorch in your own Python virtual environment. Set up your virtual environment: -```bash +```bash python -m venv venv source venv/bin/activate ``` @@ -127,7 +125,7 @@ PyTorch built with: - Build settings: BLAS_INFO=open, BUILD_TYPE=Release, CXX_COMPILER=/opt/rh/devtoolset-10/root/usr/bin/c++, CXX_FLAGS=-ffunction-sections -fdata-sections -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DLIBKINETO_NOXPUPTI=ON -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=open, TORCH_VERSION=2.5.1, USE_CUDA=OFF, USE_CUDNN=OFF, USE_CUSPARSELT=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF, ``` -The configuration output is an advanced option to check the tools and structure used to build PyTorch. +The configuration output is an advanced option to check the tools and structure used to build PyTorch. ## BFloat16 floating-point number format @@ -147,7 +145,7 @@ Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asi If the result is blank, you do not have a processor with BFloat16. -BFloat16 provides improved performance and smaller memory footprint with the same dynamic range. You might experience a drop in model inference accuracy with BFloat16, but the impact is acceptable for the majority of applications. +BFloat16 provides improved performance and smaller memory footprint with the same dynamic range. You might experience a drop in model inference accuracy with BFloat16, but the impact is acceptable for the majority of applications. You can use an environment variable to enable BFloat16: @@ -171,7 +169,7 @@ export LRU_CACHE_CAPACITY=1024 ## Transparent huge pages -Transparent huge pages (THP) provide an alternative method of utilizing huge pages for virtual memory. Enabling THP might result in improved performance because it reduces the overhead of Translation Lookaside Buffer (TLB) lookups by using a larger virtual memory page size. +Transparent huge pages (THP) provide an alternative method of utilizing huge pages for virtual memory. Enabling THP might result in improved performance because it reduces the overhead of Translation Lookaside Buffer (TLB) lookups by using a larger virtual memory page size. To check if THP is available on your system, run: @@ -197,7 +195,7 @@ With `madvise` you can use an environment variable to check performance with and To enable THP for PyTorch: -```console +```bash export THP_MEM_ALLOC_ENABLE=1 ``` @@ -205,13 +203,13 @@ export THP_MEM_ALLOC_ENABLE=1 To profile a [Vision Transformer (ViT) model](https://huggingface.co/google/vit-base-patch16-224), first download the transformers and datasets libraries: -``` +```bash pip install transformers datasets -``` +``` Use a text editor to save the code below as `profile-vit.py`: -```python { file_name="profile.py" } +```python { file_name="profile-vit.py" } import torch from transformers import ViTFeatureExtractor, ViTForImageClassification from datasets import load_dataset @@ -298,7 +296,7 @@ Self CPU time total: 786.880ms ``` -Experiment with the two environment variables for BFloat16 and THP and observe the performance differences. +Experiment with the two environment variables for BFloat16 and THP and observe the performance differences. You can set each variable and run the test again and observe the new profile data and run time. @@ -397,7 +395,7 @@ The output will be similar to: Self CPU time total: 633.541ms ``` -You should see the `quantized::linear_dynamic` layer being profiled. You can see the improvement in the model inference performance using dynamic quantization. +You should see the `quantized::linear_dynamic` layer being profiled. You can see the improvement in the model inference performance using dynamic quantization. You are now ready to use PyTorch on Arm Linux. diff --git a/content/install-guides/ros2.md b/content/install-guides/ros2.md new file mode 100644 index 0000000000..8b54f2ac4b --- /dev/null +++ b/content/install-guides/ros2.md @@ -0,0 +1,172 @@ +--- +title: ROS - Robot Operating System +author: Odin Shen +minutes_to_complete: 30 +official_docs: https://www.ros.org/blog/getting-started/ + +test_images: +- ubuntu:latest +test_maintenance: true + +additional_search_terms: +- linux + +layout: installtoolsall +multi_install: false +multitool_install_part: false +tool_install: true +weight: 1 +--- + +The Robot Operating System ([ROS](https://www.ros.org/)) is a set of software libraries and tools for building robot applications. +ROS 2 is the latest version, designed to enhance security, improve distributed system communication, and support real-time performance, addressing some of the limitations of ROS 1. + +## Before you begin + +ROS 2 is available for Ubuntu Linux 22.04, 24.04, and Windows. + +This article provides a quick solution to install ROS 2 for Ubuntu on Arm. You can use Ubuntu 22.04 LTS or Ubuntu 24.04 LTS. + +Confirm you are using an Arm machine by running: + +```bash +uname -m +``` + +The output should be: + +```output +aarch64 +``` + +If you see a different result, you are not using an Arm computer running 64-bit Linux. + +## What are the ROS 2 dependencies? + +First, install the general dependencies: + +```bash +sudo apt update +sudo apt install curl software-properties-common build-essential -y +``` + +## How do I Install ROS 2 for Ubuntu on Arm? + +You can install ROS 2 using the APT package manager. + +The Ubuntu package lists do not include ROS 2, so you need to add the repository. + +```bash +sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null +sudo apt update +``` + +Install the ROS 2 dependencies: + +```bash +sudo apt install -y \ + python3-pip \ + python3-rosdep \ + python3-colcon-common-extensions +``` + +There are two LTS releases of ROS 2, Jazzy Jalisco and Humble Hawksbill, which you can install based on your Ubuntu version. + +- For Ubuntu Linux 24.04, you should install Jazzy Jalisco. +- For Ubuntu Linux 22.04, you should install Humble Hawksbill. + +## How can I install ROS 2? + +Install ROS 2 based on your Ubuntu version: + +{{< tabpane code=true >}} + {{< tab header="Ubuntu 24.04" language="bash">}} + # Install ROS2 packages + sudo apt install -y ros-jazzy-desktop + # Initialize rosdep + sudo rosdep init + rosdep update + {{< /tab >}} + {{< tab header="Ubuntu 22.04" language="bash">}} + # Install ROS2 packages + sudo apt install -y ros-humble-desktop + # Initialize rosdep + sudo rosdep init + rosdep update + {{< /tab >}} +{{< /tabpane >}} + +## How do I configure the environment? + +Add ROS 2 setup to your shell startup script: + +{{< tabpane code=true >}} + {{< tab header="Ubuntu 24.04" language="bash">}} + echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc + source ~/.bashrc + {{< /tab >}} + {{< tab header="Ubuntu 22.04" language="bash">}} + echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc + source ~/.bashrc + {{< /tab >}} +{{< /tabpane >}} + +Confirm ROS 2 is installed by using printenv: + +```console +printenv ROS_DISTRO +``` +The output should print either `jazzy` or `humble`, depending on your Ubuntu version. + +## How can I test the ROS 2 installation? + +In one terminal run a `talker`: + +```console +ros2 run demo_nodes_cpp talker +``` + +The output is similar to the messages shown below, indicating that ROS 2 is publishing the “hello world” string along with a sequence number. + +```output +[INFO] [1741389626.338343545] [talker]: Publishing: 'Hello World: 1' +[INFO] [1741389627.338329328] [talker]: Publishing: 'Hello World: 2' +[INFO] [1741389628.338317118] [talker]: Publishing: 'Hello World: 3' +[INFO] [1741389629.338322551] [talker]: Publishing: 'Hello World: 4' +[INFO] [1741389630.338318200] [talker]: Publishing: 'Hello World: 5' +[INFO] [1741389631.338334884] [talker]: Publishing: 'Hello World: 6' +[INFO] [1741389629.338322551] [talker]: Publishing: 'Hello World: 7' +[INFO] [1741389630.338318200] [talker]: Publishing: 'Hello World: 8' +[INFO] [1741389631.338334884] [talker]: Publishing: 'Hello World: 9' +... +``` + + +Then, open another terminal and run the `listener`: + +```console +ros2 run demo_nodes_cpp listener +``` + +If you see "I heard [Hello World: ]" in the second terminal as shown below, it means ROS 2 has been successfully installed. + +```output +[INFO] [1741389927.137762134] [listener]: I heard: [Hello World: 1] +[INFO] [1741389928.125120177] [listener]: I heard: [Hello World: 2] +[INFO] [1741389929.125042010] [listener]: I heard: [Hello World: 3] +[INFO] [1741389930.125046472] [listener]: I heard: [Hello World: 4] +[INFO] [1741389931.125055785] [listener]: I heard: [Hello World: 5] +[INFO] [1741389932.125434760] [listener]: I heard: [Hello World: 6] +[INFO] [1741389933.125044887] [listener]: I heard: [Hello World: 7] +[INFO] [1741389934.125124370] [listener]: I heard: [Hello World: 8] +[INFO] [1741389935.125036222] [listener]: I heard: [Hello World: 9] +... +``` + +You are now ready to use ROS 2. + +## Where can I learn more about ROS 2? + +- Explore the [ROS 2 Tutorials](https://docs.ros.org/en/jazzy/Tutorials.html) +- Learn about [ROS 2 Command Line Tools](https://docs.ros.org/en/jazzy/Concepts/About-Command-Line-Tools.html) diff --git a/content/install-guides/rust.md b/content/install-guides/rust.md index e92f5e617d..cca756550c 100644 --- a/content/install-guides/rust.md +++ b/content/install-guides/rust.md @@ -2,7 +2,7 @@ title: Rust for Linux Applications minutes_to_complete: 10 official_docs: https://www.rust-lang.org/tools/install -author_primary: Mathias Brossard +author: Mathias Brossard additional_search_terms: - compiler - linux @@ -53,7 +53,7 @@ If you see a different result, you are not using an Arm computer running 64-bit Use the `apt` command to install the required software packages on any Debian-based Linux distribution, including Ubuntu. ```bash { target="ubuntu:latest" } -sudo apt update +sudo apt update sudo apt install -y curl gcc ``` @@ -140,7 +140,7 @@ You are ready to use the Rust programming language on your Arm Linux machine. To compile an example program, run the following commands: -```bash { env_source="~/.bashrc" } +```console cargo new hello cd hello cargo run diff --git a/content/install-guides/rust_embedded.md b/content/install-guides/rust_embedded.md index 7d6c7e5004..e5e0ddaf1b 100644 --- a/content/install-guides/rust_embedded.md +++ b/content/install-guides/rust_embedded.md @@ -2,7 +2,7 @@ title: Rust for Embedded Applications minutes_to_complete: 10 official_docs: https://docs.rust-embedded.org/ -author_primary: Ronan Synnott +author: Ronan Synnott additional_search_terms: - compiler - rust diff --git a/content/install-guides/sbt.md b/content/install-guides/sbt.md index 24eb0649f3..ee3dd0a9c7 100644 --- a/content/install-guides/sbt.md +++ b/content/install-guides/sbt.md @@ -1,7 +1,7 @@ --- title: sbt -author_primary: Jason Andrews +author: Jason Andrews minutes_to_complete: 10 additional_search_terms: diff --git a/content/install-guides/skopeo.md b/content/install-guides/skopeo.md index 2bb0008e45..dff5c2aa88 100644 --- a/content/install-guides/skopeo.md +++ b/content/install-guides/skopeo.md @@ -1,6 +1,6 @@ --- title: Skopeo -author_primary: Jason Andrews +author: Jason Andrews minutes_to_complete: 10 official_docs: https://github.com/containers/skopeo diff --git a/content/install-guides/socrates.md b/content/install-guides/socrates.md index 6ddf70f2f3..bb816b296e 100644 --- a/content/install-guides/socrates.md +++ b/content/install-guides/socrates.md @@ -16,7 +16,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 30 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://developer.arm.com/documentation/101400 diff --git a/content/install-guides/ssh.md b/content/install-guides/ssh.md index 7f33ca74bc..9046fd03c7 100644 --- a/content/install-guides/ssh.md +++ b/content/install-guides/ssh.md @@ -12,7 +12,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://www.openssh.com/manual.html @@ -56,7 +56,7 @@ If the result includes a line with `sshd` the daemon is running. root 1113 1 0 18:48 ? 00:00:00 /usr/sbin/sshd -D ``` Another way to check if the SSH daemon is running is to query the SSH service. -```bash +```console sudo systemctl status sshd ``` If the output displays "running", then the SSH daemon is already running. diff --git a/content/install-guides/stm32_vs.md b/content/install-guides/stm32_vs.md index b032306076..660f62022f 100644 --- a/content/install-guides/stm32_vs.md +++ b/content/install-guides/stm32_vs.md @@ -20,7 +20,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 15 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: diff --git a/content/install-guides/streamline-cli.md b/content/install-guides/streamline-cli.md index 12ebc32fa2..300eb55ba1 100644 --- a/content/install-guides/streamline-cli.md +++ b/content/install-guides/streamline-cli.md @@ -14,7 +14,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Julie Gaskin +author: Julie Gaskin ### Link to official documentation official_docs: https://developer.arm.com/documentation/109847/latest/ @@ -74,12 +74,11 @@ If you are using the `workflow_topdown_basic option`, ensure that your applicati ## Using Python scripts -The Python scripts provided with Streamline CLI tools require Python 3.8 or later, and depend on several third-party modules. We recommend creating a Python virtual environment containing these modules to run the tools. +The Python scripts provided with Streamline CLI tools require Python 3.8 or later, and depend on several third-party modules. We recommend creating a Python virtual environment containing these modules to run the tools. Create a virtual environment: -```sh -# From Bash +```bash python3 -m venv sl-venv source ./sl-venv/bin/activate ``` @@ -96,7 +95,7 @@ The Streamline CLI tools are available as a standalone download to enable easy i To download the latest version of the tool and extract it to the current working directory you can use our download utility script: -```sh +```bash wget https://artifacts.tools.arm.com/arm-performance-studio/Streamline_CLI_Tools/get-streamline-cli.py python3 get-streamline-cli.py install python3 -m pip install -r ./streamline_cli_tools/bin/requirements.txt @@ -104,7 +103,7 @@ python3 -m pip install -r ./streamline_cli_tools/bin/requirements.txt If you want to add the Streamline tools to your search path: -```sh +```bash export PATH=$PATH:$PWD/streamline_cli_tools/bin ``` @@ -112,14 +111,12 @@ The script can also be used to download a specific version, or install to a user * To list all available versions: - ```sh python3 get-streamline-cli.py list ``` * To download, but not install, a specific version: - ```sh python3 get-streamline-cli.py download --tool-version ``` diff --git a/content/install-guides/streamline.md b/content/install-guides/streamline.md index 7a9905f60a..df06f12e09 100644 --- a/content/install-guides/streamline.md +++ b/content/install-guides/streamline.md @@ -25,7 +25,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: https://developer.arm.com/documentation/101816 diff --git a/content/install-guides/successkits.md b/content/install-guides/successkits.md index fd3312e328..2e0c9e5245 100644 --- a/content/install-guides/successkits.md +++ b/content/install-guides/successkits.md @@ -16,7 +16,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 5 -author_primary: Ronan Synnott +author: Ronan Synnott ### Link to official documentation official_docs: diff --git a/content/install-guides/swift.md b/content/install-guides/swift.md index 3606e7ce82..ec8eae0788 100644 --- a/content/install-guides/swift.md +++ b/content/install-guides/swift.md @@ -1,7 +1,7 @@ --- title: Swift -author_primary: Jason Andrews +author: Jason Andrews minutes_to_complete: 10 additional_search_terms: diff --git a/content/install-guides/sysbox.md b/content/install-guides/sysbox.md index 412c76a4e6..e2fe4db163 100644 --- a/content/install-guides/sysbox.md +++ b/content/install-guides/sysbox.md @@ -16,7 +16,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 30 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://github.com/nestybox/sysbox/blob/master/docs/user-guide/README.md diff --git a/content/install-guides/terraform.md b/content/install-guides/terraform.md index fe14076589..7f8cee937a 100644 --- a/content/install-guides/terraform.md +++ b/content/install-guides/terraform.md @@ -8,7 +8,7 @@ additional_search_terms: layout: installtoolsall minutes_to_complete: 30 -author_primary: Jason Andrews +author: Jason Andrews multi_install: false multitool_install_part: false official_docs: https://developer.hashicorp.com/terraform/docs @@ -16,8 +16,6 @@ test_images: - ubuntu:latest test_link: false test_maintenance: true -test_status: -- passed title: Terraform tool_install: true weight: 1 @@ -31,20 +29,27 @@ Terraform is available for Windows, macOS, Linux and supports the Arm architectu [General installation information](https://developer.hashicorp.com/terraform/downloads) is available which covers all supported operating systems. -This article provides a quick solution to install Terraform for Ubuntu on Arm. +This guide provides a quick solution to install Terraform for Ubuntu on Arm and macOS on Apple Silicon. Confirm you are using an Arm machine by running: + ```bash uname -m ``` -The output should be: + +For Linux, the output should be: + ```output aarch64 ``` -If you see a different result, you are not using an Arm computer running 64-bit Linux. +For macOS, the output should be: + +```output +arm64 +``` -## Download and Install +## Download and install Terraform for Ubuntu The easiest way to install Terraform for Ubuntu on Arm is to use the zip file and copy the executable. @@ -65,8 +70,39 @@ unzip terraform_${TER_VER}_linux_arm64.zip sudo cp terraform /usr/local/bin/ ``` -Confirm the executable is available. +## Download and install Terraform for macOS + +If you have [brew](https://brew.sh/) installed, installing Terraform for macOS is simple as: + +```console +brew tap hashicorp/tap +brew install hashicorp/tap/terraform +``` + +If you don't have brew installed or prefer to directly install via binary, you can download [Terraform for ARM64](https://developer.hashicorp.com/terraform/install#darwin) directly from the Terraform website. + +## Run the Terraform executable and print the version + +After installing, you can enter the following command to verify the installation: ```bash { target="ubuntu:latest" } terraform version ``` + +The output will be similar to the output shown below. + +For Linux: + +```output +Terraform v1.10.5 +on linux_arm64 +``` + +For macOS: + +```output +Terraform v1.10.5 +on darwin_arm64 +``` + +You are now ready to use Terraform. diff --git a/content/install-guides/topdown-tool.md b/content/install-guides/topdown-tool.md index 3265736ebb..e02feae171 100644 --- a/content/install-guides/topdown-tool.md +++ b/content/install-guides/topdown-tool.md @@ -14,7 +14,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://gitlab.arm.com/telemetry-solution/telemetry-solution @@ -71,7 +71,7 @@ For Debian based distributions (including Ubuntu) run: ```bash { target="ubuntu:latest" } sudo apt update -sudo apt install python3-pip python-is-python3 -y +sudo apt install python-is-python3 python3-pip python3-venv python3-packaging linux-tools-generic linux-tools-$(uname -r) -y ``` ## Install the Telemetry Solution @@ -84,25 +84,23 @@ git clone https://git.gitlab.arm.com/telemetry-solution/telemetry-solution.git 2. Install the `topdown-tool` executable: -Install `topdown-tool` in `/usr/local/bin` using: +Create a virtual environment for the installation. ```bash -cd telemetry-solution/tools/topdown_tool -sudo pip3 install -e . +python -m venv topdown-venv +source topdown-venv/bin/activate ``` -{{% notice Note %}} -If you are getting errors on the environment being externally managed, try creating a virtual environment. +Install `topdown-tool` in `/usr/local/bin`: + ```bash -sudo apt install python3-venv -y -python3 -m venv topdown-venv -source topdown-venv/bin/activate +cd telemetry-solution/tools/topdown_tool +sudo pip install -e . ``` -{{% /notice %}} 3. Confirm you can run `top-down` using the `version` command: -```bash { target="ubuntu:latest" } +```bash topdown-tool --help ``` diff --git a/content/install-guides/vnc.md b/content/install-guides/vnc.md index c0cd7db61f..9d3bd70dd5 100644 --- a/content/install-guides/vnc.md +++ b/content/install-guides/vnc.md @@ -11,7 +11,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 30 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation diff --git a/content/install-guides/vs-woa.md b/content/install-guides/vs-woa.md index 072742abce..255ffd3bc8 100644 --- a/content/install-guides/vs-woa.md +++ b/content/install-guides/vs-woa.md @@ -20,7 +20,7 @@ minutes_to_complete: 30 ### Link to official documentation official_docs: -author_primary: Pareena Verma +author: Pareena Verma ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. diff --git a/content/install-guides/vscode-tunnels.md b/content/install-guides/vscode-tunnels.md index 586209385c..99922c48f9 100644 --- a/content/install-guides/vscode-tunnels.md +++ b/content/install-guides/vscode-tunnels.md @@ -12,7 +12,7 @@ additional_search_terms: ### Estimated completion time in minutes (please use integer multiple of 5) minutes_to_complete: 10 -author_primary: Jason Andrews +author: Jason Andrews ### Link to official documentation official_docs: https://code.visualstudio.com/docs/remote/vscode-server diff --git a/content/install-guides/windows-perf-vs-extension.md b/content/install-guides/windows-perf-vs-extension.md index 79d0dd668a..a7394d7ebe 100644 --- a/content/install-guides/windows-perf-vs-extension.md +++ b/content/install-guides/windows-perf-vs-extension.md @@ -1,16 +1,13 @@ --- ### Title the install tools article with the name of the tool to be installed ### Include vendor name where appropriate -title: WindowsPerf Visual Studio Extension -draft: true -cascade: - draft: true +title: Visual Studio Extension for WindowsPerf minutes_to_complete: 10 -official_docs: https://github.com/arm-developer-tools/windowsperf-vs-extension +official_docs: https://gitlab.com/Linaro/WindowsPerf/vs-extension -author_primary: Nader Zouaoui +author: Nader Zouaoui ### Optional additional search terms (one per line) to assist in finding the article additional_search_terms: @@ -18,9 +15,9 @@ additional_search_terms: - profiling - profiler - windows - - woa - windows on arm - visual studio + ### FIXED, DO NOT MODIFY weight: 1 # Defines page ordering. Must be 1 for first (or only) page. tool_install: true # Set to true to be listed in main selection page, else false @@ -28,73 +25,101 @@ multi_install: FALSE # Set to true if first page of multi-page article, else fal multitool_install_part: false # Set to true if a sub-page of a multi-page article, else false layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles --- -[WindowsPerf](/install-guides/wperf/) is a lightweight performance profiling tool inspired by Linux Perf, and specifically tailored for Windows on Arm. It leverages the AArch64 Performance Monitoring Unit (PMU) and its hardware counters to offer precise profiling capabilities. -Recognizing the complexities of command-line interaction, the WindowsPerf GUI is a Visual Studio 2022 extension created to provide a more intuitive, integrated experience within the Integrated Development Environment (IDE). This tool enables developers to interact with WindowsPerf, adjust settings, and visualize performance data seamlessly in Visual Studio. +WindowsPerf is a lightweight performance profiling tool inspired by Linux Perf, and designed specifically for Windows on Arm. -## Overview of key features +The WindowsPerf GUI is a Visual Studio 2022 extension that provides an intuitive, integrated experience within the Visual Studio Integrated Development Environment (IDE). The extension enables developers to interact with WindowsPerf, adjust settings, and visualize performance data seamlessly in Visual Studio. -The WindowsPerf GUI extension is composed of several key features, each designed to streamline the user experience: +## Before you begin -- **WindowsPerf Configuration**: Connect directly to `wperf.exe` for a seamless integration. Configuration is accessible by selecting **Tools > Options > Windows Perf > WindowsPerf Path**. -- **Host Data**: Understand your environment by selecting **Tools** then **WindowsPerf Host Data**. This offers insights into tests run by WindowsPerf. -- **Output Logging**: All commands executed through the GUI are logged, ensuring transparency and supporting performance analysis. -- **Sampling UI**: Customize your sampling experience by selecting events, setting frequency and duration, choosing programs for sampling, and comprehensively analyzing results. See screenshot below. +Before installing the Visual Studio Extension for WindowsPerf, complete the following steps: -![Sampling preview #center](../_images/wperf-vs-extension-sampling-preview.png "Sampling settings UI Overview") +1. Install [Visual Studio 2022](/install-guides/vs-woa/) on your Windows on Arm device. +2. Install WindowsPerf using the [WindowsPerf install guide](/install-guides/wperf/). +3. Install the LLVM toolchain using the [LLVM toolchain for Windows on Arm install guide](/install-guides/llvm-woa/). +{{% notice llvm-objdump %}} +The disassembly feature requires `llvm-objdump` in the search path. Verify that your `%PATH%` variable includes the location of `llvm-objdump` to ensure proper functionality. +{{% /notice %}} -- **Counting Settings UI**: Build a `wperf stat` command from scratch using the configuration interface, then view the output in the IDE or open it with Windows Performance Analyzer (WPA). See screenshot below. +### Install using the Visual Studio Extension Manager +To install the Visual Studio extension for WindowsPerf from Visual Studio, use the Extension Manager: -![Counting preview #center](../_images/wperf-vs-extension-counting-preview.png "Counting settings UI Overview") +1. Open Visual Studio 2022. +2. Navigate to the `Extensions` menu, and select `Manage Extensions`. +3. Select the `Search (Ctrl+L)` bar, and type `WindowsPerf`. +4. Select the `Install` button. +5. Restart Visual Studio to complete installation. -## Before you begin +![Install #center](/install-guides/_images/wperf-vs-extension-install-page.png) -Before installing WindowsPerf Visual Studio Extension, check the following: -1. Ensure Visual Studio 2022 is installed on your Windows on Arm device. -2. Download and install WindowsPerf by following the [WindowsPerf install guide](/install-guides/wperf/). -3. (Recommended) You can install the LLVM toolchain by following the [LLVM toolchain for Windows on Arm install guide](/install-guides/llvm-woa). +### Install from GitLab -{{% notice llvm-objdump %}} -The disassembly feature needs to have `llvm-objdump` available at `%PATH%` to work properly. -{{% /notice %}} +You can also install the WindowsPerf Visual Studio Extension from GitLab. -### Installation from Visual Studio Extension Manager +Using a browser, visit the [Releases](https://gitlab.com/Linaro/WindowsPerf/vs-extension/-/releases) page and download the latest file. For example, `windowsperf-gui-3.1.3.zip`. -To install the WindowsPerf Visual Studio Extension from Visual Studio: +Unzip the downloaded file and double click on the `WindowsPerfGUI.vsix` file. -1. Open Visual Studio 2022. -2. Go to the **Extensions** menu and select **Manage Extensions**. -4. Click on the search bar (Ctrl+L) and type `WindowsPerf`. -5. Click on the **Install** button and restart Visual Studio. +Follow the prompts to install the Visual Studio extension. -![WindowsPerf install page #center](../_images/wperf-vs-extension-install-page.png) +![VSIX Install #center](/install-guides/_images/vs-ext-install.png) -### Installation from GitHub +{{% notice Note %}} +Ensure that any previous version of the extension is uninstalled and that Visual Studio is closed before installing the extension. +{{% /notice %}} -You can also install the WindowsPerf Visual Studio Extension from GitHub. +### Build and install from source code -Download the installation file directly from the [GitHub release page](https://github.com/arm-developer-tools/windowsperf-vs-extension/releases). +Building the source is not required, but is an alternative installation method if you want to customize the extension. -Unzip the downloaded file and double click on the `WindowsPerfGUI.vsix` file. +To build the source code, clone [the repository](https://gitlab.com/Linaro/WindowsPerf/vs-extension.git) using Git. + +```console +git clone https://gitlab.com/Linaro/WindowsPerf/vs-extension.git +``` + +Double click the `WindowsPerfGUI.sln` solution file to open the project Visual Studio. {{% notice Note %}} -Make sure that any previous version of the extension is uninstalled and that Visual Studio is closed before installing the extension. +Visual Studio may prompt you to install additional components required to build the project, install these components. {{% /notice %}} -### Build from source +Open the `Build` menu and select `Build Solution` to create `WindowsPerfGUI.dll` and `WindowsPerfGUI.vsix`. You can replace the currently installed files with these files to try any changes you have made. -To build the source code, clone [the repository](https://github.com/arm-developer-tools/windowsperf-vs-extension) and build the `WindowsPerfGUI` solution using the default configuration in Visual Studio. +### WindowsPerf Setup -Building the source is not required, but offered as an alternative installation method if you want to customize the extension. +After the extension is installed, you must link the extension with the `wperf.exe` file by navigating to `Tools > Options > WindowsPerf > WindowsPerf Path` in Visual Studio. -### WindowsPerf Setup +Use the `Select` button to navigate to your `wperf.exe` and the `Validate` button to confirm the executable is found. + +![Validate #center](/install-guides/_images/wperf-validate.png) + +This step is crucial for utilizing the extension, and the extension will not work without this configuration. + +## Overview of key features + +The WindowsPerf extension is composed of several key features, each designed to streamline the user experience: + +* WindowsPerf Configuration: Connect directly to `wperf.exe` for a seamless integration. +* Host Data: Understand your environment by selecting `Tools` then `WindowsPerf Host Data`. +* Output Logging: All commands executed through the GUI are logged, ensuring transparency and aiding with performance analysis. +* Sampling UI: Customize your sampling experience by selecting events, setting frequency and duration, choosing programs for sampling, and comprehensively analyzing results. + +The sampling interface is shown below: + +![Sampling preview #center](/install-guides/_images/wperf-vs-extension-sampling-preview.png) + +* Counting Settings UI: Build a `wperf stat` command from scratch using the configuration interface, then view the output in VS Code or open it with Windows Performance Analyzer (WPA). +The interface to configure counting is shown below: + +![Counting preview #center](/install-guides/_images/wperf-vs-extension-counting-preview.png) -To get started, you must link the GUI with the executable file `wperf.exe` by navigating to **Tools > Options > WindowsPerf > WindowsPerf Path**. This step is crucial for utilizing the GUI, and the extension will not work if you don't do it. +## Uninstall the WindowsPerf extension -## Uninstall the WindowsPerfGUI extension +To uninstall the extension in Visual Studio: -In Visual Studio go to **Extensions > Manage Extensions > Installed > All > WindowsPerfGUI** and select **Uninstall**. +Go to `Extensions > Manage Extensions > Installed > All > WindowsPerfGUI` and select `Uninstall`. -As this will be scheduled by Visual Studio, you might need to close the VS instance and follow the uninstall wizard to remove the extension. +Visual Studio will schedule the uninstallation. To complete the process, close Visual Studio and follow the uninstall dialog prompts. diff --git a/content/install-guides/windows-perf-wpa-plugin.md b/content/install-guides/windows-perf-wpa-plugin.md index 9afda85d45..15bc00ca61 100644 --- a/content/install-guides/windows-perf-wpa-plugin.md +++ b/content/install-guides/windows-perf-wpa-plugin.md @@ -3,9 +3,9 @@ title: Windows Performance Analyzer (WPA) plugin minutes_to_complete: 15 -official_docs: https://github.com/arm-developer-tools/windowsperf-wpa-plugin +official_docs: https://gitlab.com/Linaro/WindowsPerf/wpa-plugin -author_primary: Alaaeddine Chakroun +author: Alaaeddine Chakroun ### Optional additional search terms (one per line) to assist in finding the article additional_search_terms: @@ -83,14 +83,14 @@ Close Windows Performance Analyzer. You are now ready to install the WPA plugin, which is a single `.dll` file. -Download the `.zip` file from the [Windows Perf WPA plugin GitHub releases page](https://github.com/arm-developer-tools/windowsperf-wpa-plugin/releases) on GitHub. +Download the `.zip` file from the [Windows Perf WPA plugin releases page](https://gitlab.com/Linaro/WindowsPerf/wpa-plugin/-/releases). Alternatively, you can download the `.zip` file from a command prompt: ```console mkdir wpa-plugin cd wpa-plugin -curl -L -O https://github.com/arm-developer-tools/windowsperf-wpa-plugin/releases/download/1.0.3/wpa-plugin-1.0.3.zip +curl -L -O https://gitlab.com/api/v4/projects/50944937/packages/generic/wperf-wpa-plugin/1.0.3/wpa-plugin-1.0.3.zip ``` Extract the `.dll` file from the downloaded `.zip` file. @@ -140,4 +140,3 @@ wpa -addsearchdir %USERPROFILE%\Downloads\wpa-plugin-1.0.3 -i %USERPROFILE%\Down ## How do I uninstall the WPA plugin? To uninstall the plugin, simply delete the `WPAPlugin.dll` file. - diff --git a/content/install-guides/windows-sandbox-woa.md b/content/install-guides/windows-sandbox-woa.md index 7c04164303..f7e7ae4af1 100644 --- a/content/install-guides/windows-sandbox-woa.md +++ b/content/install-guides/windows-sandbox-woa.md @@ -16,7 +16,7 @@ minutes_to_complete: 15 ### Link to official documentation official_docs: https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-overview -author_primary: Pareena Verma +author: Pareena Verma ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. diff --git a/content/install-guides/wperf.md b/content/install-guides/wperf.md index 3abe9025f2..ff9694ed96 100644 --- a/content/install-guides/wperf.md +++ b/content/install-guides/wperf.md @@ -18,9 +18,9 @@ additional_search_terms: minutes_to_complete: 15 ### Link to official documentation -official_docs: https://github.com/arm-developer-tools/windowsperf/blob/main/INSTALL.md +official_docs: https://gitlab.com/Linaro/WindowsPerf/windowsperf/blob/main/INSTALL.md -author_primary: Jason Andrews +author: Jason Andrews ### PAGE SETUP weight: 1 # Defines page ordering. Must be 1 for first (or only) page. @@ -30,7 +30,7 @@ multitool_install_part: false # Set to true if a sub-page of a multi-page arti layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles --- -WindowsPerf is a Linux Perf-inspired Windows on Arm performance profiling tool. Profiling is based on the Arm AArch64 PMU and its hardware counters. WindowsPerf supports the counting model for obtaining aggregate counts of occurrences of PMU events, and the sampling model for determining the frequencies of event occurrences produced by program locations at the function, basic block, and instruction levels. WindowsPerf is an open-source project hosted on [GitHub](https://github.com/arm-developer-tools/windowsperf). +WindowsPerf is a Linux Perf-inspired Windows on Arm performance profiling tool. Profiling is based on the Arm AArch64 PMU and its hardware counters. WindowsPerf supports the counting model for obtaining aggregate counts of occurrences of PMU events, and the sampling model for determining the frequencies of event occurrences produced by program locations at the function, basic block, and instruction levels. WindowsPerf is an open-source project hosted on [GitLab](https://gitlab.com/Linaro/WindowsPerf/windowsperf/) WindowsPerf consists of a kernel-mode driver and a user-space command-line tool. You can seamlessly integrate the WindowsPerf command line tool with both the [WindowsPerf Visual Studio Extension](#vs2022) and the [WindowsPerf VS Code Extension](#vscode). These extensions, which you can download from the Visual Studio Marketplace, enhance the functionality of WindowsPerf by providing a user-friendly interface, and additional features for performance analysis and debugging. This integration allows developers to efficiently analyze and optimize their applications directly within their preferred development environment. @@ -39,6 +39,46 @@ WindowsPerf consists of a kernel-mode driver and a user-space command-line tool. You cannot use WindowsPerf on virtual machines, such as cloud instances. {{% /notice %}} +## Using winget (Recommended) + +### Install + +You can now install WindowsPerf directly from [winget](https://learn.microsoft.com/en-us/windows/package-manager/). Open an `Administrator` terminal on PowerShell and type + +```console +winget install WindowsPerf +``` + +The output should look like: + +```output +Found WindowsPerf [Arm.WindowsPerf] Version 4.3.1.0 +This application is licensed to you by its owner. +Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. +Downloading https://developer.arm.com/-/cdn-downloads/permalink/WindowsPerf/Installer/windowsperf-4.3.1.msi + 3.07 MB +Successfully verified installer hash +Starting package install... +Successfully installed +``` + +![Winget installation video](/install-guides/_images/wperf-winget-installation.gif) + +It will install the latest available WindowsPerf along with the [WPA plugins](/learning-paths/laptops-and-desktops/windowsperf_wpa_plugin/). To check that the installation was done correctly open a new terminal tab or window and follow the instructions under the [verify installation section](/install-guides/wperf/#verify-install) + +### Uninstall +If you need to uninstall WindowsPerf, open an `Administrator` terminal on PowerShell and run: +```console +winget uninstall WindowsPerf +``` + +The output from a successful uninstallation will look like: +```output +Found WindowsPerf [Arm.WindowsPerf] +Starting package uninstall... +Successfully uninstalled +``` + ## Visual Studio and the Windows Driver Kit (WDK) WindowsPerf relies on `dll` files installed with Visual Studio, from the Community Edition or higher and, optionally, installers from the Windows Driver Kit extension. @@ -49,30 +89,30 @@ See also the [Visual Studio for Windows on Arm install guide](/install-guides/vs ## Download WindowsPerf -You can download the latest release package, `windowsperf-bin-.zip` from the Arm GitHub repository: +You can download the latest release package, `windowsperf-bin-.zip` from the Linaro GitLab repository: ```url -https://github.com/arm-developer-tools/windowsperf/releases +https://gitlab.com/Linaro/WindowsPerf/windowsperf/-/releases ``` To download directly from command prompt, use: ```console -mkdir windowsperf-bin-3.8.0 -cd windowsperf-bin-3.8.0 -curl -L -O https://github.com/arm-developer-tools/windowsperf/releases/download/3.8.0/windowsperf-bin-3.8.0.zip +mkdir windowsperf-bin-4.0.0 +cd windowsperf-bin-4.0.0 +curl -L -O https://gitlab.com/api/v4/projects/40381146/packages/generic/windowsperf/4.0.0/windowsperf-bin-4.0.0.zip ``` Unzip the package: ```console -tar -xmf windowsperf-bin-3.8.0.zip +tar -xmf windowsperf-bin-4.0.0.zip ``` ## Install wperf driver You can install the kernel driver using the supplied `wperf-devgen` installer. -The [wperf-devgen](https://github.com/arm-developer-tools/windowsperf/blob/main/wperf-devgen/README.md) tool has been designated as the preferred installer and uninstaller for the WindowsPerf Kernel Driver in the latest release. This tool offers a simple process for managing the installation and removal of the driver. +The [wperf-devgen](https://gitlab.com/Linaro/WindowsPerf/windowsperf/-/tree/main/wperf-devgen/README.md) tool has been designated as the preferred installer and uninstaller for the WindowsPerf Kernel Driver in the latest release. This tool offers a simple process for managing the installation and removal of the driver. {{% notice Note%}} You must install the driver as `Administrator`. @@ -83,10 +123,10 @@ Open a **Windows Command Prompt** terminal with **Run as administrator** selecte Make sure you are in the `windowsperf-bin-` directory: ```command -cd windowsperf-bin-3.8.0 +cd windowsperf-bin-4.0.0 ``` -### Install with wperf-devgen {#devgen_install} +### Install with wperf-devgen Navigate to the `wperf-driver` folder and run the installer: @@ -103,7 +143,7 @@ Install requested. Device installed successfully ``` -## Verify install +## Verify install You can check everything is working by running the `wperf` executable. @@ -123,8 +163,8 @@ You see output similar to: ```output Component Version GitVer FeatureString ========= ======= ====== ============= - wperf 3.8.0 6d15ddfc +etw-app - wperf-driver 3.8.0 6d15ddfc +etw-drv + wperf 4.0.0 b18197bd +etw-app + wperf-driver 4.0.0 b18197bd +etw-drv ``` ## Uninstall wperf driver @@ -138,7 +178,7 @@ You must uninstall the driver as `Administrator`. ### Uninstall with wperf-devgen {#devgen_uninstall} ```command -cd windowsperf-bin-3.8.0\wperf-driver +cd windowsperf-bin-4.0.0\wperf-driver wperf-devgen uninstall ``` @@ -162,7 +202,7 @@ Install by opening **Extensions** menu, click **Manage Extensions**, and click * In order to set the path to the `wperf.exe` executable, go to **Tools** -> **Options** -> **WindowsPerf** -> **WindowsPerf Path** and set the absolute path to the wperf.exe executable and then click on the **Validate** button. {{% /notice %}} -Also, visit WindowsPerf GUI project website on [GitHub](https://github.com/arm-developer-tools/windowsperf-vs-extension) for more details and latest updates. +Also, visit WindowsPerf GUI project website on [GitLab](https://gitlab.com/Linaro/WindowsPerf/vs-extension) for more details and latest updates. ## Install WindowsPerf VS Code Extension (optional) {#vscode} @@ -180,7 +220,7 @@ If using a non-Windows on Arm host, you can import and analyze `WindowsPerf` JSO You do not need to install `wperf` on non-Windows on Arm devices. {{% /notice %}} -## Further reading +## Read related resources ### WindowsPerf diff --git a/content/learning-paths/automotive/_index.md b/content/learning-paths/automotive/_index.md index 82958f1a66..967c6a1e89 100644 --- a/content/learning-paths/automotive/_index.md +++ b/content/learning-paths/automotive/_index.md @@ -11,9 +11,15 @@ subtitle: Build secure, connected, smart IoT devices title: Automotive weight: 4 subjects_filter: -- Containers and Virtualization: 1 +- Containers and Virtualization: 2 +- Performance and Architecture: 1 operatingsystems_filter: -- Linux: 1 +- Baremetal: 1 +- Linux: 2 +- RTOS: 1 tools_software_languages_filter: - Automotive: 1 +- Docker: 1 +- Python: 1 +- ROS2: 1 --- diff --git a/content/learning-paths/automotive/intro/_index.md b/content/learning-paths/automotive/intro/_index.md index 02135eb34d..20aa7cb6da 100644 --- a/content/learning-paths/automotive/intro/_index.md +++ b/content/learning-paths/automotive/intro/_index.md @@ -16,7 +16,7 @@ draft: true cascade: draft: true -author_primary: Jason Andrews +author: Jason Andrews ### Tags skilllevels: Introductory @@ -30,9 +30,18 @@ operatingsystems: tools_software_languages: -### FIXED, DO NOT MODIFY -# ================================================================================ -weight: 1 # _index.md always has weight of 1 to order correctly +further_reading: + - resource: + title: Raspberry Pi Pico + link: https://www.raspberrypi.com/products/raspberry-pi-pico/ + type: website + - resource: + title: BBC micro:bit + link: https://microbit.org/ + type: website + + +weight: 1 layout: "learningpathall" # All files under learning paths have this same wrapper learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. --- diff --git a/content/learning-paths/automotive/intro/_next-steps.md b/content/learning-paths/automotive/intro/_next-steps.md index dd9ad46d8b..c3db0de5a2 100644 --- a/content/learning-paths/automotive/intro/_next-steps.md +++ b/content/learning-paths/automotive/intro/_next-steps.md @@ -1,33 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - The Machine Learning (ML) capabilities of embedded devices is rapidly increasing. Why not learn about ML development? -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/embedded-and-microcontrollers/nav-mlek/" - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: Raspberry Pi Pico - link: https://www.raspberrypi.com/products/raspberry-pi-pico/ - type: website - - resource: - title: BBC micro:bit - link: https://microbit.org/ - type: website - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/automotive/openadkit1_container/1_sdv_soafee.md b/content/learning-paths/automotive/openadkit1_container/1_sdv_soafee.md new file mode 100644 index 0000000000..d375374966 --- /dev/null +++ b/content/learning-paths/automotive/openadkit1_container/1_sdv_soafee.md @@ -0,0 +1,57 @@ +--- +title: Software-Defined Vehicle (SDV) and SOAFEE +weight: 2 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Introduction to Software-Defined Vehicles + +In recent years, the automotive industry has been undergoing a transformation driven by software, with the concept of the Software-Defined Vehicle (SDV) emerging as a key paradigm for the future of intelligent cars. As the number of Electronic Control Units (ECUs) increases and vehicle systems become more complex, the traditional hardware-driven development approach is no longer sufficient. To improve development efficiency and product quality, automotive software development is shifting toward a Shift-Left approach, accelerating validation and deployment processes. + +## The Evolution of Software-Defined Vehicles + +The core idea of SDV is to make software the primary differentiating factor of a vehicle, enabling continuous feature updates via Over-The-Air (OTA) technology. This approach allows manufacturers to shorten development cycles while continuously improving safety and performance after a vehicle is released. Moreover, SDV promotes the adoption of Service-Oriented Architecture (SOA), enabling modular and scalable software that integrates seamlessly with cloud services. + +However, this transition introduces new challenges, particularly in software development and validation. The traditional V-model development process struggles to meet SDV demands since defects are often detected late in development, leading to costly fixes. As a result, Shift-Left has become a crucial strategy to address these challenges. + +One useful Arm Automotive [landing page](https://www.arm.com/markets/automotive/software-defined-vehicles) that you can read. + +## Shift-Left: Detecting Issues Early to Enhance Development Efficiency + +Shift-Left refers to moving testing, validation, and security assessments earlier in the development process to reduce costs and improve reliability. In the SDV context, this means incorporating software architecture design, virtual testing, and automated validation in the early stages to ensure the final product meets safety and performance requirements. + +The key benefits of Shift-Left include: + +- Reduced Development Costs: Early defect detection minimizes time and resources spent on late-stage fixes. + +- Accelerated Development: Continuous Integration and Continuous Deployment (CI/CD) speed up software releases. + +- Improved System Reliability: Simulation and virtual testing enhance software quality and safety. + +However, Shift-Left requires appropriate tools and frameworks to support its implementation; otherwise, it can increase testing complexity. This is where SOAFEE (Scalable Open Architecture for Embedded Edge) plays a critical role. + +Check this [blog](https://newsroom.arm.com/blog/automotive-virtual-platforms) understand how to use virtual platforms enable the automotive industry to accelerate the silicon and software development process through virtual prototyping. + +## SOAFEE: A Standardized Solution for SDV Development + +SOAFEE, an open architecture initiative led by Arm and industry partners, aims to provide a unified framework for software-defined vehicles. It leverages cloud-native technologies and is optimized for embedded environments, enabling developers to adopt modern DevOps workflows to accelerate software development. + +SOAFEE addresses several key challenges: + +- Consistent Development Environment: A standardized abstraction layer allows developers to build and test software across different hardware platforms. + +- Support for Virtualization and Containerization: Enables software testing in virtual machines or containers, facilitating flexible deployment and updates. + +- Enhanced Security and Functional Safety Testing: Built-in security mechanisms and best practices ensure reliability across different use cases. + +With SOAFEE, developers can more effectively adopt Shift-Left methodologies, reducing development bottlenecks and improving software quality. Furthermore, SOAFEE promotes smoother collaboration between different suppliers, fostering an ecosystem for SDV software development. + +As the Software-Defined Vehicle paradigm gains traction, the automotive industry is transitioning toward a software-driven future. To meet the demands of rapid iteration and high-quality standards, development teams must adopt a Shift-Left approach, shifting testing and validation earlier to minimize costs and risks. However, this transition requires the right tools and frameworks, and SOAFEE emerges as the ideal solution to address these challenges. + +With the adoption of SOAFEE, automotive software development will become more standardized and efficient, enabling companies to realize the vision of SDVs faster while delivering a safer, smarter, and more flexible vehicle experience. + +Visit [SOAFEE](https://www.soafee.io/) website to find more detail. + +In the following sections, you will explore a Shift-Left demonstration example that leverages SOAFEE to enable early deployment of autonomous driving software before the hardware is ready. diff --git a/content/learning-paths/automotive/openadkit1_container/2_automotive_softwares.md b/content/learning-paths/automotive/openadkit1_container/2_automotive_softwares.md new file mode 100644 index 0000000000..a9fa5775f6 --- /dev/null +++ b/content/learning-paths/automotive/openadkit1_container/2_automotive_softwares.md @@ -0,0 +1,54 @@ +--- +title: Essential Automotive Software Technologies +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +Before diving into the Deep Dive section of this learning path, I would like to first introduce a few essential software technologies that you need to understand. + +## Robot Operating System 2 (ROS 2) + +Robot Operating System 2 (ROS 2) is an open-source robotics middleware designed to provide a flexible, scalable, and real-time capable framework for robot development. It builds upon the foundations of ROS 1, addressing limitations in distributed computing, security, and multi-robot collaboration. ROS 2 is widely used in autonomous systems, industrial automation, and research applications. + +Key Features of ROS 2: +- **Cross-Platform Support**: Runs on Linux, Windows, and real-time operating systems (RTOS), ensuring flexibility in deployment. + +- **Real-Time Capabilities**: Uses Data Distribution Service (DDS) for efficient inter-process communication, enabling real-time performance. + +- **Enhanced Security & Reliability**: Provides encrypted communication, deterministic scheduling, and built-in fault tolerance. + +- **Multi-Robot & Distributed System Support**: Enables large-scale robotic systems and cloud-based robotics applications. + +- **Modular and Scalable Architecture**: Uses a node-based system where different components operate independently. + +Applications of ROS 2: + +- ROS 2 is used in autonomous vehicles, robotic arms, drones, and medical robots. It supports simulation tools like Gazebo and integrates with AI frameworks for advanced robotics applications. + +- ROS 2’s enhanced performance and flexibility make it a crucial enabler for the future of robotics, providing developers with a powerful platform for building intelligent, autonomous systems. + +Arm’s computing platform fully supports ROS 2 operations. You can use this [link](/install-guides/ros2/) to learn how to install it on an Arm-based machine. + +## Autoware Open AD Kit + +The [Open AD Kit](https://autoware.org/open-ad-kit/), the first SOAFEE blueprint, is a collaborative initiative within the [Autoware](https://autoware.org/) and SOAFEE ecosystems. Developed with contributions from Autoware Foundation members and alliance partners, its goal is to enable Autoware as a fully software-defined platform. + +The Autoware Foundation hosts Autoware, the world’s leading open-source autonomous driving project. + +Autoware, built on ROS, features a modular AD stack with well-defined interfaces and APIs for perception, localization, planning, and control. It supports diverse sensors and hardware, enabling adaptability across vehicle types and applications, from research to commercial deployment. + +Committed to democratizing AD technology, Autoware fosters collaboration among industry, researchers, and developers. By promoting open standards and innovation, the foundation accelerates autonomous driving adoption while ensuring safety, scalability, and real-world usability, driving the future of autonomous mobility through open-source development and ecosystem synergy. + +The Open AD Kit Blueprint has evolved through multiple iterations of containerized Autoware software. It supports both cloud and edge deployments in physical and virtual environments, with OTA updates enabling seamless software upgrades. +The Open AD Kit project continues to be developed at the Open AD Kit working group, and the following are the main goals and principles of the collaborative project: +• Introducing modern cloud-native development and deployment methodologies for the Autoware use +• Introducing mixed-critical orchestration, paving the way for safety and certifiability +• Enabling validation using virtual prototyping platforms to achieve shift-left paradigms +• Providing a consistent production environment to deploy Autoware using hardware abstraction technologies to enable hardware-agnostic solutions + +The Open AD Kit Blueprint has been widely adopted by many ecosystem players to develop their own custom-flavored implementations. The blueprint provides a practical and demonstrable example of building SDV applications, particularly in the autonomous driving domain. Additionally, it serves as a model for creating SOAFEE blueprints, fostering a dynamic ecosystem around them. + +In the following sessions, you will learn how to use the OpenAD Kit autonomous driving simulation environment to run SOAFEE within container and facilitate communication through ROS 2. + diff --git a/content/learning-paths/automotive/openadkit1_container/3_setup_openadkit.md b/content/learning-paths/automotive/openadkit1_container/3_setup_openadkit.md new file mode 100644 index 0000000000..d4c6997760 --- /dev/null +++ b/content/learning-paths/automotive/openadkit1_container/3_setup_openadkit.md @@ -0,0 +1,110 @@ +--- +title: Setup OpenAD Kit +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Execute Autoware Open AD Kit on Arm platform + +Leveraging the high-performance computing power of Arm Neoverse CPUs and its comprehensive software ecosystem, you can run automotive software simulations on any Neoverse computing platforms. + +This learning path can be seamlessly deployed in two type of development environments: Arm Cloud Instances and On-Premise servers. +This example has been tested on [AWS EC2](https://aws.amazon.com/ec2/) and [Ampere Altra workstation](https://www.ipi.wiki/products/ampere-altra-developer-platform), allowing you to choose the most suitable setup based on your needs. + +## Installation + +This learning path requires Docker to run OpenAD Kit. +You can refer to [here](https://learn.arm.com/install-guides/docker/) to learn how to install Docker on an Arm platform. + +First, verify whether Docker is installed on your development environment by running: + +```bash +docker --version +``` + +If Docker is installed, it will display version information similar to the output below: + +```output +Docker version 27.2.0, build 3ab4256 +``` + +Clone the demo repository using: + +```bash +git clone https://github.com/autowarefoundation/openadkit_demo.autoware.git +``` + +The project is containerized within three Docker images, so you do not need to install additional software. + + +## Understanding the Open AD Kit Demo Packages + +The Open AD Kit demo consists of three core components: `simulator`, `planning-control`, and `visualizer`, each serving a distinct function. + +### Simulator: Generating the Scenario + +The simulator is responsible for creating a virtual driving environment to test and validate autonomous driving functionalities. It can simulate various driving scenarios, road conditions, and traffic situations, providing a realistic testbed for planning and control modules. + +The Key Functions of Simulator are: + +- Simulates autonomous driving environments +- Generates sensor data (LiDAR, cameras, radar, IMU) +- Publishes vehicle state information (position, speed, heading) via ROS 2 topics for other components to process. +- Feeds data to planning-control for trajectory planning +- Acts as a data source for visualizer to render the simulation + +Interaction with Other Components +- Provides vehicle states and sensor data to planning-control +- Acts as the primary data source for visualizer + +It is an example to starts a new Docker container named `simulator`, ensuring it runs in interactive mode with a terminal and is automatically removed upon stopping, while using a predefined Docker image pulled from the GitHub Container Registry. + +```bash +docker run --name simulator --rm -it ghcr.io/autowarefoundation/demo-packages:simulator +``` + +### Planning-Control + +The planning-control module is responsible for path planning and vehicle control. It uses data from the simulator to determine the optimal path and send control commands (steering, acceleration, braking) back to the simulator. + +The Key Functions of Planning-Control: +- Receives sensor data and map information from simulator +- Computes motion planning and generates optimal trajectories +- Generates control commands (steering, acceleration, braking) and sends them to the simulator for execution in the virtual environment. +- Acts as the decision-making unit for vehicle movement + +Interaction with Other Components +- Receives sensor inputs and vehicle states from simulator +- Sends planned trajectories and control commands back to simulator +- Feeds trajectory and control data to visualizer for display + +This command starts a new Docker container named `planning-control`, ensuring it runs in interactive mode with a terminal and is automatically removed upon stopping, while using a predefined Docker image pulled from the GitHub Container Registry. Additionally, it connects to the host network to enable seamless ROS 2 communication with other components, such as the simulator and visualizer. + +```bash +docker run --name planning-control --rm -it --network host ghcr.io/autowarefoundation/demo-packages:planning-control +``` + +### Visualizer + +The visualizer provides real-time visualization of the simulation, including vehicle movement, planned trajectories, sensor outputs, and the driving environment. It enables developers to analyze and debug system behavior visually. + +The Key Functions of Visualizer: +- Subscribes to ROS topics from simulator and planning-control +- Displays vehicle position, planned trajectories, and sensor readings +- Uses RViz & VNC for rendering visual outputs +- Supports remote access via Ngrok or VNC + +Interaction with Other Components +- Receives sensor and vehicle state data from simulator +- Receives planned trajectories and control commands from planning-control +- Presents a visual representation of all ROS 2 topic data + +This command starts a new Docker container named `visualizer`, ensuring it runs in interactive mode with a terminal and is automatically removed upon stopping. It maps port 6080 from the container to the host, enabling remote visualization via a web browser, allowing users to view real-time simulation data using VNC-based visualization tools. + +```bash +docker run --name visualizer --rm -it -p 6080:6080 ghcr.io/autowarefoundation/demo-packages:visualizer +``` + +After gaining a basic understanding of OpenAD Kit, the next section will guide you you through running three containers simultaneously on a single physical machine. diff --git a/content/learning-paths/automotive/openadkit1_container/4_run_openadkit.md b/content/learning-paths/automotive/openadkit1_container/4_run_openadkit.md new file mode 100644 index 0000000000..b2d9eaa649 --- /dev/null +++ b/content/learning-paths/automotive/openadkit1_container/4_run_openadkit.md @@ -0,0 +1,174 @@ +--- +title: Open AD Kit Demo +weight: 5 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Execute Autoware Open AD Kit by Docker Compose + +Open AD Kit leverages Docker Compose technology to integrate all container initialization and corresponding configurations, allowing you to start with all the settings from the previous session without any modifications. + +That said, we can still gain a deeper understanding of the system by examining the `docker/docker-compose.yml` file. + +The script first starts the Visualizer service in detached mode, followed by the continuous execution of Planning & Simulation. The detailed ROS commands are defined in the docker/docker-compose.yml file. + + +### Visualizer Configuration + +Similar to the example in the previous session, this Docker Compose service configures and runs a visualization tool (Visualizer) within a Docker container. It renders real-time simulation data using RViz and allows remote access via VNC and Ngrok. + +The `visualizer` service maps: + +- **volume `./etc/simulation:/autoware/scenario-sim`** + + The volume mapping `./etc/simulation:/autoware/scenario-sim` mounts a local directory (./etc/simulation) to a specific path inside the container (/autoware/scenario-sim). This means that files stored in the ./etc/simulation directory on the host machine will be accessible from inside the container at /autoware/scenario-sim. + +- **Port `6080:6080`** + + In the Autoware visualization environment, the 6080:6080 port mapping is used to enable web-based VNC remote desktop access, allowing users to interact with tools like Rviz directly from their browser without needing an external VNC client. + + Inside the container, VNC is enabled via the `VNC_ENABLED=true` environment variable, ensuring that the VNC server is running. The VNC server listens on port 6080, making it accessible through a web-based interface, which simplifies remote monitoring and control of autonomous driving simulations, improving development and testing efficiency. + + Enable VNC-based remote visualization to interact with the Autoware environment remotely. + To access the visualization interface: + - On the same machine, open: `http://localhost:6080` + - From another device, use: `http://:6080` + +```yml + visualizer: + image: ghcr.io/autowarefoundation/demo-packages:visualizer + container_name: visualizer + volumes: + - ./etc/simulation:/autoware/scenario-sim + ports: + - 6080:6080 + - 5999:5999 + environment: + - ROS_DOMAIN_ID=88 + - VNC_ENABLED=true + - RVIZ_CONFIG=/autoware/scenario-sim/rviz/scenario_simulator.rviz + - NGROK_AUTHTOKEN=${NGROK_AUTHTOKEN} + - NGROK_URL=${NGROK_URL} +``` + + +### Planning-Control Module +The second Docker Compose service defines the `planning-control` module within a simulation environment. The planning-control container is responsible for Motion planning, Trajectory generation, Vehicle control + +One key aspect to mention is the depends_on directive. +To ensure that planning-control receives sensor data from the simulator, use depends_on to make sure the simulator service starts before planning-control begins execution. + +ROS2 command: +The command starts the planning_simulator.launch.xml launch file, which initializes the motion planning module: +- map_path:=/autoware/scenario-sim/map → Loads the simulation map. +- vehicle_model:=sample_vehicle → Uses a predefined vehicle model for testing. +- sensor_model:=sample_sensor_kit → Loads sensor configurations for perception. +- scenario_simulation:=true → Enables scenario-based simulation. +- rviz:=false → Disables RViz visualization inside this container. +- perception/enable_traffic_light:=false → Disables traffic light recognition for this test. + + +```yml + planning-control: + image: ghcr.io/autowarefoundation/demo-packages:planning-control + container_name: planning-control + depends_on: + - simulator + volumes: + - ./etc/simulation:/autoware/scenario-sim + - $CONF_FILE:/opt/autoware/share/autoware_launch/config/planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/static_obstacle_avoidance.param.yaml + - $COMMON_FILE:/opt/autoware/share/autoware_launch/config/planning/scenario_planning/common/common.param.yaml + environment: + - ROS_DOMAIN_ID=88 + - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp + command: > + ros2 launch autoware_launch planning_simulator.launch.xml + map_path:=/autoware/scenario-sim/map + vehicle_model:=sample_vehicle + sensor_model:=sample_sensor_kit + scenario_simulation:=true + rviz:=false + perception/enable_traffic_light:=false +``` + +### Simulator Module + +The final Docker Compose service defines the `simulator` module. The simulator is responsible for creating a virtual driving environment, generating sensor data, and providing vehicle state information to other components such as planning-control and visualizer. + +Maps local directory (./etc/simulation) to /autoware/scenario-sim inside the container. + +ROS2 command: +The following command starts the scenario_test_runner.launch.py launch file, initializing the Autoware simulation: + +- scenario:=/autoware/scenario-sim/scenario/yield_maneuver_demo.yaml → Specifies the scenario configuration file. +- sensor_model:=sample_sensor_kit → Uses a predefined sensor configuration. +- vehicle_model:=sample_vehicle → Uses a sample vehicle model. +- global_frame_rate:=20 → Sets the simulation frame rate to 20 FPS. +- launch_rviz:=false → Prevents RViz from launching in the container. + +```yml + simulator: + image: ghcr.io/autowarefoundation/demo-packages:simulator + container_name: simulator + volumes: + - ./etc/simulation:/autoware/scenario-sim + environment: + - ROS_DOMAIN_ID=88 + - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp + command: > + ros2 launch scenario_test_runner scenario_test_runner.launch.py + record:=false + scenario:=/autoware/scenario-sim/scenario/yield_maneuver_demo.yaml + sensor_model:=sample_sensor_kit + vehicle_model:=sample_vehicle + initialize_duration:=90 + global_timeout:=$TIMEOUT + global_frame_rate:=20 + launch_autoware:=false + launch_rviz:=false +``` + +### Execute Planning Visualizer Demo + +To start the Planning Visualizer Demo, execute the following script: + +```bash +./docker/run.sh +``` + +This Bash script sets up environment variables and orchestrates the execution of Open AD Kit's visualizer, planning-control, and simulator using the previously mentioned Docker Compose setup. The script runs in a loop, continuously testing two different planning configurations: CONF_FILE_FAIL and CONF_FILE_PASS. + +Once the script starts successfully, you will see a similar output. +You can then use your browser to monitor the simulation data in real-time. + +![img1 alt-text#center](vnc_address.png "Figure 1: Execute run.sh") + +Now you can use the browser to access visualization at the above's URLs: +In this example is http://34.244.98.151:6080/vnc.html + +{{% notice Note %}} +Ensure that the server allows your IP address and port 6080 to connect. +{{% /notice %}} + +To access the visualizer: +1. Open a web browser and go to: `http://:6080/vnc.html` +2. Click **Connect** on the VNC login screen. +![img2 alt-text#center](openadkit_connect.jpg "Figure 2: Connect VNC") +3. Enter the default VNC password: **"openadkit"**. +![img3 alt-text#center](openadkit_passwd.jpg "Figure 3: Input VNC password") + +You are now entered the OpenAD Kit simulation environment. + +This demo will continuously repeat the two scenarios. +- **fail_static_obstacle_avoidance.param.yaml**: In the first scenario, the vehicle remains stationary behind the obstacle. +- **pass_static_obstacle_avoidance.param.yaml**: In the second scenario, the vehicle is permitted to change lanes to maneuver around the obstacle. + +The vehicle starts from a stationary position, moves along the road, and stops when there is a vehicle ahead, waiting for the obstruction to clear before proceeding. + +After each simulation run, it will automatically restart after 90 seconds. You can use the mouse to adjust different viewing angles for observation. + +![img4 alt-text#center](openadkit_1.gif "Figure 4: Simulation") + +Congratulations! You have successfully executed the OpenAD Kit demo. diff --git a/content/learning-paths/automotive/openadkit1_container/_index.md b/content/learning-paths/automotive/openadkit1_container/_index.md new file mode 100644 index 0000000000..50084f404e --- /dev/null +++ b/content/learning-paths/automotive/openadkit1_container/_index.md @@ -0,0 +1,53 @@ +--- +title: Deploying Mixed-Criticality Autonomous Driving software using Arm containers + +draft: true +cascade: + draft: true + +minutes_to_complete: 60 + +who_is_this_for: This is an introductory topic for automotive developers, aimed at helping them accelerate autonomous driving software development before the automotive computing hardware board is fully ready. + +learning_objectives: + - Introduction to the SOAFEE architecture and its role in supporting Shift-Left software development strategies to optimize the autonomous driving development process. + - Overview of the Autoware OpenADKit simulation environment. + - Running containerized workloads on Arm Neoverse V3AE with Docker, supporting execution on both cloud-based and on-premise servers. + - Exploring advanced configurations and future development prospects. +prerequisites: + - An Arm-based Neoverse cloud instance, or a local Arm Neoverse Linux computer with at least 16 CPUs and 32GB of RAM. + - Familiarity with Docker operation. + +author: Odin Shen + +### Tags +skilllevels: Introductory +subjects: Containers and Virtualization +armips: + - Neoverse V3AE +tools_software_languages: + - Python + - Docker + - ROS2 +operatingsystems: + - Linux + + +further_reading: + - resource: + title: ROS2 installation + link: https://learn.arm.com/install-guides/ros2/ + type: documentation + - resource: + title: Autoware OpenAD Kit demo project + link: https://github.com/autowarefoundation/openadkit_demo.autoware/ + type: documentation + + + +### FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. +--- diff --git a/content/learning-paths/automotive/openadkit1_container/_next-steps.md b/content/learning-paths/automotive/openadkit1_container/_next-steps.md new file mode 100644 index 0000000000..c3db0de5a2 --- /dev/null +++ b/content/learning-paths/automotive/openadkit1_container/_next-steps.md @@ -0,0 +1,8 @@ +--- +# ================================================================================ +# FIXED, DO NOT MODIFY THIS FILE +# ================================================================================ +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. +--- diff --git a/content/learning-paths/automotive/openadkit1_container/openadkit_1.gif b/content/learning-paths/automotive/openadkit1_container/openadkit_1.gif new file mode 100644 index 0000000000..fcca8aa007 Binary files /dev/null and b/content/learning-paths/automotive/openadkit1_container/openadkit_1.gif differ diff --git a/content/learning-paths/automotive/openadkit1_container/openadkit_connect.jpg b/content/learning-paths/automotive/openadkit1_container/openadkit_connect.jpg new file mode 100644 index 0000000000..c1a1e1923c Binary files /dev/null and b/content/learning-paths/automotive/openadkit1_container/openadkit_connect.jpg differ diff --git a/content/learning-paths/automotive/openadkit1_container/openadkit_passwd.jpg b/content/learning-paths/automotive/openadkit1_container/openadkit_passwd.jpg new file mode 100644 index 0000000000..7f1916bd02 Binary files /dev/null and b/content/learning-paths/automotive/openadkit1_container/openadkit_passwd.jpg differ diff --git a/content/learning-paths/automotive/openadkit1_container/vnc_address.png b/content/learning-paths/automotive/openadkit1_container/vnc_address.png new file mode 100644 index 0000000000..9e31a4b4ea Binary files /dev/null and b/content/learning-paths/automotive/openadkit1_container/vnc_address.png differ diff --git a/content/learning-paths/automotive/system76-auto/_index.md b/content/learning-paths/automotive/system76-auto/_index.md index 001d278dd6..f6a98adfd5 100644 --- a/content/learning-paths/automotive/system76-auto/_index.md +++ b/content/learning-paths/automotive/system76-auto/_index.md @@ -12,7 +12,7 @@ learning_objectives: prerequisites: - A System76 Thelio Astra desktop computer running Ubuntu 24.04. -author_primary: Jason Andrews +author: Jason Andrews ### Tags skilllevels: Introductory @@ -24,6 +24,17 @@ operatingsystems: tools_software_languages: - Automotive +further_reading: + - resource: + title: Arm Automotive Solutions Documentation + link: https://arm-auto-solutions.docs.arm.com/en/v1.1/index.html + type: documentation + - resource: + title: Parsec + link: https://parsec.community/ + type: documentation + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/automotive/system76-auto/_next-steps.md b/content/learning-paths/automotive/system76-auto/_next-steps.md index 05846422f7..c3db0de5a2 100644 --- a/content/learning-paths/automotive/system76-auto/_next-steps.md +++ b/content/learning-paths/automotive/system76-auto/_next-steps.md @@ -1,27 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You have successfully learned how to build and run the Arm Automotive Solutions Software Reference Stack on the System76 Thelio Astra. - -recommended_path: "/learning-paths/cross-platform/docker-build-cloud/" - -further_reading: - - resource: - title: Arm Automotive Solutions Documentation - link: https://arm-auto-solutions.docs.arm.com/en/v1.1/index.html - type: documentation - - resource: - title: Parsec - link: https://parsec.community/ - type: documentation - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/_example-learning-path/_index.md b/content/learning-paths/cross-platform/_example-learning-path/_index.md index fdc8a20903..5603e466b2 100644 --- a/content/learning-paths/cross-platform/_example-learning-path/_index.md +++ b/content/learning-paths/cross-platform/_example-learning-path/_index.md @@ -16,7 +16,7 @@ learning_objectives: prerequisites: - A [GitHub](https://github.com/) account -author_primary: Zach Lasiuk +author: Zach Lasiuk ### Tags skilllevels: Introductory @@ -28,6 +28,13 @@ tools_software_languages: - Hugo +further_reading: + - resource: + title: GitHub Project Repository + link: https://github.com/ArmDeveloperEcosystem/arm-learning-paths + type: website + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/_example-learning-path/_next-steps.md b/content/learning-paths/cross-platform/_example-learning-path/_next-steps.md index 1a017ab519..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/_example-learning-path/_next-steps.md +++ b/content/learning-paths/cross-platform/_example-learning-path/_next-steps.md @@ -1,31 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - Thank you for learning how to create Learning Paths. -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/cross-platform/_example-learning-path/" -# Link to the next learning path being recommended(For example this could be /learning-paths/servers-and-cloud-computing/mongodb). - - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: GitHub Project Repository - link: https://github.com/ArmDeveloperEcosystem/arm-learning-paths - type: website - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/_example-learning-path/appendix-3-test.md b/content/learning-paths/cross-platform/_example-learning-path/appendix-3-test.md index a95c3d1dcc..dfb9eec38a 100644 --- a/content/learning-paths/cross-platform/_example-learning-path/appendix-3-test.md +++ b/content/learning-paths/cross-platform/_example-learning-path/appendix-3-test.md @@ -18,9 +18,7 @@ The framework allows you to parse Learning Path articles and generate instructio 2. [Edit Learning Path pages](#edit-learning-path-pages) 3. [Edit metadata](#edit-metadata) 4. [Run the framework](#run-the-framework) -5. [Result summary](#result-summary) -6. [Visualize results](#visualize-results) - +5. [Advanced usage for embedded development](#advanced-usage-for-embedded-development) ## Install dependencies @@ -279,7 +277,7 @@ In the example above, the summary indicates that for this Learning Path all test ## Advanced usage for embedded development ### Using the Corstone-300 FVP -By default, the framework runs instructions on the Docker images specified by the [metadata](#edit-metadata). For embedded development, it is possible to build software in a container instance and then check its behaviour on the Corstone-300 FVP. +By default, the framework runs instructions on the Docker images specified by the [metadata](#edit-metadata). For embedded development, it is possible to build software in a container instance and then check its behavior on the Corstone-300 FVP. For this, all container instances used by the test framework mount a volume in `/shared`. This is where software for the target FVP can be stored. To check the execution, the FVP commands just need to be identified as a `fvp` section for the framework. diff --git a/content/learning-paths/cross-platform/_example-learning-path/overview.md b/content/learning-paths/cross-platform/_example-learning-path/overview.md index 6fcc6f348c..9c695390e3 100644 --- a/content/learning-paths/cross-platform/_example-learning-path/overview.md +++ b/content/learning-paths/cross-platform/_example-learning-path/overview.md @@ -58,8 +58,6 @@ Learning Paths are about software development on Arm. Content is segmented into Learning Paths include only public information. Do not include confidential information, trade secrets, unannounced products, or any other information which should not be on a public website. -Do not use an AI tool to generate either content or code when creating a Learning Path or Install Guide. - ## Is there a way to ask about my Learning Path idea? You can use [GitHub Discussions](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/discussions) to ask questions about your Learning Path idea. You may want to do this if you are unsure about the usefulness of your concept or think it might already be covered by other content. You can also use it to determine the best category for your Learning Path. It is possible that a Learning Path belongs to multiple categories, so use GitHub discussions to ask. diff --git a/content/learning-paths/cross-platform/_example-learning-path/setup.md b/content/learning-paths/cross-platform/_example-learning-path/setup.md index a2cbec60ba..326b741694 100644 --- a/content/learning-paths/cross-platform/_example-learning-path/setup.md +++ b/content/learning-paths/cross-platform/_example-learning-path/setup.md @@ -73,10 +73,13 @@ The easiest way to download Hugo on Linux (Debian/Ubuntu) is using the package m ```bash sudo apt install hugo ``` +To install Hugo on macOS, first install Homebrew if it's not already installed, then use Homebrew to install Hugo: -You can also download Hugo for other operating systems from the [releases page](https://github.com/gohugoio/hugo/releases). Hugo works on all major operating systems and architectures. +```bash +brew install hugo +``` -Recent versions of Hugo between v0.81.0 to v0.111.3 will work. +You can also download the latest version of Hugo for other operating systems from the [releases page](https://github.com/gohugoio/hugo/releases). Hugo works on all major operating systems and architectures. For even more ways to install Hugo [check the documentation](https://gohugo.io/getting-started/installing). diff --git a/content/learning-paths/cross-platform/_example-learning-path/write-1-init.md b/content/learning-paths/cross-platform/_example-learning-path/write-1-init.md index 773d7cba36..64d1b1d9dc 100644 --- a/content/learning-paths/cross-platform/_example-learning-path/write-1-init.md +++ b/content/learning-paths/cross-platform/_example-learning-path/write-1-init.md @@ -40,7 +40,7 @@ Result: The following markdown files are added to the `my-new-learning-path` dir | _index.md | This file contains the title, target audience, and tagging metadata for your new Learning Path. The next step of this Learning Path explains these metadata elements and how to complete them correctly. | | how-to-1.md | This file contains the how-to content for the Learning Path. Create multiple how-to pages to segment stages within your Learning Path. Each `how-to-N.md` file represents another distinct stage in your learning Path. Name this file to reflect the content you are adding. | | example-picture.png | (optional) Pictures and screenshots can be included in this directory to appear in your Learning Path, Images can also be referenced as web links if you prefer. | -| _next_steps.md | This file contains the next recommended steps and related resources for the reader to use on completion of this Learning Path. | +| _next_steps.md | DO NOT edit this file, it acts as a static placeholder only. | ### Order the content within the Learning Path diff --git a/content/learning-paths/cross-platform/_example-learning-path/write-2-metadata.md b/content/learning-paths/cross-platform/_example-learning-path/write-2-metadata.md index bd8a4226fc..13261e0197 100644 --- a/content/learning-paths/cross-platform/_example-learning-path/write-2-metadata.md +++ b/content/learning-paths/cross-platform/_example-learning-path/write-2-metadata.md @@ -12,10 +12,7 @@ layout: "learningpathall" Each Learning Path contains metadata which is used to create the Learning Path pages. The metadata is used by the website so all Learning Paths have the same information and are consistent. -This section explains how to add Learning Path metadata in two files: - -1. Metadata and Tagging information in `_index.md` -2. Next Steps for readers in `_next-steps.md` +This section explains how to add Learning Path metadata in the `_index.md` file: ## Metadata and tagging @@ -28,7 +25,7 @@ The following metadata is defined in the `_index.md` file: | who_is_this_for | One sentence indicating the target audience (developers using tools or software to accomplish tasks). | | learning_objectives | 2-5 bullet points, one sentence each, describing what a reader will learn. Should start with a verb (deploy, measure). | | prerequisites | Everything needed before this Learning Path can be started. Can include online service accounts, prior knowledge, previous Learning Paths, or specific tools and software. Offers explanatory links when possible. | -| author_primary | The name of the person who wrote the Learning Path in case there are questions about the material. | +| author | The name of the person or people who wrote the Learning Path. | Look at other Learning Paths for inspiration about how to write a good title, learning objectives, and prerequisites. @@ -42,13 +39,19 @@ Note the absolute path of `/learning-paths/cross-platform/docker/` ### Author information -If you provide your name in the `author_primary` metadata it will be listed on the top of the Learning Path in the `Author` field. - -Displaying your name on the content you contributed is a great way to promote your work. - -If you do not want your name to be displayed leave `author_primary` blank. +Adding yourself as an author by populating the `author` metadata is slightly different if there is one or multiple authors. +**One author:** +``` +author: Zach Lasiuk +``` -You can share additional information about yourself by editing the file [`contributors.csv`](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/blob/main/assets/contributors.csv) at the top of the repository. This file collects your company name, GitHub username, LinkedIn profile, Twitter handle, and your website. All fields are optional, but any you add to `contributors.csv` will appear next to your name in the `Author` field. +**Multiple authors:** +``` +author: + - Zach Lasiuk + - Pareena Verma +``` +In either case, ensure all named authors are listed in the [.\assets\contributors.csv](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/blob/main/assets/contributors.csv) file. You *must* list your name, and optionally include info to display along your name in the Learning Path. This includes your company name, LinkedIn profile, Twitter handle, and your/your company's website. ## Tags Tagging metadata is also expected to increase visibility through filtering. Some tags are closed (you must select from a pre-defined list) and some are open (enter anything). The tags are: @@ -64,17 +67,19 @@ Indicates the skill level needed as a developer to complete this Learning Path. ### subjects (closed) Specifies the primary subject the Learning Path covers. Can only be one subject per Learning Path; if it spans multiple, pick the primary one. Select from the allowed list for each category, as defined here: -| Server and Cloud | Desktop and Laptop | Embedded | Mobile | Microcontroller | -|---------|---------|---------|---------|---------| -| CI-CD | CI-CD | CI-CD| CI-CD | CI-CD | -| Performance and Architecture | Performance and Architecture | Performance and Architecture | Performance and Architecture | Performance and Architecture | -| ML | Migration to Arm | ML | ML | ML | -| Containers and Virtualization | Containers and Virtualization | Containers and Virtualization | Gaming | Security | -| Storage | | Storage | AR-VR | Virtual Hardware | -| Databases | | Automotive | Graphics | RTOS | -| Libraries | | Embedded Linux | | Libraries | -| Web | | | | | -| Networking | | | | | + +| Embedded and Microcontrollers | IoT | Servers and Cloud Computing | Laptops and Desktops | Mobile, Graphics, and Gaming | Automotive | +|---------|---------|---------|---------|---------|------| +| CI-CD | CI-CD | CI-CD | CI-CD | CI-CD | CI-CD | +| Performance and Architecture | Performance and Architecture | Performance and Architecture | Performance and Architecture | Performance and Architecture | Performance and Architecture | +| ML | ML | ML | ML | ML | ML | +| Containers and Virtualization | Containers and Virtualization | Containers and Virtualization | Containers and Virtualization | Gaming | Containers and Virtualization | +| Libraries | Libraries | Libraries | Migration to Arm | Libraries | | +| Virtual Hardware | Virtual Hardware | Storage | | Graphics | | +| Security | Security | Databases | | AR-VR | | +| Embedded Linux | Embedded Linux | Web | | | | +| RTOS Fundamentals | | | | | | + ### operatingsystems (closed) @@ -119,14 +124,12 @@ Specifies the Arm IP this Learning Path involves, providing a quick link to IP i | Group of IP | The Learning Path applies to a wider class of Arm IP | Cortex-M, Cortex-A, Cortex-R, Neoverse, Mali | -## Next Steps +## Further Reading -This is where you provide a specific next step for a reader, and provide further reading resources to dive deeper into the topics covered. The following metadata is defined in the _next-steps.md file: +This is where you provide further reading resources to dive deeper into the topics covered. -| Next Steps Metadata | Explanation | +| Further Reading metadata | Explanation | |-----------------------|-------------| -| next_step_guidance | A 1-3 sentence description of how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. | -| recommended_path | Link to the next learning path being recommended (For example, this could be [Learn How to Use Docker](/learning-paths/cross-platform/docker/)) | | further_reading | Links to references related to information covered | | resource > title | The displayed title of the provided further_reading resource | | resource > link | The website link to the specific resource | diff --git a/content/learning-paths/cross-platform/avh_cicd/_index.md b/content/learning-paths/cross-platform/avh_cicd/_index.md index bedb572cb9..f4c50b95a5 100644 --- a/content/learning-paths/cross-platform/avh_cicd/_index.md +++ b/content/learning-paths/cross-platform/avh_cicd/_index.md @@ -12,7 +12,7 @@ learning_objectives: prerequisites: - Some familiarity with CI/CD concepts is assumed -author_primary: Pareena Verma +author: Pareena Verma ### Tags skilllevels: Introductory @@ -32,6 +32,17 @@ shared_between: - embedded-and-microcontrollers - iot +further_reading: + - resource: + title: GitHub Actions + link: https://docs.github.com/en/actions + type: documentation + - resource: + title: Arm Virtual Hardware + link: https://arm-software.github.io/AVH/main/examples/html/GetStarted.html + type: documentation + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/avh_cicd/_next-steps.md b/content/learning-paths/cross-platform/avh_cicd/_next-steps.md index b960b08201..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/avh_cicd/_next-steps.md +++ b/content/learning-paths/cross-platform/avh_cicd/_next-steps.md @@ -1,35 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You have successfully set up a basic CI/CD workflow based around Arm Virtual Hardware. Further automation is possible, as shown in the next learning path. -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/cross-platform/avh_cicd2/" - -# Link to the next learning path being recommended(For example this could be /learning-paths/servers-and-cloud-computing/mongodb). - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: GitHub Actions - link: https://docs.github.com/en/actions - type: documentation - - resource: - title: Arm Virtual Hardware - link: https://arm-software.github.io/AVH/main/examples/html/GetStarted.html - type: documentation - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/avh_cicd2/_index.md b/content/learning-paths/cross-platform/avh_cicd2/_index.md index 5aebd1b495..50f3442f24 100644 --- a/content/learning-paths/cross-platform/avh_cicd2/_index.md +++ b/content/learning-paths/cross-platform/avh_cicd2/_index.md @@ -13,7 +13,7 @@ prerequisites: - This learning path builds on [Integrate Arm Virtual Hardware into CI/CD workflow 1](/learning-paths/cross-platform/avh_cicd/). - Valid AWS and GitHub accounts are required -author_primary: Pareena Verma +author: Pareena Verma ##### Tags skilllevels: Advanced @@ -33,6 +33,18 @@ shared_between: - embedded-and-microcontrollers - iot +further_reading: + - resource: + title: GitHub Actions + link: https://docs.github.com/en/actions + type: documentation + - resource: + title: Arm Virtual Hardware + link: https://arm-software.github.io/AVH/main/examples/html/GetStarted.html + type: documentation + + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/avh_cicd2/_next-steps.md b/content/learning-paths/cross-platform/avh_cicd2/_next-steps.md index f2457b5b8c..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/avh_cicd2/_next-steps.md +++ b/content/learning-paths/cross-platform/avh_cicd2/_next-steps.md @@ -1,36 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - Congratulations you have now set up a complete CI/CD workflow. For another examples using a different flavor of Arm Virtual Hardware, see: -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/iot/avh_matter" -# Link to the next learning path being recommended(For example this could be /learning-paths/servers-and-cloud-computing/mongodb). - - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: GitHub Actions - link: https://docs.github.com/en/actions - type: documentation - - resource: - title: Arm Virtual Hardware - link: https://arm-software.github.io/AVH/main/examples/html/GetStarted.html - type: documentation - - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/cca_rme/_index.md b/content/learning-paths/cross-platform/cca_rme/_index.md index 7e5e50475b..2536dbc07f 100644 --- a/content/learning-paths/cross-platform/cca_rme/_index.md +++ b/content/learning-paths/cross-platform/cca_rme/_index.md @@ -13,7 +13,7 @@ prerequisites: - Some understanding of the Arm architecture - Arm Development Studio, 2023.0 or later -author_primary: Ronan Synnott +author: Ronan Synnott ### Tags skilllevels: Introductory @@ -34,6 +34,8 @@ tools_software_languages: - Arm Development Studio - RME - CCA + - Runbook + ### Cross-platform metadata only shared_path: true @@ -42,6 +44,21 @@ shared_between: - laptops-and-desktops - mobile-graphics-and-gaming +further_reading: + - resource: + title: Arm Confidential Compute Architecture + link: https://www.arm.com/architecture/security-features/arm-confidential-compute-architecture + type: website + - resource: + title: Arm Confidential Compute Architecture open source enablement + link: https://www.youtube.com/watch?v=JXrNkYysuXw + type: video + - resource: + title: Learn the architecture - Realm Management Extension + link: https://developer.arm.com/documentation/den0126 + type: documentation + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/cca_rme/_next-steps.md b/content/learning-paths/cross-platform/cca_rme/_next-steps.md index 8815033227..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/cca_rme/_next-steps.md +++ b/content/learning-paths/cross-platform/cca_rme/_next-steps.md @@ -1,40 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You now have an understanding of the Arm Confidential Compute Architecture infrastructure. You can now explore a complete software stack implementing CCA. - -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/content/servers-and-cloud-computing/rme-cca-basics" -# Link to the next learning path being recommended(For example this could be /learning-paths/servers-and-cloud-computing/mongodb). - - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: Arm Confidential Compute Architecture - link: https://www.arm.com/architecture/security-features/arm-confidential-compute-architecture - type: website - - resource: - title: Arm Confidential Compute Architecture open source enablement - link: https://www.youtube.com/watch?v=JXrNkYysuXw - type: video - - resource: - title: Learn the architecture - Realm Management Extension - link: https://developer.arm.com/documentation/den0126 - type: documentation - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/daytona/_index.md b/content/learning-paths/cross-platform/daytona/_index.md index 1dc736092d..4a18d7e597 100644 --- a/content/learning-paths/cross-platform/daytona/_index.md +++ b/content/learning-paths/cross-platform/daytona/_index.md @@ -16,7 +16,7 @@ prerequisites: - One or more Arm-based computers running Windows, macOS, or a Linux computer with Docker installed. - Optionally, an AWS account to create cloud development environments. -author_primary: Jason Andrews +author: Jason Andrews armips: - Neoverse @@ -36,7 +36,17 @@ shared_path: true shared_between: - servers-and-cloud-computing - laptops-and-desktops - - embedded-systems + +further_reading: + - resource: + title: Daytona Documentation + link: https://www.daytona.io/docs/ + type: documentation + - resource: + title: Daytona Blogs + link: https://www.daytona.io/dotfiles/ + type: blog + ### FIXED, DO NOT MODIFY # ================================================================================ diff --git a/content/learning-paths/cross-platform/daytona/_next-steps.md b/content/learning-paths/cross-platform/daytona/_next-steps.md index 2b0edc4a28..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/daytona/_next-steps.md +++ b/content/learning-paths/cross-platform/daytona/_next-steps.md @@ -1,35 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You can continue learning about managing development environments with Docker. -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/cross-platform/docker/" -# Link to the next learning path being recommended. - - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: Daytona Documentation - link: https://www.daytona.io/docs/ - type: documentation - - resource: - title: Daytona Blogs - link: https://www.daytona.io/dotfiles/ - type: blog - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/docker-build-cloud/_index.md b/content/learning-paths/cross-platform/docker-build-cloud/_index.md index fa2c2ef2db..4c3d3178f9 100644 --- a/content/learning-paths/cross-platform/docker-build-cloud/_index.md +++ b/content/learning-paths/cross-platform/docker-build-cloud/_index.md @@ -14,7 +14,7 @@ prerequisites: - A GitHub account - A Docker Hub account -author_primary: Jason Andrews +author: Jason Andrews ### Tags skilllevels: Introductory @@ -34,6 +34,17 @@ shared_between: - embedded-and-microcontrollers - iot +further_reading: + - resource: + title: Docker Build Cloud + link: https://docs.docker.com/build/cloud/ + type: documentation + - resource: + title: Introducing Docker Build Cloud - A New Solution to Speed Up Build Times and Improve Developer Productivity + link: https://www.docker.com/blog/introducing-docker-build-cloud/ + type: blog + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/docker-build-cloud/_next-steps.md b/content/learning-paths/cross-platform/docker-build-cloud/_next-steps.md index 994f620ded..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/docker-build-cloud/_next-steps.md +++ b/content/learning-paths/cross-platform/docker-build-cloud/_next-steps.md @@ -1,35 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You can continue learning about creating Docker images on Arm servers. The Learning Path using AWS CodeBuild is a great next step. -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/servers-and-cloud-computing/codebuild/" -# Link to the next learning path being recommended. - - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: Docker Build Cloud - link: https://docs.docker.com/build/cloud/ - type: documentation - - resource: - title: Introducing Docker Build Cloud - A New Solution to Speed Up Build Times and Improve Developer Productivity - link: https://www.docker.com/blog/introducing-docker-build-cloud/ - type: blog - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/docker/_index.md b/content/learning-paths/cross-platform/docker/_index.md index fc7702ff61..d154f26283 100644 --- a/content/learning-paths/cross-platform/docker/_index.md +++ b/content/learning-paths/cross-platform/docker/_index.md @@ -17,7 +17,7 @@ prerequisites: - A Windows, macOS, or Linux computer with Docker installed, any architecture can be used - An Arm Linux server with Docker installed -author_primary: Jason Andrews +author: Jason Andrews ### Tags skilllevels: Introductory @@ -38,6 +38,25 @@ shared_between: - embedded-and-microcontrollers - iot +further_reading: + - resource: + title: Docker Documentation + link: https://docs.docker.com + type: documentation + - resource: + title: Docker buildx documentation + link: https://docs.docker.com/engine/reference/commandline/buildx + type: documentation + - resource: + title: Docker mainfest documentation + link: https://docs.docker.com/engine/reference/commandline/manifest + type: documentation + - resource: + title: Blog by Docker on buildx + link: https://www.docker.com/blog/how-to-rapidly-build-multi-architecture-images-with-buildx + type: blog + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/docker/_next-steps.md b/content/learning-paths/cross-platform/docker/_next-steps.md index 12e9c2cb1c..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/docker/_next-steps.md +++ b/content/learning-paths/cross-platform/docker/_next-steps.md @@ -1,43 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You can continue learning about creating Docker images on Arm servers. The Learning Path using AWS CodeBuild is a great next step. -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/servers-and-cloud-computing/codebuild/" -# Link to the next learning path being recommended. - - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: Docker Documentation - link: https://docs.docker.com - type: documentation - - resource: - title: Docker buildx documentation - link: https://docs.docker.com/engine/reference/commandline/buildx - type: documentation - - resource: - title: Docker mainfest documentation - link: https://docs.docker.com/engine/reference/commandline/manifest - type: documentation - - resource: - title: Blog by Docker on buildx - link: https://www.docker.com/blog/how-to-rapidly-build-multi-architecture-images-with-buildx - type: blog - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/dynamic-memory-allocator/_index.md b/content/learning-paths/cross-platform/dynamic-memory-allocator/_index.md index c7e28fa70b..4ef03c2c09 100644 --- a/content/learning-paths/cross-platform/dynamic-memory-allocator/_index.md +++ b/content/learning-paths/cross-platform/dynamic-memory-allocator/_index.md @@ -1,38 +1,60 @@ --- -armips: null -author_primary: David Spickett +title: Write a Dynamic Memory Allocator + +minutes_to_complete: 120 + +who_is_this_for: This is an introductory topic for software developers learning about dynamic memory allocation for the first time, and who may have used malloc and free in C programming. It also provides a starting point to explore more advanced memory allocation topics. + layout: learningpathall learning_objectives: - Explain how dynamic memory allocation and the C heap works - Write a simple dynamic memory allocator - Explain some of the risks of heap allocation in general -learning_path_main_page: 'yes' -minutes_to_complete: 120 -operatingsystems: -- Linux + prerequisites: - Familiarity with C programming, with a good understanding of pointers. - A Linux machine to run the example code. -skilllevels: Introductory -subjects: Performance and Architecture -armips: - - Cortex-A - - Neoverse + +author: David Spickett + test_images: - ubuntu:latest test_link: null test_maintenance: true -test_status: -- passed -title: Write a Dynamic Memory Allocator + +further_reading: + - resource: + title: C Dynamic Memory Management Functions + link: https://en.cppreference.com/w/c/memory + type: documentation + - resource: + title: LLSoftSecBook chapter on Memory Vulnerabilities + link: https://llsoftsec.github.io/llsoftsecbook/#memory-vulnerability-based-attacks + type: website + +### Tags +skilllevels: Introductory +subjects: Performance and Architecture +armips: + - Cortex-A + - Neoverse +operatingsystems: + - Linux tools_software_languages: -- C -- Coding -weight: 1 -who_is_this_for: This is an introductory topic for software developers learning about dynamic memory allocation for the first time, - and who may have used malloc and free in C programming. It also provides a starting point to explore more advanced memory allocation topics. + - C + - Coding + - Runbook + +### Cross-platform metadata only shared_path: true shared_between: - laptops-and-desktops - embedded-and-microcontrollers ---- + + +### FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. +--- \ No newline at end of file diff --git a/content/learning-paths/cross-platform/dynamic-memory-allocator/_next-steps.md b/content/learning-paths/cross-platform/dynamic-memory-allocator/_next-steps.md index dd9051e5d5..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/dynamic-memory-allocator/_next-steps.md +++ b/content/learning-paths/cross-platform/dynamic-memory-allocator/_next-steps.md @@ -1,22 +1,8 @@ --- -next_step_guidance: - -recommended_path: /learning-paths/servers-and-cloud-computing/exploiting-stack-buffer-overflow-aarch64/ - -further_reading: - - resource: - title: C Dynamic Memory Management Functions - link: https://en.cppreference.com/w/c/memory - type: documentation - - resource: - title: LLSoftSecBook chapter on Memory Vulnerabilities - link: https://llsoftsec.github.io/llsoftsecbook/#memory-vulnerability-based-attacks - type: website - # ================================================================================ -# FIXED, DO NOT MODIFY +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/eigen-linear-algebra-on-arm/_index.md b/content/learning-paths/cross-platform/eigen-linear-algebra-on-arm/_index.md index 15b9e93fc2..da6864147c 100644 --- a/content/learning-paths/cross-platform/eigen-linear-algebra-on-arm/_index.md +++ b/content/learning-paths/cross-platform/eigen-linear-algebra-on-arm/_index.md @@ -11,7 +11,7 @@ learning_objectives: prerequisites: - An Arm-based computer running Linux and a recent version of a C++ compiler (Clang or GCC). -author_primary: Konstantinos Margaritis +author: Konstantinos Margaritis ### Tags skilllevels: Advanced @@ -23,6 +23,8 @@ tools_software_languages: - GCC - Clang - Coding + - Runbook + operatingsystems: - Linux shared_path: true @@ -32,6 +34,21 @@ shared_between: - mobile-graphics-and-gaming +further_reading: + - resource: + title: Eigen official Tutorial on Matrix class + link: https://libeigen.gitlab.io/docs/group__TutorialMatrixClass.html + type: documentation + - resource: + title: Eigen Webinar from Linaro + link: https://static.linaro.org/connect/webinars/presentations/Eigen_Webinar_3.pdf + type: documentation + - resource: + title: TensorFlow Install from Source instructions + link: https://www.tensorflow.org/install/source + type: documentation + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/eigen-linear-algebra-on-arm/_next-steps.md b/content/learning-paths/cross-platform/eigen-linear-algebra-on-arm/_next-steps.md index 0028b16028..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/eigen-linear-algebra-on-arm/_next-steps.md +++ b/content/learning-paths/cross-platform/eigen-linear-algebra-on-arm/_next-steps.md @@ -1,26 +1,8 @@ --- -next_step_guidance: You now have an understanding of how to get started with the Eigen library on Arm systems and efficiently build your own customized TensorFlow build. To learn more, please look at the links provided under further reading. - -recommended_path: /learning-paths/servers-and-cloud-computing/top-down-n1/ - -further_reading: - - resource: - title: Eigen official Tutorial on Matrix class - link: https://libeigen.gitlab.io/docs/group__TutorialMatrixClass.html - type: documentation - - resource: - title: Eigen Webinar from Linaro - link: https://static.linaro.org/connect/webinars/presentations/Eigen_Webinar_3.pdf - type: documentation - - resource: - title: TensorFlow Install from Source instructions - link: https://www.tensorflow.org/install/source - type: documentation - # ================================================================================ -# FIXED, DO NOT MODIFY +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/_index.md b/content/learning-paths/cross-platform/floating-point-rounding-errors/_index.md new file mode 100644 index 0000000000..9c5431b21f --- /dev/null +++ b/content/learning-paths/cross-platform/floating-point-rounding-errors/_index.md @@ -0,0 +1,53 @@ +--- +title: Explore floating-point differences between x86 and Arm + +minutes_to_complete: 30 + +who_is_this_for: This is an introductory topic for developers who are porting applications from x86 to Arm and want to understand how floating-point behavior differs between these architectures - particularly in the context of numerical consistency, performance, and debugging subtle bugs. + +learning_objectives: + - Identify key differences in floating-point behavior between the x86 and Arm architectures. + - Recognize the impact of compiler optimizations and instruction sets on floating-point results. + - Apply compiler flags and best practices to ensure consistent floating-point behavior across + platforms. + +prerequisites: + - Access to an x86 and an Arm Linux machine. + - Familiarity with floating-point numbers. + +author: Kieran Hejmadi + +### Tags +skilllevels: Introductory +subjects: Performance and Architecture +armips: + - Cortex-A + - Neoverse +tools_software_languages: + - C++ +operatingsystems: + - Linux +shared_path: true +shared_between: + - servers-and-cloud-computing + - laptops-and-desktops + - mobile-graphics-and-gaming + +further_reading: + - resource: + title: G++ Optimization Flags + link: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html + type: documentation + - resource: + title: Floating-point environment + link: https://en.cppreference.com/w/cpp/numeric/fenv + type: documentation + + + +### FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. +--- diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/_next-steps.md b/content/learning-paths/cross-platform/floating-point-rounding-errors/_next-steps.md new file mode 100644 index 0000000000..c3db0de5a2 --- /dev/null +++ b/content/learning-paths/cross-platform/floating-point-rounding-errors/_next-steps.md @@ -0,0 +1,8 @@ +--- +# ================================================================================ +# FIXED, DO NOT MODIFY THIS FILE +# ================================================================================ +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. +--- diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/differences.png b/content/learning-paths/cross-platform/floating-point-rounding-errors/differences.png new file mode 100644 index 0000000000..bd996f34a0 Binary files /dev/null and b/content/learning-paths/cross-platform/floating-point-rounding-errors/differences.png differ diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/floating-point-numbers.png b/content/learning-paths/cross-platform/floating-point-rounding-errors/floating-point-numbers.png new file mode 100644 index 0000000000..8182a98a85 Binary files /dev/null and b/content/learning-paths/cross-platform/floating-point-rounding-errors/floating-point-numbers.png differ diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-1.md b/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-1.md new file mode 100644 index 0000000000..c2855ae849 --- /dev/null +++ b/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-1.md @@ -0,0 +1,54 @@ +--- +title: "Floating-Point Representation" +weight: 2 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Review of floating-point numbers + +{{% notice Learning tip%}} +If you are new to floating-point numbers, and would like some further information, see +the Learning Path [Learn about integer and floating-point conversions](/learning-paths/cross-platform/integer-vs-floats/introduction-integer-float-types/). It covers data types and conversions. +{{% /notice %}} + +Floating-point numbers represent real numbers using limited precision, enabling efficient storage and computation of decimal values. In C/C++, floating-point variables are created with keywords such as `float` or `double`. The IEEE 754 standard, established in 1985, defines the most widely used format for floating-point arithmetic, ensuring consistency across hardware and software. + +IEEE 754 specifies two primary formats: single-precision (32-bit) and double-precision (64-bit). + +Each floating-point number consists of three components: + +- **Sign bit**: Determines the sign (positive or negative). +- **Exponent**: Sets the scale or magnitude. +- **Significand**: Holds the significant digits in binary. + +The standard uses a biased exponent to handle both large and small numbers efficiently, and it incorporates special values such as NaN (Not a Number), infinity, and subnormal numbers. It supports rounding modes and exception handling, which help ensure predictable results. However, floating-point arithmetic is inherently imprecise, leading to small rounding errors. + +The graphic below shows various forms of floating-point representation supported by Arm, each with varying number of bits assigned to the exponent and significand. + +![floating-point](./floating-point-numbers.png) + +## Rounding errors + +Because computers use a finite number of bits to store a continuous range of numbers, rounding errors are introduced. The unit in last place (ULP) is the smallest difference between two consecutive floating-point numbers. It quantifies the rounding error, which arises because not all real values can be exactly represented. + +Operations round results to the nearest representable value, introducing small discrepancies. This rounding error, often measured in ULPs, reflects how far the computed value may deviate from the exact mathematical result. + +For example, with 3 bits for the significand and an exponent range of -1 to 2, only a limited set of values can be represented. The diagram below illustrates these values. + +![ulp](./ulp.png) + +Key takeaways: + +- ULP size increases with magnitude. +- Larger numbers have wider spacing between values (larger ULPs). +- Smaller numbers have tighter spacing (smaller ULPs), reducing quantization error. +- ULP behavior impacts numerical stability and precision. + +{{% notice Learning tip %}} +Keep in mind that rounding and representation issues aren't bugs — they’re a consequence of how floating-point math works at the hardware level. Understanding these fundamentals is essential when porting numerical code across architectures like x86 and Arm. +{{% /notice %}} + + +In the next section, you'll explore how x86 and Arm differ in how they implement and optimize floating-point operations — and why this matters for writing portable, accurate software. diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-2.md b/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-2.md new file mode 100644 index 0000000000..e165e911f6 --- /dev/null +++ b/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-2.md @@ -0,0 +1,124 @@ +--- +title: Differences between x86 and Arm +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## What are the differences in behavior between x86 and Arm floating point? + +Although both x86 and Arm generally follow the IEEE 754 standard for floating-point representation, their behavior in edge cases — like overflow and truncation — can differ due to implementation details and instruction sets. + +You can see this by comparing an example application on both an x86 and an Arm Linux system. + +Run this example on any Linux system with x86 and Arm architecture; on AWS, use EC2 instance types `t3.micro` and `t4g.small` with Ubuntu 24.04. + +To learn about floating-point differences, use an editor to copy and paste the C++ code below into a new file named `converting-float.cpp`: + +```cpp +#include +#include +#include +#include + +void convertFloatToInt(float value) { + // Convert to unsigned 32-bit integer + uint32_t u32 = static_cast(value); + + // Convert to signed 32-bit integer + int32_t s32 = static_cast(value); + + // Convert to unsigned 16-bit integer (truncation happens) + uint16_t u16 = static_cast(u32); + uint8_t u8 = static_cast(value); + + // Convert to signed 16-bit integer (truncation happens) + int16_t s16 = static_cast(s32); + + std::cout << "Floating-Point Value: " << value << "\n"; + std::cout << " → uint32_t: " << u32 << " (0x" << std::hex << u32 << std::dec << ")\n"; + std::cout << " → int32_t: " << s32 << " (0x" << std::hex << s32 << std::dec << ")\n"; + std::cout << " → uint16_t (truncated): " << u16 << " (0x" << std::hex << u16 << std::dec << ")\n"; + std::cout << " → int16_t (truncated): " << s16 << " (0x" << std::hex << s16 << std::dec << ")\n"; + std::cout << " → uint8_t (truncated): " << static_cast(u8) << std::endl; + + std::cout << "----------------------------------\n"; +} + +int main() { + std::cout << "Demonstrating Floating-Point to Integer Conversion\n\n"; + + // Test cases + convertFloatToInt(42.7f); // Normal case + convertFloatToInt(-15.3f); // Negative value -> wraps on unsigned + convertFloatToInt(4294967296.0f); // Overflow: 2^32 (UINT32_MAX + 1) + convertFloatToInt(3.4e+38f); // Large float exceeding UINT32_MAX + convertFloatToInt(-3.4e+38f); // Large negative float + convertFloatToInt(NAN); // NaN behavior on different platforms + return 0; +} +``` + +If you need to install the `g++` compiler, run the commands below: + +```bash +sudo apt update +sudo apt install g++ -y +``` + +Compile `converting-float.cpp` on an Arm and x86 machine. + +The compile command is the same on both systems. + +```bash +g++ converting-float.cpp -o converting-float +``` + +For easy comparison, the image below shows the x86 output (left) and Arm output (right). The highlighted lines show the difference in output: + +![differences](./differences.png) + +As you can see, there are several cases where different behavior is observed. For example when trying to convert a signed number to an unsigned number or dealing with out-of-bounds numbers. + +## Removing hardcoded values with macros + +The above differences show that explicitly checking for specific values will lead to unportable code. + +For example, the function below checks if the casted result is `0`. This can be misleading — on x86, casting an out-of-range floating-point value to `uint32_t` may wrap to `0`, while on Arm it may behave differently. Relying on these results makes the code unportable. + + + +```cpp +void checkFloatToUint32(float num) { + uint32_t castedNum = static_cast(num); + if (castedNum == 0) { + std::cout << "The casted number is 0, indicating that the float is out of bounds for uint32_t." << std::endl; + } else { + std::cout << "The casted number is: " << castedNum << std::endl; + } +} +``` + +This can simply be corrected by using the macro, `UINT32_MAX`. + +{{% notice Note %}} +To find out all the available compiler-defined macros, you can output them using: +```bash +echo "" | g++ -dM -E - +``` +{{% /notice %}} + +A portable version of the code is: + +```cpp +void checkFloatToUint32(float num) { + uint32_t castedNum = static_cast(num); + if (castedNum == UINT32_MAX) { + std::cout << "The casted number is " << UINT32_MAX << " indicating the float was out of bounds for uint32_t." << std::endl; + } else { + std::cout << "The casted number is: " << castedNum << std::endl; + } +} +``` + diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-3.md b/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-3.md new file mode 100644 index 0000000000..40f4f964ce --- /dev/null +++ b/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-3.md @@ -0,0 +1,79 @@ +--- +title: Error propagation +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## What is error propagation in x86 and Arm systems? + +One cause of different outputs between x86 and Arm stems from the order of instructions and how errors are propagated. As a hypothetical example, an Arm system may decide to reorder the instructions that each have a different rounding error so that subtle changes are observed. + +It is possible that two functions that are mathematically equivalent will propagate errors differently on a computer. + + Functions `f1` and `f2` are mathematically equivalent. You would expect them to return the same value given the same input. + + If the input is a very small number, `1e-8`, the error is different due to the loss in precision caused by different operations. Specifically, `f2` avoids subtracting nearly equal numbers for clarity. For a full description look into the topic of [numerical stability](https://en.wikipedia.org/wiki/Numerical_stability). + +Use an editor to copy and paste the C++ code below into a file named `error-propagation.cpp`: + +```cpp +#include +#include + +// Function 1: Computes sqrt(1 + x) - 1 using the naive approach +float f1(float x) { + return sqrtf(1 + x) - 1; +} + +// Function 2: Computes the same value using an algebraically equivalent transformation +// This version is numerically more stable +float f2(float x) { + return x / (sqrtf(1 + x) + 1); +} + +int main() { + float x = 1e-8; // A small value that causes floating-point precision issues + float result1 = f1(x); + float result2 = f2(x); + + // Theoretically, result1 and result2 should be the same + float difference = result1 - result2; + // Multiply by a large number to amplify the error + float final_result = 100000000.0f * difference + 0.0001f; + + // Print the results + printf("f1(%e) = %.10f\n", x, result1); + printf("f2(%e) = %.10f\n", x, result2); + printf("Difference (f1 - f2) = %.10e\n", difference); + printf("Final result after magnification: %.10f\n", final_result); + + return 0; +} +``` + +Compile the code on both x86 and Arm with the following command: + +```bash +g++ -g error-propagation.cpp -o error-propagation +``` + +Running the two binaries shows that the second function, `f2`, has a small rounding error on both architectures. Additionally, there is a further rounding difference when run on x86 compared to Arm. + +Running on x86: + +```output +f1(1.000000e-08) = 0.0000000000 +f2(1.000000e-08) = 0.0000000050 +Difference (f1 - f2) = -4.9999999696e-09 +Final result after magnification: -0.4999000132 +``` + +Running on Arm: +```output +f1(1.000000e-08) = 0.0000000000 +f2(1.000000e-08) = 0.0000000050 +Difference (f1 - f2) = -4.9999999696e-09 +Final result after magnification: -0.4998999834 +``` diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-4.md b/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-4.md new file mode 100644 index 0000000000..159360f812 --- /dev/null +++ b/content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-4.md @@ -0,0 +1,90 @@ +--- +title: Minimizing floating-point variability across platforms +weight: 5 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## How can I minimize floating-point variability across x86 and Arm? + +The line `#pragma STDC FENV_ACCESS ON` is a directive that informs the compiler to enable access to the floating-point environment. This is part of the C++11 standard and ensures that the program can properly handle floating-point exceptions and rounding modes, enabling your program to continue running if an exception is thrown. + +In the context below, enabling floating-point environment access is crucial because the functions in this example involve floating-point arithmetic, which can be prone to precision errors and exceptions such as overflow, underflow, division by zero, and invalid operations. Although not strictly necessary for this example, the directive is included because it may be relevant for your own applications. + +This directive is particularly important when performing operations that require high numerical stability and precision, such as the square root calculations in functions below. It allows the program to manage the floating-point state and handle any anomalies that might occur during these calculations, thereby improving the robustness and reliability of your numerical computations. + +Use an editor to copy and paste the C++ file below into a file named `error-propagation-min.cpp`: + +```cpp +#include +#include +#include + +// Enable floating-point exceptions +#pragma STDC FENV_ACCESS ON + +// Function 1: Computes sqrt(1 + x) - 1 using the naive approach +double f1(double x) { + return sqrt(1 + x) - 1; +} + +// Function 2: Computes the same value using an algebraically equivalent transformation +// This version is numerically more stable +double f2(double x) { + return x / (sqrt(1 + x) + 1); +} + +int main() { + // Enable all floating-point exceptions + std::feclearexcept(FE_ALL_EXCEPT); + std::feraiseexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); + + double x = 1e-8; // A small value that causes floating-point precision issues + double result1 = f1(x); + double result2 = f2(x); + + // Theoretically, result1 and result2 should be the same + double difference = result1 - result2; + // Multiply by a large number to amplify the error + double final_result = 100000000.0 * difference + 0.0001; + + // Print the results + printf("f1(%e) = %.10f\n", x, result1); + printf("f2(%e) = %.10f\n", x, result2); + printf("Difference (f1 - f2) = %.10e\n", difference); + printf("Final result after magnification: %.10f\n", final_result); + + return 0; +} +``` + +Compile on both computers, using the C++ flag, `-frounding-math`. + +You should use this flag when your program dynamically changes the floating-point rounding mode or needs to run correctly under different rounding modes. In this example, it ensures that `f1` uses a predictable rounding mode across both x86 and Arm. + +```bash +g++ -o error-propagation-min error-propagation-min.cpp -frounding-math +``` + +Running the new binary on both systems shows that function `f1` produces a value nearly identical to `f2`, and the difference between them is now identical across both Arm64 and x86. + +```bash +./error-propagation-min +``` + +Here is the output on both systems: + +```output +f1(1.000000e-08) = 0.0000000050 +f2(1.000000e-08) = 0.0000000050 +Difference (f1 - f2) = -1.7887354748e-17 +Final result after magnification: 0.0000999982 +``` + +G++ provides several compiler flags to help balance accuracy and performance. For example, `-ffp-contract` is useful when lossy, fused operations are used, such as fused-multiple. + +Another example is `-ffloat-store` which prevents floating-point variables from being stored in registers which can have different levels of precision and rounding. + +You can refer to compiler documentation for more information on the flags available. + diff --git a/content/learning-paths/cross-platform/floating-point-rounding-errors/ulp.png b/content/learning-paths/cross-platform/floating-point-rounding-errors/ulp.png new file mode 100644 index 0000000000..ea87ef18cb Binary files /dev/null and b/content/learning-paths/cross-platform/floating-point-rounding-errors/ulp.png differ diff --git a/content/learning-paths/cross-platform/function-multiversioning/_index.md b/content/learning-paths/cross-platform/function-multiversioning/_index.md index 2f5098d2a3..f430235fd5 100644 --- a/content/learning-paths/cross-platform/function-multiversioning/_index.md +++ b/content/learning-paths/cross-platform/function-multiversioning/_index.md @@ -17,9 +17,9 @@ prerequisites: - Familiarity with indirect functions (ifuncs). - Basic knowledge of loop vectorization. - Familiarity with Arm assembly. - - A LLVM 19 compiler with runtime library support or GCC 14. + - A LLVM 20 compiler with runtime library support or GCC 14. -author_primary: Alexandros Lamprineas +author: Alexandros Lamprineas ### Tags skilllevels: Advanced @@ -29,6 +29,7 @@ armips: - Neoverse tools_software_languages: - C/C++ + - Runbook operatingsystems: - Linux - Android @@ -45,6 +46,13 @@ shared_between: # ================================================================================ # FIXED, DO NOT MODIFY # ================================================================================ +further_reading: + - resource: + title: Arm C Language Extensions + link: https://arm-software.github.io/acle/main/acle.html + type: documentation + + weight: 1 # _index.md always has weight of 1 to order correctly layout: "learningpathall" # All files under learning paths have this same wrapper learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. diff --git a/content/learning-paths/cross-platform/function-multiversioning/_next-steps.md b/content/learning-paths/cross-platform/function-multiversioning/_next-steps.md index db5ebc96ab..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/function-multiversioning/_next-steps.md +++ b/content/learning-paths/cross-platform/function-multiversioning/_next-steps.md @@ -1,18 +1,8 @@ --- -next_step_guidance: - -recommended_path: /learning-paths/PLACEHOLDER_CATEGORY/PLACEHOLDER_LEARNING_PATH/ - -further_reading: - - resource: - title: Arm C Language Extensions - link: https://arm-software.github.io/acle/main/acle.html - type: documentation - # ================================================================================ -# FIXED, DO NOT MODIFY +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/function-multiversioning/changes-from-past-releases.md b/content/learning-paths/cross-platform/function-multiversioning/changes-from-past-releases.md new file mode 100644 index 0000000000..aa948f2aae --- /dev/null +++ b/content/learning-paths/cross-platform/function-multiversioning/changes-from-past-releases.md @@ -0,0 +1,50 @@ +--- +title: Changes from released compilers +weight: 8 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +#### ACLE specification changes + +- The set of supported features has changed as indicated by the [ACLE Q3 change log](https://arm-software.github.io/acle/main/acle.html#changes-between-acle-q2-2024-and-acle-q3-2024) and the [ACLE Q4 change log](https://arm-software.github.io/acle/main/acle.html#changes-between-acle-q3-2024-and-acle-q4-2024). +- The runtime detection of features has changed. Dependent-on features get detected as indicated by the [dependencies table](https://arm-software.github.io/acle/main/acle.html#dependencies). +- The most appropriate version of a function is determined as indicated by the new [selection rules](https://arm-software.github.io/acle/main/acle.html#selection). Previously, the most specific version (the one with most features) was favored over any other version. +- A new predefined macro `__FUNCTION_MULTI_VERSIONING_SUPPORT_LEVEL` has been added to indicate which ACLE version is implemented by the compiler. + +#### Semantic changes between LLVM 19 and LLVM 20 + +With LLVM 19 at least one more version other than the default is needed to trigger function multiversioning. + +With LLVM 20 a header file declaration: + +```c +__attribute__((target_version("default"))) void f(void); +``` + +guarantees that there will be a mangled version `f.default`. Conversely, LLVM 19 would generate an unmangled symbol here since function multiversioning does not trigger when compiling this code in the absence of other versions. + +#### Static resolution in LLVM 20 + +LLVM can optimize calls to versioned functions when they can be statically resolved. For example: + +```c +__attribute__((target_version("mops"))) int f(void); +__attribute__((target_version("sve2"))) int f(void); +__attribute__((target_version("sve"))) int f(void); +__attribute__((target_version("default"))) int f(void) { return 0; } + +__attribute__((target_version("mops+sve2"))) int caller(void) { + return f(); // f._Mmops is called directly +} +__attribute__((target_version("mops"))) int caller(void) { + return f(); // f._Mmops is called directly +} +__attribute__((target_version("sve"))) int caller(void) { + return f(); // cannot be optimized since SVE2 may be available on target +} +__attribute__((target_version("default"))) int caller(void) { + return f(); // f.default is called directly +} +``` diff --git a/content/learning-paths/cross-platform/function-multiversioning/implementation-details.md b/content/learning-paths/cross-platform/function-multiversioning/implementation-details.md index 0e68709017..2dcfb0b460 100644 --- a/content/learning-paths/cross-platform/function-multiversioning/implementation-details.md +++ b/content/learning-paths/cross-platform/function-multiversioning/implementation-details.md @@ -1,6 +1,6 @@ --- title: Further information on implementation -weight: 6 +weight: 7 ### FIXED, DO NOT MODIFY layout: learningpathall @@ -8,17 +8,67 @@ layout: learningpathall To select the most appropriate version of a function, each call to a versioned function is routed through an indirect function resolver which is pointed by the called symbol (ifunc). -The compiler generates a resolver based on the function versions declared in the translation unit. A typical resolver implementation uses a runtime library to detect the presence of the architectural features on which the function versions depend and returns a pointer to the correct version. +The compiler generates a resolver based on the function versions declared in the translation unit. A typical resolver implementation uses a runtime library to detect the presence of the architectural features on which the function versions depend and returns a pointer to the correct version. Features implied by the command line are not exempt from runtime detection. The resolution of the called symbol is delayed until runtime, when the dynamic loader runs the resolver and updates the procedure linkage table (PLT) with a pointer to the chosen implementation. The resolver function is run only once and its returned value remains unchanged for the lifetime of the process. Relocations handle references to the called symbol, which return the cached PLT entry. -#### Differences between GCC 14 and LLVM 19 implementations +#### Feature detection at runtime + +Some architectural features depend on others as indicated by the [dependencies table](https://arm-software.github.io/acle/main/acle.html#dependencies). Those are detected transitively and they are not exempt from runtime detection if implied by the command line. For example `rcpc3` depends on `rcpc2` which depends on `rcpc`. All three are detected in the following example. + +Use a text editor to create a file named `rcpc.c` with the code below: + +```c +__attribute__((target_clones("rcpc3", "default"))) int f(void) { return 0; } +``` + +{{% notice Note %}} +The depended-on features (rcpc2, rcpc) *need not* be specified in the attribute, but they *may* well be (there is no functional difference): +```c +__attribute__((target_clones("rcpc3+rcpc2+rcpc", "default"))) +``` +{{% /notice %}} + +To compile with Clang, run: + +```console +clang --target=aarch64-linux-gnu -march=armv8-a+rcpc -O3 --rtlib=compiler-rt -S -o - rcpc.c +``` + +Here is the generated resolver function containing the runtime detection of features: + +```output + .section .text.f.resolver,"axG",@progbits,f.resolver,comdat + .weak f.resolver + .p2align 2 + .type f.resolver,@function +f.resolver: + str x30, [sp, #-16]! + bl __init_cpu_features_resolver + adrp x8, __aarch64_cpu_features + mov x9, #12582912 + adrp x10, f.default + add x10, x10, :lo12:f.default + ldr x8, [x8, :lo12:__aarch64_cpu_features] + movk x9, #1024, lsl #48 + bics xzr, x9, x8 + adrp x8, f._Mrcpc3 + add x8, x8, :lo12:f._Mrcpc3 + csel x0, x8, x10, eq + ldr x30, [sp], #16 + ret +``` +{{% notice Note %}} +The immediate value `#12582912` in this assembly is used to construct a bitmask for materializing the runtime detection of `rcpc3`. +{{% /notice %}} + +#### Differences between GCC 14 and LLVM 20 implementations - The attribute `target_version` in GCC is only supported for C++, not for C. - The set of features as indicated by the [mapping table](https://arm-software.github.io/acle/main/acle.html#mapping) differs in support between the two compilers. -- GCC can statically resolve calls to versioned functions, whereas LLVM cannot. +- LLVM supports mixing `target_version` with `target_clones` whereas GCC does not yet support this. #### Resolver emission with LLVM @@ -47,12 +97,10 @@ The compilation of `file1.c` yields normal code generation since no version of ` When compiling `file2.c` a resolver is emitted for `func1` due to the presence of its default definition. GCC does not currently support multiversioning for this example as it only generates a resolver when a function is called. -#### Static resolution with GCC - -The GCC compiler optimizes calls to versioned functions when they can be statically resolved. +#### Static resolution of calls -Such calls would otherwise be routed through the resolver, but instead they become direct which allows them to be inlined. +Normally the called symbol is resolved at runtime (dynamically), however it may be possible to determine which function version to call at compile time (statically). -This might be possible whenever a function is compiled with a sufficiently high set of architecture features (so including `target`/`target_version`/`target_clones` attributes, and command line options). +This may be possible when the caller function is compiled with a sufficiently high set of architecture features (explicitly by using the `target` attribute as an optimization hint, or the multiversioning attributes `target_version`/`target_clones`, and implicitly via command line options). Refer to the example in the next section for details. -LLVM is not yet able to perform this optimization. +The compiler optimizes calls to versioned functions which can be statically resolved into direct calls. As a result the versioned function may be inlined into the call site. diff --git a/content/learning-paths/cross-platform/function-multiversioning/semantics.md b/content/learning-paths/cross-platform/function-multiversioning/semantics.md index b1e4ea9c03..0d758518bc 100644 --- a/content/learning-paths/cross-platform/function-multiversioning/semantics.md +++ b/content/learning-paths/cross-platform/function-multiversioning/semantics.md @@ -1,5 +1,5 @@ --- -title: About Function Multiversioning +title: About function multiversioning weight: 2 ### FIXED, DO NOT MODIFY @@ -18,9 +18,8 @@ A hardware platform is able to support multiple architectural features from the Function multiversioning provides a convenient way to select the most appropriate version of a function at runtime. The selection is permanent for the lifetime of the process and works as follows: -1. Select the most specific version (the one with most features), else -2. Select the version with the highest priority, as indicated by the [mapping table](https://arm-software.github.io/acle/main/acle.html#mapping), else -3. Select a default version if no other versions are suitable. +1. Select the version with the highest priority, as indicated by the [selection rules](https://arm-software.github.io/acle/main/acle.html#selection), else +2. Select a default version if no other versions are suitable. The `default` version is the version of the function that is generated without these attributes. diff --git a/content/learning-paths/cross-platform/function-multiversioning/streaming-mode.md b/content/learning-paths/cross-platform/function-multiversioning/streaming-mode.md new file mode 100644 index 0000000000..1750c2b62b --- /dev/null +++ b/content/learning-paths/cross-platform/function-multiversioning/streaming-mode.md @@ -0,0 +1,83 @@ +--- +title: Compatibility with streaming mode +weight: 6 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +Function multiversioning is compatible with Arm streaming mode as long as the same calling convention is used across all function versions. + +Use a text editor to create a file named `streaming.c` with the code below: + +```c +__attribute__((target_clones("sve", "simd"))) +void ok_arm_streaming(void) __arm_streaming {} + +__arm_locally_streaming __attribute__((target_version("sme2"))) +void ok_arm_streaming(void) __arm_streaming {} + +__attribute__((target_version("default"))) +void ok_arm_streaming(void) __arm_streaming {} + + +__attribute__((target_clones("sve", "simd"))) +void ok_arm_streaming_compatible(void) __arm_streaming_compatible {} + +__arm_locally_streaming __attribute__((target_version("sme2"))) +void ok_arm_streaming_compatible(void) __arm_streaming_compatible {} + +__attribute__((target_version("default"))) +void ok_arm_streaming_compatible(void) __arm_streaming_compatible {} + + +__arm_locally_streaming __attribute__((target_clones("sve", "simd"))) +void ok_no_streaming(void) {} + +__attribute__((target_version("sme2"))) +void ok_no_streaming(void) {} + +__attribute__((target_version("default"))) +void ok_no_streaming(void) {} + + +__attribute__((target_clones("sve", "simd"))) +void bad_mixed_streaming(void) {} + +__attribute__((target_version("sme2"))) +void bad_mixed_streaming(void) __arm_streaming {} // expected-error: declaration has a different calling convention + +__attribute__((target_version("default"))) +void bad_mixed_streaming(void) __arm_streaming_compatible {} // expected-error: declaration has a different calling convention + +__arm_locally_streaming __attribute__((target_version("dotprod"))) +void bad_mixed_streaming(void) __arm_streaming {} // expected-error: declaration has a different calling convention + + +void n_caller(void) { + ok_arm_streaming(); + ok_arm_streaming_compatible(); + ok_no_streaming(); + bad_mixed_streaming(); +} + +void s_caller(void) __arm_streaming { + ok_arm_streaming(); + ok_arm_streaming_compatible(); + ok_no_streaming(); + bad_mixed_streaming(); +} + +void sc_caller(void) __arm_streaming_compatible { + ok_arm_streaming(); + ok_arm_streaming_compatible(); + ok_no_streaming(); + bad_mixed_streaming(); +} +``` + +To compile with Clang, run: + +```console +clang --target=aarch64-linux-gnu -march=armv8-a+sme --rtlib=compiler-rt -c streaming.c +``` diff --git a/content/learning-paths/cross-platform/github-arm-runners/_index.md b/content/learning-paths/cross-platform/github-arm-runners/_index.md index 9439e3597c..0b8559d2e8 100644 --- a/content/learning-paths/cross-platform/github-arm-runners/_index.md +++ b/content/learning-paths/cross-platform/github-arm-runners/_index.md @@ -13,7 +13,7 @@ prerequisites: - A GitHub account (a Team or Enterprise Cloud plan is required for private repositories). - A Docker Hub account. -author_primary: Jason Andrews +author: Jason Andrews ### Tags skilllevels: Introductory @@ -25,7 +25,7 @@ operatingsystems: tools_software_languages: - GitHub - Docker - + - Runbook ### Cross-platform metadata only shared_path: true shared_between: @@ -33,6 +33,21 @@ shared_between: - laptops-and-desktops - embedded-and-microcontrollers +further_reading: + - resource: + title: Linux arm64 hosted runners now available for free in public repositories + link: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/ + type: documentation + - resource: + title: Using GitHub-hosted runners + link: https://docs.github.com/en/actions/using-github-hosted-runners + type: documentation + - resource: + title: Arm64 on GitHub Actions Powering faster, more efficient build systems + link: https://github.blog/2024-06-03-arm64-on-github-actions-powering-faster-more-efficient-build-systems/ + type: blog + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/github-arm-runners/_next-steps.md b/content/learning-paths/cross-platform/github-arm-runners/_next-steps.md index cf13a0ab64..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/github-arm-runners/_next-steps.md +++ b/content/learning-paths/cross-platform/github-arm-runners/_next-steps.md @@ -1,39 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You can continue learning about different ways to create container images on Arm servers. The Learning Path covering Docker Build Cloud is a great next step. -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/cross-platform/docker-build-cloud/" -# Link to the next learning path being recommended. - - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: Linux arm64 hosted runners now available for free in public repositories - link: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/ - type: documentation - - resource: - title: Using GitHub-hosted runners - link: https://docs.github.com/en/actions/using-github-hosted-runners - type: documentation - - resource: - title: Arm64 on GitHub Actions Powering faster, more efficient build systems - link: https://github.blog/2024-06-03-arm64-on-github-actions-powering-faster-more-efficient-build-systems/ - type: blog - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/gitlab/_index.md b/content/learning-paths/cross-platform/gitlab/_index.md index aba9d1b735..28b27a623a 100644 --- a/content/learning-paths/cross-platform/gitlab/_index.md +++ b/content/learning-paths/cross-platform/gitlab/_index.md @@ -16,7 +16,7 @@ prerequisites: - A computer with [Google Cloud CLI](/install-guides/gcloud) and [kubectl](/install-guides/kubectl/)installed. - A valid GitLab account -author_primary: Pranay Bakre +author: Pranay Bakre ### Tags skilllevels: Advanced @@ -41,6 +41,22 @@ shared_between: - laptops-and-desktops - embedded-and-microcontrollers +further_reading: + - resource: + title: Create Arm based clusters and node pools + link: https://cloud.google.com/kubernetes-engine/docs/how-to/create-arm-clusters-nodes + type: documentation + - resource: + title: Configure cluster access to use kubectl + link: https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl + type: documentation + - resource: + title: GKE documentation + link: https://cloud.google.com/kubernetes-engine/docs + type: documentation + + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/gitlab/_next-steps.md b/content/learning-paths/cross-platform/gitlab/_next-steps.md index 9b0b35a97f..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/gitlab/_next-steps.md +++ b/content/learning-paths/cross-platform/gitlab/_next-steps.md @@ -1,27 +1,8 @@ --- -next_step_guidance: Continue learning about building applications with Arm by reviewing the learning path covering deployment of a multi-architecture application with GKE. - -recommended_path: "/learning-paths/servers-and-cloud-computing/gke-multi-arch" - -further_reading: - - resource: - title: Create Arm based clusters and node pools - link: https://cloud.google.com/kubernetes-engine/docs/how-to/create-arm-clusters-nodes - type: documentation - - resource: - title: Configure cluster access to use kubectl - link: https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl - type: documentation - - resource: - title: GKE documentation - link: https://cloud.google.com/kubernetes-engine/docs - type: documentation - - # ================================================================================ -# FIXED, DO NOT MODIFY +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/integer-vs-floats/_index.md b/content/learning-paths/cross-platform/integer-vs-floats/_index.md index 2894a24b0a..20ef23de0a 100644 --- a/content/learning-paths/cross-platform/integer-vs-floats/_index.md +++ b/content/learning-paths/cross-platform/integer-vs-floats/_index.md @@ -1,5 +1,5 @@ --- -title: Learn about Integer and floating-point conversions +title: Learn about integer and floating-point conversions minutes_to_complete: 30 @@ -11,7 +11,7 @@ learning_objectives: prerequisites: - An Arm computer running Linux and a recent version of a C++ compiler (Clang or GCC) installed -author_primary: Konstantinos Margaritis +author: Konstantinos Margaritis ### Tags skilllevels: Advanced @@ -24,6 +24,8 @@ tools_software_languages: - GCC - Clang - Coding + - Runbook + operatingsystems: - Linux shared_path: true @@ -33,6 +35,30 @@ shared_between: - mobile-graphics-and-gaming +further_reading: + - resource: + title: Arm Neoverse™ N1 Software Optimization Guide + link: https://developer.arm.com/documentation/PJDOC-466751330-9707/r4p1/?lang=en + type: documentation + - resource: + title: Arm Neoverse N2 Software Optimization Guide + link: https://developer.arm.com/documentation/PJDOC-466751330-18256/0003/?lang=en + type: documentation + - resource: + title: Data Types in C - Integer, Floating Point, and Void Explained + link: https://www.freecodecamp.org/news/data-types-in-c-integer-floating-point-and-void-explained/ + type: website + - resource: + title: Half-precision floating-point format + link: https://en.wikipedia.org/wiki/Half-precision_floating-point_format + type: website + - resource: + title: bfloat16 floating-point format + link: https://en.wikipedia.org/wiki/Bfloat16_floating-point_format + type: website + + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/integer-vs-floats/_next-steps.md b/content/learning-paths/cross-platform/integer-vs-floats/_next-steps.md index 551b50c6b9..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/integer-vs-floats/_next-steps.md +++ b/content/learning-paths/cross-platform/integer-vs-floats/_next-steps.md @@ -1,35 +1,8 @@ --- -next_step_guidance: You now have a good understanding of floating point numbers and the conversions, implicit and explicit. To learn more, please look at the learning path on Arm Neoverse as well as the links provided under further reading. - -recommended_path: /learning-paths/servers-and-cloud-computing/top-down-n1/ - -further_reading: - - resource: - title: Arm Neoverse™ N1 Software Optimization Guide - link: https://developer.arm.com/documentation/PJDOC-466751330-9707/r4p1/?lang=en - type: documentation - - resource: - title: Arm Neoverse N2 Software Optimization Guide - link: https://developer.arm.com/documentation/PJDOC-466751330-18256/0003/?lang=en - type: documentation - - resource: - title: Data Types in C - Integer, Floating Point, and Void Explained - link: https://www.freecodecamp.org/news/data-types-in-c-integer-floating-point-and-void-explained/ - type: website - - resource: - title: Half-precision floating-point format - link: https://en.wikipedia.org/wiki/Half-precision_floating-point_format - type: website - - resource: - title: bfloat16 floating-point format - link: https://en.wikipedia.org/wiki/Bfloat16_floating-point_format - type: website - - # ================================================================================ -# FIXED, DO NOT MODIFY +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/intrinsics/_index.md b/content/learning-paths/cross-platform/intrinsics/_index.md index 0545380d72..832cbfbc44 100644 --- a/content/learning-paths/cross-platform/intrinsics/_index.md +++ b/content/learning-paths/cross-platform/intrinsics/_index.md @@ -1,46 +1,73 @@ --- -armips: -- Neoverse -- Cortex-A -author_primary: Jason Andrews +title: Porting architecture specific intrinsics + description: Learn how to port architecture-specific intrinsics to Arm processors. -layout: learningpathall + +minutes_to_complete: 30 + +who_is_this_for: This is an advanced topic for software developers interested in porting + architecture specific intrinsics to Arm processors. + learning_objectives: - Describe what intrinsics are and how to find them in code. - Evaluate options and use header-only libraries to port architecture-specific intrinsics to Arm. -learning_path_main_page: 'yes' -minutes_to_complete: 30 -operatingsystems: -- Linux + prerequisites: - Some understanding of SIMD concepts. - An Arm based machine or [cloud instance](/learning-paths/servers-and-cloud-computing/csp/) running Ubuntu Linux. - Optionally, an `x86_64` machine also running Ubuntu. -skilllevels: Advanced -subjects: Performance and Architecture + +author: Jason Andrews + test_images: - amd64/ubuntu:latest - arm64v8/ubuntu:latest test_link: https://github.com/armflorentlebeau/arm-learning-paths/actions/runs/4312122327 test_maintenance: true -test_status: -- passed -- passed -title: Porting architecture specific intrinsics + +### Tags +skilllevels: Advanced +subjects: Performance and Architecture +armips: +- Neoverse +- Cortex-A +operatingsystems: +- Linux tools_software_languages: - Neon - SVE - Coding - Intrinsics + - Runbook -weight: 1 -who_is_this_for: This is an advanced topic for software developers interested in porting - architecture specific intrinsics to Arm processors. +further_reading: + - resource: + title: Port with SSE2Neon and SIMDe + link: https://developer.arm.com/documentation/102581/0200/Port-with-SSE2Neon-and-SIMDe + type: documentation + - resource: + title: Neon Programmer's Guide + link: https://developer.arm.com/documentation/den0018 + type: documentation + - resource: + title: Porting SSE to Neon, Are libraries the way forward? + link: https://community.arm.com/arm-community-blogs/b/ai-and-ml-blog/posts/porting-sse-to-neon-are-libraries-the-way-forward + type: blog + - resource: + title: Porting Advisor for Graviton, AWS Online Tech Talks + link: https://youtu.be/Ya9Co04fszI + type: video ### Cross-platform metadata only shared_path: true shared_between: - servers-and-cloud-computing - laptops-and-desktops + +### FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. --- diff --git a/content/learning-paths/cross-platform/intrinsics/_next-steps.md b/content/learning-paths/cross-platform/intrinsics/_next-steps.md index 23a75afc86..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/intrinsics/_next-steps.md +++ b/content/learning-paths/cross-platform/intrinsics/_next-steps.md @@ -1,44 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You can continue learning about some other Arm architecture features for increased performance and cost savings. The Learning Path on large system extensions is a great next step. -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/servers-and-cloud-computing/lse/" -# Link to the next learning path being recommended. - - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: Port with SSE2Neon and SIMDe - link: https://developer.arm.com/documentation/102581/0200/Port-with-SSE2Neon-and-SIMDe - type: documentation - - resource: - title: Neon Programmer's Guide - link: https://developer.arm.com/documentation/den0018 - type: documentation - - resource: - title: Porting SSE to Neon, Are libraries the way forward? - link: https://community.arm.com/arm-community-blogs/b/ai-and-ml-blog/posts/porting-sse-to-neon-are-libraries-the-way-forward - type: blog - - resource: - title: Porting Advisor for Graviton, AWS Online Tech Talks - link: https://youtu.be/Ya9Co04fszI - type: video - - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/intrinsics/intro.md b/content/learning-paths/cross-platform/intrinsics/intro.md index b281b64da2..68c715617e 100644 --- a/content/learning-paths/cross-platform/intrinsics/intro.md +++ b/content/learning-paths/cross-platform/intrinsics/intro.md @@ -8,11 +8,11 @@ weight: 2 Migrating C/C++ applications from x64 to Arm requires recompiling the source code for the Arm architecture. A simple recompile works much of the time, but not always. -SIMD extensions are one of the common barriers encountered when porting C/C++ applications from x64 to Arm. This article is a short background on intrinsics and how to identify them in code. This Learning Path presents options for how to get the code compiled and running on an Arm-based platform. +SIMD extensions are one of the common barriers encountered when porting C/C++ applications from x64 to Arm. This article is a short background on intrinsics and how to identify them in code. This Learning Path presents options for how to get the code compiled and running on an Arm-based platform. ## Intrinsics -Intrinsics are functions which are built into the compiler and not part of a library. They look like function calls, but don’t require an actual function call. When the compiler encounters intrinsics it directly substitutes a sequence of instructions. Intrinsics are often used to access special instructions that don’t have a direct mapping from C/C++ or when performance optimization is needed. +Intrinsics are functions which are built into the compiler and not part of a library. They look like function calls, but don’t require an actual function call. When the compiler encounters intrinsics it directly substitutes a sequence of instructions. Intrinsics are often used to access special instructions that don’t have a direct mapping from C/C++ or when performance optimization is needed. One use of intrinsics is to access SIMD (single-instruction, multiple-data) instructions directly from C/C++ for improved application performance. Intrinsics are easier to work with compared to assembly language, but they often pose a challenge when porting source code to a new architecture. @@ -21,7 +21,7 @@ Intel Streaming SIMD Extensions (SSE) and [Arm NEON](https://developer.arm.com/d There are generally 3 ways to program SIMD hardware: - The C/C++ compiler recognizes opportunities to use SIMD instructions and inserts them automatically (with or without some guidance) - Intrinsics to access SIMD instructions directly from C/C++ source code -- Assembly programming +- Assembly programming ## Source code example diff --git a/content/learning-paths/cross-platform/ipexplorer/_index.md b/content/learning-paths/cross-platform/ipexplorer/_index.md index c5dec908be..e1df8ecca1 100644 --- a/content/learning-paths/cross-platform/ipexplorer/_index.md +++ b/content/learning-paths/cross-platform/ipexplorer/_index.md @@ -13,7 +13,7 @@ prerequisites: - An Arm account that can access IP Explorer - (Optional) A Linux machine with the desired compilers installed -author_primary: Ronan Synnott +author: Ronan Synnott ### Tags skilllevels: Introductory @@ -34,6 +34,17 @@ shared_between: - embedded-and-microcontrollers - embedded-and-microcontrollers +further_reading: + - resource: + title: Arm IP Explorer + link: https://www.arm.com/products/ip-explorer + type: website + - resource: + title: Login to Arm IP Explorer + link: https://ipexplorer.arm.com/ + type: website + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/ipexplorer/_next-steps.md b/content/learning-paths/cross-platform/ipexplorer/_next-steps.md index 883d6cab69..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/ipexplorer/_next-steps.md +++ b/content/learning-paths/cross-platform/ipexplorer/_next-steps.md @@ -1,35 +1,8 @@ --- # ================================================================================ -# Edit +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ - -next_step_guidance: > - You have run a custom application on a cloud-based RTL simulation of an Arm based system. Why not learn about other development environments? -# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. - -recommended_path: "/learning-paths/embedded-and-microcontrollers/docker/" - -# Link to the next learning path being recommended(For example this could be /learning-paths/servers-and-cloud-computing/mongodb). - -# further_reading links to references related to this path. Can be: - # Manuals for a tool / software mentioned (type: documentation) - # Blog about related topics (type: blog) - # General online references (type: website) - -further_reading: - - resource: - title: Arm IP Explorer - link: https://www.arm.com/products/ip-explorer - type: website - - resource: - title: Login to Arm IP Explorer - link: https://ipexplorer.arm.com/ - type: website - -# ================================================================================ -# FIXED, DO NOT MODIFY -# ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/kleidiai-explainer/_index.md b/content/learning-paths/cross-platform/kleidiai-explainer/_index.md index ca8a487fbf..ffc7303c3e 100644 --- a/content/learning-paths/cross-platform/kleidiai-explainer/_index.md +++ b/content/learning-paths/cross-platform/kleidiai-explainer/_index.md @@ -14,7 +14,7 @@ prerequisites: - An Arm-based Linux machine that implements the Int8 Matrix Multiplication (*i8mm*) architecture feature. The example in this Learning Path is run on an AWS Graviton 3 instance. Instructions on setting up an Arm-based server are [found here](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/aws/). - A basic understanding of linear algebra terminology, such as dot product and matrix multiplication. -author_primary: Zach Lasiuk +author: Zach Lasiuk ### Tags skilllevels: Introductory subjects: ML @@ -27,6 +27,8 @@ tools_software_languages: - GenAI - Coding - NEON + - Runbook + operatingsystems: - Linux @@ -38,6 +40,19 @@ shared_between: +further_reading: + - resource: + title: KleidiAI documentation + link: https://gitlab.arm.com/kleidi/kleidiai/-/blob/main/docs/matmul_qsi4cx/README.md?ref_type=heads + type: documentation + - resource: + title: KleidiAI visualized + link: https://community.arm.com/arm-community-blogs/b/ai-and-ml-blog/posts/kleidiai + type: blog + + + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/kleidiai-explainer/_next-steps.md b/content/learning-paths/cross-platform/kleidiai-explainer/_next-steps.md index dd6202b1e9..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/kleidiai-explainer/_next-steps.md +++ b/content/learning-paths/cross-platform/kleidiai-explainer/_next-steps.md @@ -1,24 +1,8 @@ --- -next_step_guidance: Proceed to the next learning path to learn how to efficiently run LLMs on Android using KleidiAI with Google AI Edge's MediaPipe framework. - -recommended_path: /learning-paths/mobile-graphics-and-gaming/kleidiai-on-android-with-mediapipe-and-xnnpack - -further_reading: - - resource: - title: KleidiAI documentation - link: https://gitlab.arm.com/kleidi/kleidiai/-/blob/main/docs/matmul_qsi4cx/README.md?ref_type=heads - type: documentation - - resource: - title: KleidiAI visualized - link: https://community.arm.com/arm-community-blogs/b/ai-and-ml-blog/posts/kleidiai - type: blog - - - # ================================================================================ -# FIXED, DO NOT MODIFY +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/kleidiai-explainer/page1.md b/content/learning-paths/cross-platform/kleidiai-explainer/page1.md index 373e8d08b2..4d7b66de16 100644 --- a/content/learning-paths/cross-platform/kleidiai-explainer/page1.md +++ b/content/learning-paths/cross-platform/kleidiai-explainer/page1.md @@ -7,9 +7,9 @@ layout: learningpathall --- ## What is KleidiAI? -KleidiAI is a set of micro-kernels that integrates into machine learning frameworks, accelerating AI inference on Arm-based platforms. KleidiAI's micro-kernels are hand-optimized in Arm assembly code to leverage modern architecture instructions that greatly speed up AI inference on Arm CPUs. +KleidiAI is a set of micro-kernels that integrate into machine learning frameworks, accelerating AI inference on Arm-based platforms. KleidiAI's micro-kernels are hand-optimized in Arm assembly code to leverage modern architecture instructions that greatly speed up AI inference on Arm CPUs. -If both of the following two conditions are met, you can benefit from KleidiAI automatically, without any further action: +If both of the following two conditions are met, you will benefit from KleidiAI automatically, without any further action: * Your ML Framework integrates KleidiAI. * Your hardware platform supports the required Arm instructions for your inference. @@ -40,11 +40,11 @@ KleidiAI uses modern Arm CPU instructions to accelerate matrix multiplication an ## What Arm features does KleidiAI leverage? Each KleidiAI matrix multiplication micro-kernel uses a specific Arm architecture feature to enhance AI inference. In this section you can read a description of each architecture feature that KleidiAI uses to accelerate matrix multiplication. -* **Dot Product**: KleidiAI uses the `vdotq_s32` intrinsic, which is a vector dot product, introduced as part of SIMD. It computes the dot product of two vector 8-bit integers and accumulates the result into a 32-bit integer. View the `vdot` documentation [here](https://developer.arm.com/documentation/ddi0597/2024-03/SIMD-FP-Instructions/VDOT--by-element---BFloat16-floating-point-indexed-dot-product--vector--by-element--). +* **Dot Product**: KleidiAI uses the `vdotq_s32` intrinsic, which is a vector dot product, introduced as part of SIMD. It computes the dot product of two vector 8-bit integers, and accumulates the result into a 32-bit integer. View the `vdot` documentation [here](https://developer.arm.com/documentation/ddi0597/2024-03/SIMD-FP-Instructions/VDOT--by-element---BFloat16-floating-point-indexed-dot-product--vector--by-element--). -* **SMMLA**: KleidiAI also makes use of the Int8 Matrix Multiplication (i8mm) feature including the `SMMLA` instruction, which stands for *Signed 8-bit integer matrix multiply-accumulate*. It multiplies a 2x8 matrix of 8-bit integers by a 8x2 matrix of 8-bit integers, which is accumulated into a 2x2 matrix of 32-bit integers. For more information, view the *SMMLA* and *i8mm* documentation [here](https://developer.arm.com/documentation/ddi0602/latest/SIMD-FP-Instructions/SMMLA--vector---Signed-8-bit-integer-matrix-multiply-accumulate--vector--). +* **SMMLA**: KleidiAI also makes use of the Int8 Matrix Multiplication (i8mm) feature including the `SMMLA` instruction (*Signed 8-bit integer matrix multiply-accumulate*). It multiplies a 2x8 matrix of 8-bit integers by a 8x2 matrix of 8-bit integers, which is accumulated into a 2x2 matrix of 32-bit integers. For more information, view the *SMMLA* and *i8mm* documentation [here](https://developer.arm.com/documentation/ddi0602/latest/SIMD-FP-Instructions/SMMLA--vector---Signed-8-bit-integer-matrix-multiply-accumulate--vector--). -* **FMLA**: This instruction, which stands for *Floating-point Multiply Accumulate*, is for 16-bit operations. It is included as part of the Advanced SIMD extension, multiplying and accumulating two vectors together, each containing eight 16-bit numbers. View the `FMLA` documentation [here](https://developer.arm.com/documentation/ddi0602/2024-03/SIMD-FP-Instructions/FMLA--vector---Floating-point-fused-Multiply-Add-to-accumulator--vector--). +* **FMLA**: This instruction, *Floating-point Multiply Accumulate*, is for 16-bit operations. It is included as part of the Advanced SIMD extension, multiplying and accumulating two vectors together, each containing eight 16-bit numbers. View the `FMLA` documentation [here](https://developer.arm.com/documentation/ddi0602/2024-03/SIMD-FP-Instructions/FMLA--vector---Floating-point-fused-Multiply-Add-to-accumulator--vector--). * **FMOPA**: This instruction stands for *Floating-point outer product and accumulate*. It is included in the Arm Scalable Matrix Extension (SME). The single precision `FMOPA` variant enables optimized matrix multiplication on 32-bit numbers. View the `FMOPA` documentation [here](https://developer.arm.com/documentation/ddi0602/2023-12/SME-Instructions/FMOPA--non-widening---Floating-point-outer-product-and-accumulate-?lang=en). diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/1.png b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/1.png new file mode 100644 index 0000000000..f8dd45e42e Binary files /dev/null and b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/1.png differ diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/2.png b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/2.png new file mode 100644 index 0000000000..1827aa3f5e Binary files /dev/null and b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/2.png differ diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/3.png b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/3.png new file mode 100644 index 0000000000..2fd7f4c641 Binary files /dev/null and b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/3.png differ diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/_index.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/_index.md new file mode 100644 index 0000000000..166d5a70fb --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/_index.md @@ -0,0 +1,70 @@ +--- +title: LLM fine-tuning for web and mobile applications + +draft: true +cascade: + draft: true + +minutes_to_complete: 60 + +who_is_this_for: This is an introductory topic for developers and data scientists new to fine-tuning large language models (LLMs) and looking to develop a fine-tuned LLM for web and mobile applications. + +learning_objectives: + - Learn the basics of large language models (LLMs) and how fine-tuning enhances model performance for specific use cases. + - Understand full fine-tuning, parameter-efficient fine-tuning (e.g., LoRA, QLoRA, PEFT), and instruction-tuning. + - Learn when to use different fine-tuning approaches based on model size, task complexity, and computational constraints. + - Learn how to curate, clean, and preprocess domain-specific datasets for optimal fine-tuning. + - Understand dataset formats, tokenization, and annotation techniques for improving model learning. + - Implement fine-tuning with frameworks like Hugging Face Transformers and PyTorch. + - Compile a Large Language Model (LLM) using ExecuTorch. + - Learn how to deploy a fine-tuned model on a mobile device. + - Describe techniques for running large language models in an mobile environment. + +prerequisites: + - An AWS Graviton4 instance. You can substitute any Arm based Linux computer. Refer to [Get started with Arm-based cloud instances](/learning-paths/servers-and-cloud-computing/csp/) for more information about cloud service providers offering Arm-based instances. + - An Android smartphone with the i8mm feature and 16GB of RAM. + - Basic understanding of machine learning and deep learning. + - Familiarity with deep learning frameworks such as PyTorch and Hugging Face Transformers. + +author: Parichay Das + +### Tags +skilllevels: Introductory +subjects: ML +armips: + - Neoverse + +tools_software_languages: + - LLM + - GenAI + - Python + - PyTorch + - ExecuTorch +operatingsystems: + - Linux + - Windows + +shared_path: true +shared_between: + - servers-and-cloud-computing + - mobile-graphics-and-gaming + +further_reading: + - resource: + title: Hugging Face Documentation + link: https://huggingface.co/docs + type: documentation + - resource: + title: PyTorch Documentation + link: https://pytorch.org/docs/stable/index.html + type: documentation + + + + +### FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. +--- diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/_next-steps.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/_next-steps.md new file mode 100644 index 0000000000..c3db0de5a2 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/_next-steps.md @@ -0,0 +1,8 @@ +--- +# ================================================================================ +# FIXED, DO NOT MODIFY THIS FILE +# ================================================================================ +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. +--- diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-0.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-0.md new file mode 100644 index 0000000000..36b0c58bb0 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-0.md @@ -0,0 +1,102 @@ +--- +title: Create a Jupyter notebook on an Arm server +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +You can use a Jupyter notebook running on an Arm server for fine-tuning LLMs. + +## Install a Jupyter notebook on an Arm server + +Follow the steps below to create, configure, and connect to a Jupyter notebook on an Arm server. + +### Before you begin + +You need an Arm server or other Arm Linux machine to run a Jupyter notebook. + +You can use an AWS Graviton4 `r8g.16xlarge` instance to perform fine tuning or a similar Arm server. Refer to [Get started with Arm-based cloud instances](/learning-paths/servers-and-cloud-computing/csp/) for more information about cloud service providers offering Arm-based instances. + +The instructions are provided for Ubuntu 24.04, but other Linux distributions are possible. + +Make sure you can connect by SSH to the Arm server. + +Jupyter notebooks run on port 8888. You can open this port or use SSH port forwarding. + +Install the required software: + +```console +sudo apt-get update +sudo apt-get install python3-pip python3-venv python3-dev python-is-python3 -y +``` + +Create a Python virtual environment by running: + +```bash +python -m venv venv +source venv/bin/activate +``` + +In your virtual environment, install Jupyter: + +```bash +pip install jupyter +``` + +### Configure a Jupyter notebook + +Generate a Jupyter configuration file with the command below: + +```console +jupyter notebook --generate-config +``` + +Use a text edit to edit the configuration file: + +```console +~/.jupyter/jupyter_notebook_config.py +``` + +Modify the configuration file to include the lines below: + +```console +c.NotebookApp.ip = '0.0.0.0' +c.NotebookApp.port = 8888 +c.NotebookApp.open_browser = False +c.NotebookApp.notebook_dir = '/home/ubuntu' +``` + +### Open port 888 + +To access the Jupyter notebook you need to either open port 8888 in the security group or use SSH port forwarding. + +If you are using a cloud instance, add an incoming rule for TCP access to port 8888 from your IP address. Refer to the cloud service provider documentation for security groups. + +If you want to use SSH port forwarding, you can connect to the Arm server using: + +```console +ssh -i -L 8888:localhost:8888 @ +``` + +### Start Jupyter notebook + +Start the Jupyter notebook using: + +```console +jupyter notebook +``` + +URLs are printed in the terminal output. + +If you are using SSH port forwarding copy the URL with 127.0.0.0 and if you are opening port 8888 copy the URL with the IP address of the Arm server. + +### Connect to the Jupyter notebook using your browser + +Open a web browser on your local machine and paste the copied URL into the address bar and press enter. + +You are now connected to Jupyter notebook running on your Arm server. + +Click `File` from the menu and navigate to `New` select `Notebook`. For the kernel select `Python 3`. + +You see an empty cell in your notebook, and you are ready to use your Jupyter notebook for fine-tuning LLMs. diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-1.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-1.md new file mode 100644 index 0000000000..43af12e57a --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-1.md @@ -0,0 +1,83 @@ +--- +title: What is fine-tuning? +weight: 2 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +Fine-tuning in the context of large language models (LLMs) refers to the process of further training a pre-trained LLM on domain-specific or task-specific data to enhance its performance for a particular application. LLMs, such as GPT, BERT, and LLaMA, are initially trained on massive corpora containing billions of tokens, enabling them to develop a broad linguistic understanding. + +Fine-tuning refines this knowledge by exposing the model to specialized datasets, allowing it to generate more contextually relevant and accurate responses. Rather than training an LLM from scratch, fine-tuning leverages the pre-existing knowledge embedded in the model, optimizing it for specific use cases such as customer support, content generation, legal document analysis, or medical text processing. + +This approach significantly reduces computational requirements and data needs while improving adaptability and efficiency in real-world applications. + +## Advantages of fine-tuning + +Fine-tuning is essential for optimizing large language models (LLMs) to meet specific application requirements, enhance performance, and reduce computational costs. While pre-trained LLMs have broad linguistic capabilities, they may not always produce domain-specific, contextually accurate, or application-tailored responses. + +The advantages of fine-tuning include: + +- Customization for specific domains +- Improved response quality and accuracy +- Task-specific adaptation +- Reduction in computational and data requirements +- Enhanced efficiency in real-world applications +- Alignment with ethical, regulatory, and organizational guidelines + +## Fine-Tuning Methods + +Fine-tuning LLMs uses different techniques based on the various use cases, computational constraints, and efficiency requirements. + +Below are the key fine-tuning methods: + +### Full Fine-Tuning (Supervised Learning Approach) + +Full fine-tuning involves updating all parameters of the LLM using task-specific data, requiring significant computational power and large labeled datasets, which provides the highest level of customization. + +### Instruction Fine-Tuning + +Instruction fine-tuning is a supervised learning method. A pre-trained large language model (LLM) is further trained on instruction-response pairs to improve its ability to follow human instructions accurately. Instruction fine-tuning has some key features using labeled instruction-response pairs, enhances model alignment with human intent. It is commonly used in chatbots and AI Assistants, and prepares models for zero-shot and few-shot learning. + +### Parameter-Efficient Fine-Tuning (PEFT) + +PEFT is an optimized approach that reduces the number of trainable parameters while maintaining high performance. + +Some approaches are: + +- ###### LoRA (Low-Rank Adaptation) + - Introduces small trainable weight matrices (rank decomposition) while freezing the main model weights. + - Significantly reduces GPU memory usage and training time. + +- ###### QLoRA (Quantized LoRA) + - Uses quantization (e.g., 4-bit or 8-bit precision) to reduce memory footprint while applying LoRA fine-tuning. + - Ideal for fine-tuning large models on limited hardware. + +- ###### Adapter Layers + - Inserts small trainable layers between existing layers of the model and Keeps most parameters frozen, reducing computational overhead. + +- ###### Reinforcement Learning from Human Feedback (RLHF) + - Fine-tunes models based on human preferences using reinforcement learning. + +- ###### Domain-Specific Fine-Tuning + - Fine-tunes the LLM with domain-specific datasets and improves accuracy and relevance in specialized applications. + +- ###### Multi-Task Learning (MTL) Fine-Tuning + - Trains the model on multiple tasks simultaneously, enabling generalization across different applications. + + +## Fine-Tuning Implementation + +The following steps need to be performed to implement fine-tuning: + +- Base model selection: Choose a pre-trained model based on your use cases. You can find pre-trained models on [Hugging Face](https://huggingface.co/) +- Fine-tuning method finalization: Select the most appropriate fine-tuning method (supervised, instruction-based, PEFT) based on your use case and dataset. You can typically find various datasets on [Hugging Face](https://huggingface.co/datasets) and [Kaggle](https://www.kaggle.com/datasets). +- Dataset preparation: Organize your data for your use case-specific training, ensuring it aligns with the model's required format. +- Training: Utilize frameworks such as TensorFlow and PyTorch to fine-tune the model. +- Evaluate: Evaluate the model, refine it as needed, and retrain to enhance performance. + +The steps are depicted in Figure 1 below: + +![example image alt-text#center](1.png "Figure 1. Fine-Tuning Implementation") + +With this background you are ready to get started with fine-tuning. \ No newline at end of file diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-2.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-2.md new file mode 100644 index 0000000000..0591309d39 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-2.md @@ -0,0 +1,60 @@ +--- +title: Set up for fine tuning a large language model + +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +All of the commands are meant to be copied into a cell in your Jupyter notebook. + +Copy each command into a cell, and use `Shift + Enter` to run the cell. After the cell is run, advance to the next command and enter it in a new cell. + +## Install the required libraries + +The following commands install the necessary libraries, including Hugging Face Transformers, Datasets, and fine-tuning methods. These libraries facilitate model loading, training, and fine-tuning. + + +Install the Hugging Face transformers library to access pre-trained LLMs. + +```python +!pip install transformers +``` + +Install transformers along with PyTorch, ensuring that models are trained and fine-tuned using the Torch backend. + +```python +!pip install transformers[torch] +``` + +The datasets library (by Hugging Face) provides access to a vast collection of pre-built datasets. + +```python +!pip install datasets +``` + +The evaluate library provides metrics for model performance assessment. + +```python +!pip install evaluate +``` + +### Speed up fine-tuning of Large Language Models (LLMs) + +[Unsloth](https://huggingface.co/unsloth) is a library designed to speed up fine-tuning of Large Language Models (LLMs) while reducing computational costs. It optimizes training efficiency, particularly for LoRA (Low-Rank Adaptation) fine-tuning . + + +First, use the `%%capture` command, a Jupyter Notebook magic command that suppresses the output of a cell. + +```python +%%capture +``` + +Next, uninstall the existing Unsloth and install the latest version directly from the GitHub repository. + +```python +!pip uninstall unsloth -y && pip install --upgrade --no-cache-dir "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" +``` + +You have now installed the required software for fine-tuning. \ No newline at end of file diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-3.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-3.md new file mode 100644 index 0000000000..893b125613 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-3.md @@ -0,0 +1,81 @@ +--- +title: Load the pre-trained model and tokenizer +weight: 5 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +The following commands load the pre-trained model and tokenizer, ensuring compatibility with the fine-tuning task and optimizing memory usage. + +Continue to copy the commands into your Jupyter notebook and execute them. + +1. Import the two required software modules: + + - FastLanguageModel: A highly optimized loader for LLaMA models in Unsloth, created for performance and memory efficiency. + - torch: Required for handling tensors and computations. + + ```python + from unsloth import FastLanguageModel + import torch + ``` + +2. Define the model configuration. + + The parameters are: + + - max_seq_length = 2048 → Defines the maximum number of tokens the model can process at once. + - dtype = None → Auto-selects Float16 for older GPUs (Tesla T4, V100) + - load_in_4bit = True → Enables 4-bit quantization to reduce memory usage + + ```python + max_seq_length = 2048 + dtype = None + load_in_4bit = True + ``` + +3. Load the pre-trained model using the settings below: + + - Load a 1B parameter fine-tuned LLaMA model. + - Load the optimized LLaMA model with reduced VRAM usage and faster processing. + - Load the corresponding tokenizer for tokenizing inputs properly. + + ```python + model, tokenizer = FastLanguageModel.from_pretrained( + model_name = "unsloth/Llama-3.2-1B-Instruct", + max_seq_length = max_seq_length, + dtype = dtype, + load_in_4bit = load_in_4bit, + ``` + +4. Use Parameter-Efficient Fine-Tuning (PEFT) using LoRA (Low-Rank Adaptation) for the pre-trained model. + + The parameters are: + + - LoRA Rank (r): Defines the rank of the low-rank matrices used in LoRA + - Target Modules: Specifies which layers should be fine-tuned with LoRA, includes attention layers (q_proj, k_proj, v_proj, o_proj) and feedforward layers (gate_proj, up_proj, down_proj) + - LoRA Alpha (lora_alpha): Scaling factor for LoRA weights and a higher value makes the LoRA layers contribute more to the model's output + - LoRA Dropout: Dropout randomly disables connections to prevent overfitting + - Bias (bias): No additional bias parameters are trained (optimized for efficiency) + - Gradient Checkpointing: Optimized memory-saving method + - Random Seed: Ensures reproducibility across training runs + - Rank-Stabilized LoRA: Rank stabilization not used + - LoFTQ Quantization: No LoFTQ (Low-bit Quantization) applied + + ```python + model = FastLanguageModel.get_peft_model( + model, + r = 16, + target_modules = ["q_proj", "k_proj", "v_proj", "o_proj", + "gate_proj", "up_proj", "down_proj",], + lora_alpha = 16, + lora_dropout = 0, + bias = "none", + use_gradient_checkpointing = "unsloth", + random_state = 3407, + use_rslora = False, + loftq_config = None, + ) + ``` + + Continue to the next section to prepare the dataset. \ No newline at end of file diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-4.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-4.md new file mode 100644 index 0000000000..7829a421c9 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-4.md @@ -0,0 +1,80 @@ +--- +title: Prepare the dataset +weight: 6 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +Prepare the dataset for fine-tuning by formatting it to match the LLaMA-3.1 chat template. + +1. Import the chat template functionality from Unsloth and structure the dataset in a format that LLaMA-3.1 expects. + + ```python + from unsloth.chat_templates import get_chat_template + ``` + +2. Apply the chat template to tokenizer and ensure the prompt formatting is consistent when training the model. + + ```python + tokenizer = get_chat_template( + tokenizer, + chat_template = "llama-3.1", + ) + ``` + +3. Format the dataset prompts using the steps below: + - Extract the instruction column from the dataset. + - Apply the chat template formatting to each instruction. + - Return a new dictionary with the formatted text. + + ```python + def formatting_prompts_func(examples): + convos = examples["instruction"] + texts = [tokenizer.apply_chat_template(convo, tokenize = False, add_generation_prompt = False) for convo in convos] + return { "text" : texts, } + pass + ``` + +4. Load the [customer support chatbot training dataset](https://huggingface.co/datasets/bitext/Bitext-customer-support-llm-chatbot-training-dataset) from Hugging Face. + + The dataset contains example conversations with instructions for fine-tuning. + + ```python + from datasets import load_dataset + dataset = load_dataset("bitext/Bitext-customer-support-llm-chatbot-training-dataset", split = "train") + ``` + + The image below shows the dataset loading: + +![example image alt-text#center](2.png ) + +5. Import the standardization function. + + The function `standardize_sharegpt` helps in structuring dataset inputs in a ShareGPT-like format (a commonly used format for LLM fine-tuning). This ensures that the data follows a standardized format required for effective instruction tuning. + + ```python + from unsloth.chat_templates import standardize_sharegpt + ``` + +6. Define a function to format the dataset and extract the instruction (input text) and response (output text) from the dataset. + + This stores the data as `instruction_text` and `response_text`. + + ```python + def formatting_prompts_func(examples): + return { "instruction_text": examples["instruction"], "response_text": examples["response"] } + ``` + +7. Format the dataset by applying `formatting_prompts_func` to every record in the dataset. + + Use batch processing (batched=True) for efficiency. + + ```python + def formatting_prompts_func(examples): + return { "instruction_text": examples["instruction"], "response_text": examples["response"] } + ``` + + The image below shows batch processing progress: + +![example image alt-text#center](3.png ) \ No newline at end of file diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-5.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-5.md new file mode 100644 index 0000000000..0d05bdd521 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-5.md @@ -0,0 +1,129 @@ +--- +title: Configure, initialize, and perform fine-tuning +weight: 7 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +This section performs fine-tuning using the Supervised Fine-Tuning (SFT) trainer to train the model using the prepared dataset. The trainer manages training configuration, optimization, and logging. + +1. Import the necessary libraries. + + The library summary is: + - SFTTrainer (from trl) → Handles the fine-tuning process for LLMs using supervised fine-tuning (SFT). + - TrainingArguments (from transformers) → Defines training hyperparameters like batch size, learning rate, and logging. + - DataCollatorForSeq2Seq (from transformers) → Prepares batches of text data for training (handles padding, truncation). + - is_bfloat16_supported() (from unsloth) → Checks if the system supports bfloat16 (a mixed-precision format for optimized training). + + ```python + from trl import SFTTrainer + from transformers import TrainingArguments, DataCollatorForSeq2Seq + from unsloth import is_bfloat16_supported + ``` + +2. Initialize the SFT trainer. + + The parameters are: + - Loads the Model & Tokenizer → Uses the pre-trained LLM and tokenizer. + - Specifies the Training Dataset → The dataset (dataset) prepared earlier is used for fine-tuning. + - Sets Maximum Sequence Length → Defines max_seq_length, ensuring model input size is within the supported limit. + - Uses Data Collator for Batching → DataCollatorForSeq2Seq dynamically pads and tokenizes text data. + - Enables Multi-Processing (dataset_num_proc = 2) → Uses two parallel processes for faster data loading. + - Packing (packing = False) → Disables sequence packing, which can speed up training for shorter sequences. + + ```python + trainer = SFTTrainer( + model = model, + tokenizer = tokenizer, + train_dataset = dataset, + dataset_text_field = "instruction", + max_seq_length = max_seq_length, + data_collator = DataCollatorForSeq2Seq(tokenizer = tokenizer), + dataset_num_proc = 2, + packing = False, + ``` + +3. Define the training hyperparameters. + + The values are: + + - Batch Size (per_device_train_batch_size = 2) → Uses a small batch size to fit within GPU memory. + - Gradient Accumulation (gradient_accumulation_steps = 4) → Accumulates gradients over 4 steps before updating model weights. + - Warmup Steps (warmup_steps = 5) → Gradually increases the learning rate in the initial steps to stabilize training. + - Training Steps (max_steps = 60) → Runs for 60 optimization steps (adjustable for full training). + - Learning Rate (learning_rate = 2e-4) → Sets a moderate learning rate for stable fine-tuning. + - Mixed Precision (fp16 or bf16) → Uses bfloat16 if supported; otherwise, falls back to fp16 for efficient computation. + - Logging (logging_steps = 1) → Logs training progress every step. + - Optimizer (optim = "adamw_8bit") → Uses adamw_8bit, which is a memory-efficient optimizer. + - Weight Decay (weight_decay = 0.01) → Adds regularization to prevent overfitting. + - Learning Rate Scheduler (lr_scheduler_type = "linear") → Linearly decays the learning rate over time. + - Random Seed (seed = 3407) → Ensures reproducibility of training results. + - Output Directory (output_dir = "outputs") → Saves the trained model checkpoints in "outputs" folder. + + ```python + args = TrainingArguments( + per_device_train_batch_size = 2, + gradient_accumulation_steps = 4, + warmup_steps = 5, + max_steps = 60, + learning_rate = 2e-4, + fp16 = not is_bfloat16_supported(), + bf16 = is_bfloat16_supported(), + logging_steps = 1, + optim = "adamw_8bit", + weight_decay = 0.01, + lr_scheduler_type = "linear", + seed = 3407, + output_dir = "outputs", + ) + ``` + + +4. Modify the training approach so that the model learns to focus only on responses rather than both instructions and responses. + + The code loads the `train_on_responses_only` function from Unsloth’s chat templates. + + ```python + from unsloth.chat_templates import train_on_responses_only + ``` + + Apply the `train_on_responses_only` to the trainer. This modified the trainer behavior so that instead of training the model on full conversations, it now only learns from the assistant's responses. + + ```python + trainer = train_on_responses_only( + trainer, + instruction_part = "<|start_header_id|>user<|end_header_id|>\n\n", + response_part = "<|start_header_id|>assistant<|end_header_id|>\n\n", + ) + ``` + + +5. Inspect how the dataset has been tokenized and prepared for fine-tuning. + + It checks how input sequences (prompts) and labels (expected model outputs) are formatted. + + Decode a sample training input using the steps: + + - Extracts the tokenized input sequence from the dataset (trainer.train_dataset[5]["input_ids"]). + - Decodes it back into human-readable text using the tokenizer. + - This helps verify how instructions and responses were tokenized. + + ```python + tokenizer.decode(trainer.train_dataset[5]["input_ids"]) + space = tokenizer(" ", add_special_tokens = False).input_ids[0] + tokenizer.decode([space if x == -100 else x for x in trainer.train_dataset[5]["labels"]]) + ``` + +6. Train the model by initiating the training process using the trainer object. + + The trainer has been configured with model, dataset, optimizer, and training parameters: + + - Create an account in [Weights & Biases](https://wandb.ai/) + - Logging into [Weights & Biases](https://wandb.ai/) and [W&B server locally](https://wandb.me/wandb-server) + - You can locate your [API key](https://wandb.ai/authorize) in your browser at this link + - Paste an API key from your profile and press enter + + ```python + trainer_stats = trainer.train() + ``` \ No newline at end of file diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-6.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-6.md new file mode 100644 index 0000000000..eed4db2171 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-6.md @@ -0,0 +1,99 @@ +--- +title: Run LLM inference +weight: 8 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +This section runs LLM inference using the fine-tuned model. + +1. Import the chat template suitable for Llama 3.1 and ensure the prompts are suitable for inference. + + ```python + from unsloth.chat_templates import get_chat_template + ``` + +2. Apply the chat template to the tokenizer. + + This code: + - Updates the tokenizer with the Llama 3.1 chat template. + - Ensures the input messages are formatted according to Llama 3.1's expected structure. + + ```python + tokenizer = get_chat_template( + tokenizer, + chat_template="llama-3.1", + ) + ``` + +3. Enable faster inference. + + Use the command below to: + - Optimize the model for low-latency inference. + - Use Unsloth's performance improvements to speed up text generation.checkpoints in "outputs" folder. + + ```python + FastLanguageModel.for_inference(model) + ``` + +4. Define the input conversation in a structured format. + + ```python + messages = [ + {"i have a question about cancelling order {{Order Number}}"}, + ] + ``` + +5. Tokenize the input messages using the parameters. + + The code performs the following tasks: + - Converts the messages into tokens. + - The apply_chat_template() function ensures the model receives the correct chat format. + - tokenize=True: Converts text into numerical token IDs. + - add_generation_prompt=True: Ensures the assistant's response is expected. + - return_tensors="pt": Converts input into PyTorch tensors. + - .to("cuda"): Moves data to GPU for faster processing. + + ```python + inputs = tokenizer.apply_chat_template( + messages, + tokenize=True, + add_generation_prompt=True, # Must add for generation + return_tensors="pt", + ).to("cuda") + ``` + +6. Generate the model output based on the input. + + The parameters are: + - max_new_tokens=64: Limits output length to 64 tokens. + - use_cache=True: Speeds up generation by caching intermediate results. + - temperature=1.5: Increases randomness in output (higher value = more diverse text). + - min_p=0.1: Controls token probability threshold (avoids unlikely tokens). + + ```python + outputs = model.generate(input_ids=inputs, max_new_tokens=64, use_cache=True, temperature=1.5, min_p=0.1) + ``` + +7. Decode the generated output by converting the tokenized output back into human-readable text. + + ```python + tokenizer.batch_decode(outputs) + ``` + +8. Save the LoRA model (including its LoRA weights) to a local directory. + + ```python + model.save_pretrained("finetune_webbot") + ``` + +9. Save the tokenizer configuration into the `finetune_webbot` directory. + + ```python + tokenizer.save_pretrained("finetune_webbot") + ``` + +After saving the fine-tuned model, you can integrate it into your web application for real-time inference. + +Load the model and tokenizer, deploy them using an API such as FastAPI or Flask, and serve responses based on user inputs. This enables seamless AI-powered interactions in your application. \ No newline at end of file diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-7.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-7.md new file mode 100644 index 0000000000..da98c44f65 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-7.md @@ -0,0 +1,109 @@ +--- +title: Mobile Platform for Fine Tuning Large Language Model +weight: 9 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Development environment +You will learn to build the ExecuTorch runtime for fine-tuning models using KleidiAI, create JNI libraries for an mobile application, and integrate these libraries into the application. + +The first step is to set up a development environment with the necessary software: +- Python 3.10 or later +- Git +- Java 17 JDK +- Latest Version of Android Studio +- Android NDK + +###### Installation of Android Studio and Android NDK +- Download and install the latest version of Android Studio +- Launch Android Studio and open the Settings dialog. +- Go to Languages & Frameworks > Android SDK. +- In the SDK Platforms tab, select Android 14.0 ("UpsideDownCake"). +- Install the required version of Android NDK by first setting up the Android command line tools. + +###### Install Java 17 JDK +- Open the [Java SE 17 Archive Downloads](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) Downloads page in your browser. +- Choose the appropriate version for your operating system. +- Downloads are available for macOS and Linux. + +###### Install Git and cmake + +For macOS use [Homebrew](https://brew.sh/): + +``` bash +brew install git cmake +``` + +For Linux, use the package manager for your distribution: + +``` bash +sudo apt install git-all cmake +``` + +###### Install Python 3.10 + +For macOS: + +``` bash +brew install python@3.10 +``` + +For Linux: + +``` bash +sudo apt update +sudo apt install software-properties-common -y +sudo add-apt-repository ppa:deadsnakes/ppa +sudo apt install Python3.10 python3.10-venv +``` + + +###### Setup the [Executorch](https://pytorch.org/executorch/stable/intro-overview.html) Environments +For mobile device execution, [ExecuTorch](https://pytorch.org/executorch/stable/intro-overview.html) is required. It enables efficient on-device model deployment and execution + +- Python virtual environment creation + +```bash +python3.10 -m venv executorch +source executorch/bin/activate +``` + +The prompt of your terminal has `executorch` as a prefix to indicate the virtual environment is active. + +- Conda virtual environment creation + +Install Miniconda on your development machine by following the [Installing conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) instructions. + +Once `conda` is installed, create the environment: + +```bash +conda create -yn executorch python=3.10.0 +conda activate executorch +``` + +###### Clone ExecuTorch and install the required dependencies + +From within the conda environment, run the commands below to download the ExecuTorch repository and install the required packages: + +- You need to download Executorch from this [GitHub repository](https://github.com/pytorch/executorch/tree/main) +- Download the executorch.aar file from [executorch.aar](https://ossci-android.s3.us-west-1.amazonaws.com/executorch/release/executorch-241002/executorch.aar ) +- Add a libs folder in this path \executorch-main\executorch-main\examples\demo-apps\android\LlamaDemo\app\libs and add executorch.aar + +``` bash +git submodule sync +git submodule update --init +./install_requirements.sh +./install_requirements.sh --pybind xnnpack +./examples/models/llama/install_requirements.sh +``` + +###### Mobile Device Setup +- Enable the mobile device in [Android Studio](https://support.google.com/android/community-guide/273205728/how-to-enable-developer-options-on-android-pixels-6-secret-android-tips?hl=en) +- On the Android phone, enable Developer Options + - First, navigate to Settings > About Phone. + - At the bottom, locate Build Number and tap it seven times. A message will appear confirming that you are now a developer.(if only it were that easy to become one XD) + - Access Developer Options by navigating to Settings > System > Developer Options. + - You will see a large number of options, I repeat: DO NOT TOUCH ANYTHING YOU DO NOT KNOW. + - Enable USB Debugging to connect your mobile device to Android Studio. diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-8.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-8.md new file mode 100644 index 0000000000..da1653a6b4 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-8.md @@ -0,0 +1,53 @@ +--- +title: Fine Tune Large Language Model and Quantization +weight: 10 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +#### Llama Model +Llama is a family of large language models designed for high-performance language processing tasks, trained using publicly available data. When fine-tuned, Llama-based models can be optimized for specific applications, enhancing their ability to generate accurate and context-aware responses. Fine-tuning enables the model to adapt to domain-specific data, improving performance in tasks such as: + +- Language translation – Enhancing fluency and contextual accuracy. +- Question answering – Providing precise and relevant responses. +- Text summarization – Extracting key insights while maintaining coherence. + +Fine-tuned LLaMA models are also highly effective in generating human-like text, making them valuable for: + +- Chatbots – Enabling intelligent and context-aware interactions. +- Virtual assistants – Enhancing responsiveness and personalization. +- Creative writing – Generating compelling and structured narratives. + +By fine-tuning Llama based models, their adaptability and relevance can be significantly improved, allowing seamless integration into specialized AI applications.Please note that the models are subject to the [acceptable use policy](https://github.com/facebookresearch/llama/blob/main/USE_POLICY.md) and [this responsible use guide](https://ai.meta.com/static-resource/responsible-use-guide/). + +#### Results + +Since LLaMA 2 and LLaMA 3 models require at least 4-bit quantization to accommodate the memory constraints of certain smartphones + +#### Quantization + +To optimize models for smartphone memory constraints, 4-bit groupwise per-token dynamic quantization can be applied to all linear layers. In this approach: + +- Dynamic quantization is used for activations, where quantization parameters are computed at runtime based on the min/max range. +- Static quantization is applied to weights, which are per-channel groupwise quantized using 4-bit signed integers. + +This method ensures efficient memory usage while maintaining model performance on resource-constrained devices. + +For further information, refer to [torchao: PyTorch Architecture Optimization](https://github.com/pytorch-labs/ao/). + +The table below evaluates WikiText perplexity using [LM Eval](https://github.com/EleutherAI/lm-evaluation-harness). + +The results are for two different groupsizes, with max_seq_len 2048, and 1000 samples: + +|Model | Baseline (FP32) | Groupwise 4-bit (128) | Groupwise 4-bit (256) +|--------|-----------------| ---------------------- | --------------- +|Llama 2 7B | 9.2 | 10.2 | 10.7 +|Llama 3 8B | 7.9 | 9.4 | 9.7 + +Note that groupsize less than 128 was not enabled in this example, since the model was still too large. This is because current efforts have focused on enabling FP32, and support for FP16 is under way. + +What this implies for model size is: + +1. Embedding table is in FP32. +2. Quantized weights scales are FP32. \ No newline at end of file diff --git a/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-9.md b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-9.md new file mode 100644 index 0000000000..b8c0718a02 --- /dev/null +++ b/content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-9.md @@ -0,0 +1,34 @@ +--- +title: Prepared the Fine Tune Large Language Model for ExecuTorch and Mobile Deployment +weight: 11 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +#### Fine Tune Model Preparation + +- From the [Huggingface](https://huggingface.co/) need to apply for Repo access [Meta's Llama 3.2 language models](https://huggingface.co/meta-llama/Llama-3.2-1B). +- Download params.json and tokenizer.model from [Llama website](https://www.llama.com/llama-downloads/) or [Hugging Face](https://huggingface.co/meta-llama/Llama-3.2-1B). +- After fine-tuning the model, export the adapter_model.safetensors file locally and convert it to the adapter_model.pth format to .pte format. + +```python + python -m examples.models.llama.export_llama \ + --checkpoint \ + -p \ + -kv \ + --use_sdpa_with_kv_cache \ + -X \ + -qmode 8da4w \ + --group_size 128 \ + -d fp32 \ + --metadata '{"get_bos_id":128000, "get_eos_ids":[128009, 128001]}' \ + --embedding-quantize 4,32 \ + --output_name="llama3_kv_sdpa_xnn_qe_4_32.pte" +``` + +- Build the Llama Runner binary for [Android](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/build-llama3-chat-android-app-using-executorch-and-xnnpack/5-run-benchmark-on-android/). +- Build and Run [Android](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/build-llama3-chat-android-app-using-executorch-and-xnnpack/6-build-android-chat-app/). +- Open Android Studio and choose "Open an existing Android Studio project" to navigate to examples/demo-apps/android/LlamaDemo and Press Run (^R) to build and launch the app on your phone. +- Tap the Settings widget to select a model, configure its parameters, and set any prompts. +- After choosing the model, tokenizer, and model type, click "Load Model" to load it into the app and return to the main Chat activity. \ No newline at end of file diff --git a/content/learning-paths/cross-platform/loop-reflowing/_index.md b/content/learning-paths/cross-platform/loop-reflowing/_index.md index fc8d23fc51..291a818b9f 100644 --- a/content/learning-paths/cross-platform/loop-reflowing/_index.md +++ b/content/learning-paths/cross-platform/loop-reflowing/_index.md @@ -11,7 +11,7 @@ learning_objectives: prerequisites: - An Arm computer running Linux and a recent version of Clang or the GNU compiler (gcc) installed. -author_primary: Konstantinos Margaritis +author: Konstantinos Margaritis ### Tags skilllevels: Advanced @@ -23,6 +23,8 @@ tools_software_languages: - GCC - Clang - Coding + - Runbook + operatingsystems: - Linux shared_path: true @@ -32,6 +34,26 @@ shared_between: - mobile-graphics-and-gaming +further_reading: + - resource: + title: An update on GNU performance + link: https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/update-on-gnu-performance + type: blog + - resource: + title: Auto-Vectorization in LLVM + link: https://llvm.org/docs/Vectorizers.html + type: website + - resource: + title: GCC Autovectorization + link: https://hpac.cs.umu.se/teaching/sem-accg-16/slides/08.Schmitz-GGC_Autovec.pdf + type: documentation + - resource: + title: Auto-vectorization in GCC + link: https://gcc.gnu.org/projects/tree-ssa/vectorization.html + type: website + + + ### FIXED, DO NOT MODIFY # ================================================================================ weight: 1 # _index.md always has weight of 1 to order correctly diff --git a/content/learning-paths/cross-platform/loop-reflowing/_next-steps.md b/content/learning-paths/cross-platform/loop-reflowing/_next-steps.md index 0363f88eda..c3db0de5a2 100644 --- a/content/learning-paths/cross-platform/loop-reflowing/_next-steps.md +++ b/content/learning-paths/cross-platform/loop-reflowing/_next-steps.md @@ -1,31 +1,8 @@ --- -next_step_guidance: You now have a good understanding of Autovectorization, when to use it and how. - -recommended_path: /learning-paths/servers-and-cloud-computing/top-down-n1/ - -further_reading: - - resource: - title: An update on GNU performance - link: https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/update-on-gnu-performance - type: blog - - resource: - title: Auto-Vectorization in LLVM - link: https://llvm.org/docs/Vectorizers.html - type: website - - resource: - title: GCC Autovectorization - link: https://hpac.cs.umu.se/teaching/sem-accg-16/slides/08.Schmitz-GGC_Autovec.pdf - type: documentation - - resource: - title: Auto-vectorization in GCC - link: https://gcc.gnu.org/projects/tree-ssa/vectorization.html - type: website - - # ================================================================================ -# FIXED, DO NOT MODIFY +# FIXED, DO NOT MODIFY THIS FILE # ================================================================================ -weight: 21 # set to always be larger than the content in this path, and one more than 'review' -title: "Next Steps" # Always the same -layout: "learningpathall" # All files under learning paths have this same wrapper +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. --- diff --git a/content/learning-paths/cross-platform/matrix/1-foundations.md b/content/learning-paths/cross-platform/matrix/1-foundations.md index 46988b1c90..edf9148289 100644 --- a/content/learning-paths/cross-platform/matrix/1-foundations.md +++ b/content/learning-paths/cross-platform/matrix/1-foundations.md @@ -32,6 +32,16 @@ Emacs](https://www.gnu.org/software/emacs/), or [Sublime Text](https://www.sublimetext.com/), which are also popular and they all support extensions that make C++ development easy. +## Source code + +In case you want to, you can [download the source code](https://gitlab.arm.com/learning-code-examples/code-examples/-/archive/main/code-examples-main.tar.gz?path=learning-paths/cross-platform/matrix) for this learning path. This will download a `.tar.gz` archive that you will need to expand: + +```BASH +tar xfz code-examples-main-learning-paths-cross-platform-matrix.tar.gz +mv code-examples-main-learning-paths-cross-platform-matrix code-examples +``` + +The source code for this learning path will be available in `code-examples/learning-paths/cross-platform/matrix/`. ## What are the differences between configuring the project and building the code? @@ -64,7 +74,7 @@ projects like [LLVM](https://www.llvm.org) or [Qt](https://www.qt.io/). Organizing the files in a project is important because it allows you to: -- Easily navigate the structure and find information. +- Easily navigate the structure and find information. - Organize information for the tools, such as compilers and linkers. - Make a distinction between information that is exported or installed, and what is only relevant for building the project. @@ -117,7 +127,18 @@ There is nothing like creating the canonical `Hello, World!` application! Use your favorite text editor or IDE to create the file `src/howdy.cpp` and add the following content: -{{< include-code CPP "content/learning-paths/cross-platform/matrix/projects/chapter-1/src/howdy.cpp" >}} +```CPP +#include +#include + +using namespace std; + +int main(int argc, char *argv[]) { + cout << "Hello, World !\n"; + + return EXIT_SUCCESS; +} +``` ## Setup CMake @@ -226,21 +247,89 @@ library version. Add the `Matrix.h` header file, declaring the `Version` object and the `getVersion` function and save the file as `include/Matrix/Matrix.h`: -{{< include-code CPP "content/learning-paths/cross-platform/matrix/projects/chapter-1/include/Matrix/Matrix.h" >}} +```CPP +#pragma once + +namespace MatComp { + +/// The Version struct is used to carry around the major, minor and patch level. +struct Version { + unsigned major; //< The major version level. + unsigned minor; //< The minor version level. + unsigned patch; //< The patch level. +}; + +/// Get the Matrix library version information. +const Version &getVersion(); + +} // namespace MatComp +``` With those declarations in place, create and add the following lines to `lib/Matrix/Matrix.cpp` to provide an implementation to `getVersion`: -{{< include-code CPP "content/learning-paths/cross-platform/matrix/projects/chapter-1/lib/Matrix/Matrix.cpp" >}} +```CPP +#include "Matrix/Matrix.h" + +namespace { +const MatComp::Version version = {.major = 0, .minor = 1, .patch = 0}; +} + +namespace MatComp { + +const Version &getVersion() { return version; } + +} // namespace MatComp +``` Now, you can create a program that will make use of the ``getVersion`` function. Use your editor to save the code below as `src/getVersion.cpp`: -{{< include-code CPP "content/learning-paths/cross-platform/matrix/projects/chapter-1/src/getVersion.cpp" >}} +```CPP +#include "Matrix/Matrix.h" + +#include +#include + +using namespace std; +using namespace MatComp; + +int main(int argc, char *argv[]) { + const Version &version = getVersion(); + cout << "Using Matrix version: " << version.major << '.' << version.minor + << '.' << version.patch << '\n'; + + return EXIT_SUCCESS; +} +``` Finally, add the instructions below in the top-level `CMakeLists.txt`: -{{< include-code TXT "content/learning-paths/cross-platform/matrix/projects/chapter-1/CMakeLists.txt" >}} +```TXT +# Set the minimum CMake version we require. In our case, it is intentionnally +# very old as we are not making use of recent CMake features. +cmake_minimum_required(VERSION 3.5) + +# Give a name to our project ('Matrix') and inform CMake about the language used. +project(Matrix LANGUAGES CXX) + +# Add 'howdy', a standalone executable with no dependency to any library that +# has to be built from the sources in 'src/howdy.cpp'. +add_executable(howdy src/howdy.cpp) + +# Add our 'Matrix' library, that is built as a static library, from source file +# 'lib/Matrix/Matrix.cpp'. CMake is instruction that C++17 is used, and that +# the library headers can be found in ${CMAKE_SOURCE_DIR}/include. +add_library(Matrix STATIC lib/Matrix/Matrix.cpp) +target_compile_features(Matrix PUBLIC cxx_std_17) +target_include_directories(Matrix + PUBLIC ${CMAKE_SOURCE_DIR}/include) + +# Add 'matrix-getVersion', an executable that depends on the Matrix library, +# that has to be built from source file 'src/getVersion.cpp'. +add_executable(matrix-getVersion src/getVersion.cpp) +target_link_libraries(matrix-getVersion Matrix) +``` The `add_library` instructs CMake how to build the Matrix library. The `target_include_directories` specifies where the Matrix library header is located, and the `target_compile_features` specifies that C++17 is the version @@ -301,3 +390,7 @@ For example, Visual Studio Code can work seamlessly with CMake with plugins, and generate project files for several popular IDEs, such as Xcode, Sublime Text, Eclipse, CodeBlocks, and CodeLite. You can run `cmake --help` to get a list of supported *generators* (in CMake terminology) for your platform. + +You can refer to this chapter source code in +`code-examples/learning-paths/cross-platform/matrix/chapter-1` in the archive that +you have downloaded earlier. \ No newline at end of file diff --git a/content/learning-paths/cross-platform/matrix/2-testing.md b/content/learning-paths/cross-platform/matrix/2-testing.md index 31ed872bab..996d8a31bc 100644 --- a/content/learning-paths/cross-platform/matrix/2-testing.md +++ b/content/learning-paths/cross-platform/matrix/2-testing.md @@ -17,7 +17,7 @@ benefits: - They offer an opportunity to catch regressions. - They demonstrate how to use the library in practice. - They create opportunities for those new to the project to easily check their patches, and verify that the introduction of the new code has not created unintended negative changes. - + You will notice that setting up testing precedes library code development. There are many unit testing frameworks available, and C++ is not short of them. See this [wikipedia @@ -38,7 +38,38 @@ all external dependencies. It will be used by the main `CMakeLists.txt`. Create the file `external/CMakeLists.txt` with the following content: -{{< include-code TXT "content/learning-paths/cross-platform/matrix/projects/chapter-2/external/CMakeLists.txt" >}} +```TXT +cmake_minimum_required(VERSION 3.6) + +project(external LANGUAGES CXX) + +# Get the functionality to configure, build and install external project +# from CMake module 'ExternalProject'. +include(ExternalProject) + +# Use the same compiler, build type and instalation directory than those +# from our caller. +set(EXTERNAL_PROJECT_CMAKE_ARGS + -DCMAKE_CXX_COMPILER:PATH=${CMAKE_CXX_COMPILER} + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}) + +# Add 'googletext' as an external project, that will be cloned with git, +# from the official googletest repository, at version v1.14. +# We ask for a shallow clone, which is a clone with only the revision +# we are interested in rather than googletest's full history --- +# this makes the clone much faster (less data traffic), and uses much +# less disk space ; furthermore, as we are not developping googletest +# but just merely using it, we don't need thre full history. It will be +# built and installed with our build configuration passed with CMAKE_ARGS. +ExternalProject_Add(googletest + PREFIX "external" + GIT_REPOSITORY "https://github.com/google/googletest" + GIT_TAG "v1.14.0" + GIT_SHALLOW TRUE + CMAKE_ARGS ${EXTERNAL_PROJECT_CMAKE_ARGS} +) +``` You might notice a new CMake feature: variables. Variables start with the `$` character and have a name inserted between curly braces. A CMake variable can be set by the CMake itself, or by the user, and they can be modified or used as they are. @@ -235,11 +266,33 @@ several files inside the `tests/` directory. Create the top-level test in `tests/main.cpp` and paste the following code into the file: -{{< include-code CPP "content/learning-paths/cross-platform/matrix/projects/chapter-2/tests/main.cpp" >}} +```CPP +#include "gtest/gtest.h" + +using namespace testing; + +int main(int argc, char **argv) { + InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} +``` Create `tests/Version.cpp` and add the `getVersion` unit test into the file: -{{< include-code CPP "content/learning-paths/cross-platform/matrix/projects/chapter-2/tests/Version.cpp" >}} +```CPP +#include "Matrix/Matrix.h" + +#include "gtest/gtest.h" + +using namespace MatComp; + +TEST(Matrix, getVersion) { + const Version &version = getVersion(); + EXPECT_EQ(version.major, 0); + EXPECT_EQ(version.minor, 1); + EXPECT_EQ(version.patch, 0); +} +``` This test invokes `getVersion` and checks that the `major`, `minor` and `patch` levels match the expected values. @@ -325,3 +378,7 @@ Matrix/ CMake makes it easy to use GoogleTest as an external project. Adding unit tests as you go is now easy. You have created the unit testing environment for your Matrix library and added a test. The infrastructure is now in place to implement the core of the Matrix processing library. + +You can refer to this chapter source code in +`code-examples/learning-paths/cross-platform/matrix/chapter-2` in the archive that +you have downloaded earlier. \ No newline at end of file diff --git a/content/learning-paths/cross-platform/matrix/3-code-1.md b/content/learning-paths/cross-platform/matrix/3-code-1.md index 0f23f298e4..e812c98845 100644 --- a/content/learning-paths/cross-platform/matrix/3-code-1.md +++ b/content/learning-paths/cross-platform/matrix/3-code-1.md @@ -23,12 +23,13 @@ In the Matrix processing library, you implement two types of checks: The idea here is to make the program fail in a noticeable way. Of course, in a real world application, the error should be caught and dealt with by the application, if it can. Error handling, and especially recovering from errors, can be a complex topic. -At the top of file `include/Matrix/Matrix.h`, include `` to get the C-style assertions declarations for checks in `Debug` mode only: +At the top of file `include/Matrix/Matrix.h`, include `` to get the C-style assertions declarations for checks in `Debug` mode only, as well as `` which provides standard C declaration like `size_t`: ```CPP #pragma once #include +#include namespace MatComp { ``` @@ -44,7 +45,7 @@ const Version &getVersion(); /// and the EXIT_FAILURE error code. It will also print the file name (\p /// fileName) and line number (\p lineNumber) that caused that application to /// exit. -[[noreturn]] void die(const char *fileName, std::size_t lineNumber, +[[noreturn]] void die(const char *fileName, size_t lineNumber, const char *reason); ``` @@ -62,7 +63,28 @@ Open `lib/Matrix/Matrix.cpp` and include at the top of the file: Add `die`'s body as shown below: -{{< include-code CPP "content/learning-paths/cross-platform/matrix/projects/chapter-3/lib/Matrix/Matrix.cpp" >}} +```CPP +#include "Matrix/Matrix.h" + +#include +#include + +namespace { +const MatComp::Version version = {.major = 0, .minor = 1, .patch = 0}; +} + +namespace MatComp { + +const Version &getVersion() { return version; } + +void die(const char *fileName, size_t lineNumber, const char *reason) { + std::cerr << "Fatal: " << reason << " from " << fileName << ':' + << lineNumber << '\n'; + exit(EXIT_FAILURE); +} + +} // namespace MatComp +``` At this stage, the project should still build and compile, try it to confirm: @@ -88,10 +110,11 @@ The Matrix data structure has the following private data members: Modern C++ offers constructs in the language to deal safely with memory; you will use `std::unique_ptr` which guaranties that the Matrix class will be safe from a whole range of memory management errors. Add the following includes at the top of `include/Matrix/Matrix.h`, right under -the '' include: +the `` include: ```CPP #include +#include #include #include #include @@ -208,12 +231,6 @@ TEST(Matrix, defaultConstruct) { TEST(Matrix, booleanConversion) { EXPECT_FALSE(Matrix()); EXPECT_FALSE(Matrix()); - - EXPECT_TRUE(Matrix(1, 1)); - EXPECT_TRUE(Matrix(1, 1)); - - EXPECT_TRUE(Matrix(1, 1, 1)); - EXPECT_TRUE(Matrix(1, 1, 2.0)); } ``` @@ -299,9 +316,9 @@ The tests should still pass, check for yourself. The next step is to be able to construct valid matrices, so add this constructor to the public section of class `Matrix` in `include/Matrix/Matrix.h`: ```CPP - /// Construct a \p numRows x \p numColumns uninitialized Matrix - Matrix(size_t numRows, size_t numColumns) - : numRows(numRows), numColumns(numColumns), data() { + /// Construct a \p numRows x \p numCols uninitialized Matrix + Matrix(size_t numRows, size_t numCols) + : numRows(numRows), numColumns(numCmns), data() { allocate(getNumElements()); } ``` @@ -327,6 +344,17 @@ TEST(Matrix, uninitializedConstruct) { ``` This constructs a valid `Matrix` if it contains elements), and the `uninitializedConstruct` test checks that two valid matrices of different types and dimensions can be constructed. +You should also update the `booleanConversion` test in this file to check for boolean conversion for valid matrices so it now looks like: + +```CPP +TEST(Matrix, booleanConversion) { + EXPECT_FALSE(Matrix()); + EXPECT_FALSE(Matrix()); + + EXPECT_TRUE(Matrix(1, 1)); + EXPECT_TRUE(Matrix(1, 1)); +} +``` Compile and test again, all should pass: @@ -353,6 +381,35 @@ ninja check [ PASSED ] 4 tests. ``` +Another constructor that is missing is one that will create and initialize matrices to a known value. Let's add it to `Matrix` in `include/Matrix/Matrix.h`: + +```CPP + /// Construct a \p numRows x \p numCols Matrix with all elements + /// initialized to value \p val. + Matrix(size_t numRows, size_t numCols, Ty val) : Matrix(numRows, numCols) { + allocate(getNumElements()); + for (size_t i = 0; i < getNumElements(); i++) + data[i] = val; + } +``` + +Add boolean conversion tests for this new constructor by modifying `booleanConversion` in `tests/Matrix.cpp` so it looks like: + +```CPP +TEST(Matrix, booleanConversion) { + EXPECT_FALSE(Matrix()); + EXPECT_FALSE(Matrix()); + + EXPECT_TRUE(Matrix(1, 1)); + EXPECT_TRUE(Matrix(1, 1)); + + EXPECT_TRUE(Matrix(1, 1, 1)); + EXPECT_TRUE(Matrix(1, 1, 2.0)); +} +``` + +You should be getting the pattern now: each new feature or method comes with tests. + The `Matrix` class is missing two important methods: - A *getter*, to read the matrix element at (row, col). - A *setter*, to modify the matrix element at (row, col). @@ -376,20 +433,6 @@ Add them now in the public section of `Matrix` in `include/Matrix/Matrix.h`: } ``` -Another constructor that is missing is one that will create and initialize matrices to a known value. Let's add it to `Matrix` in `include/Matrix/Matrix.h`: - -```CPP - /// Construct a \p numRows x \p numColumns Matrix with all elements - /// initialized to value \p val. - Matrix(size_t numRows, size_t numCols, Ty val) : Matrix(numRows, numCols) { - allocate(getNumElements()); - for (size_t i = 0; i < getNumElements(); i++) - data[i] = val; - } -``` - -You should be getting the pattern now. - Add tests for those 3 methods in `tests/Matrix.cpp`: ```CPP @@ -482,7 +525,7 @@ The C++ `std::initializer_list` enables users to provide a list of literal values (in row major order) to use to initialize the matrix with: ```CPP - /// Construct a \p numRows x \p numColumns Matrix with elements + /// Construct a \p numRows x \p numCols Matrix with elements /// initialized from the values from \p il in row-major order. Matrix(size_t numRows, size_t numCols, std::initializer_list il) : Matrix(numRows, numCols) { @@ -841,7 +884,7 @@ ninja check [----------] 16 tests from Matrix (0 ms total) [----------] Global test environment tear-down -[==========] 16 tests from 3 test suites ran. (0 ms total) +[==========] 16 tests from 1 test suite ran. (0 ms total) [ PASSED ] 16 tests. ``` @@ -920,6 +963,7 @@ Add these to the public section of `Matrix` in `include/Matrix/Matrix.h`: return false; return true; } + /// Returns true iff matrices do not compare equal. bool operator!=(const Matrix &rhs) const { return !(*this == rhs); } ``` @@ -1045,3 +1089,7 @@ After this rather long exercise, you have a minimalistic, yet fully-functional c Modern C++ enables you to express move and copy semantics, and to use smart pointers to make memory management easy. The compiler also catch a large number of type or misuse errors. With this core functionality in place, you have all you need to implement matrix operations in the next section. + +You can refer to this chapter source code in +`code-examples/learning-paths/cross-platform/matrix/chapter-3` in the archive that +you have downloaded earlier. diff --git a/content/learning-paths/cross-platform/matrix/4-code-2.md b/content/learning-paths/cross-platform/matrix/4-code-2.md index 56828683b7..9e6302feb5 100644 --- a/content/learning-paths/cross-platform/matrix/4-code-2.md +++ b/content/learning-paths/cross-platform/matrix/4-code-2.md @@ -92,7 +92,7 @@ makes them suitable for using in bigger algorithms and is a common pattern used One point worth mentioning is related to the `Abs` class: depending on the type used at instantiation, the compiler selects an optimized implementation for -unsigned types, and there is no need to compute the absolute value of an always +unsigned types, as there is no need to compute the absolute value of an always positive value. This optimization is transparent to users. Those operators are marked as `constexpr` so that the compiler can optimize the @@ -203,7 +203,7 @@ type traits (from ``) such as `max` to get the maximum value representable for a given type. As those tests have been added to a new source file, it needs to be known to the -build system, so add it now to the matrix-test target in `CMakeLists.txt`: +build system, so add it now to the `matrix-test` target in `CMakeLists.txt`: ```TXT add_executable(matrix-test tests/main.cpp @@ -292,7 +292,7 @@ First, create a `applyEltWiseUnaryOp` helper routine in the public section of operation as follows: ```CPP - /// Apply element wise unary scalar operator \p uOp to each element. + /// Apply element wise unary scalar operator \p op to each element. template