Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc update jan02 #40

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/pr_storing_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Simple workflow for deploying static content to GitHub Pages
name: Store generated docs to artifact

on:
# Runs on main branch PRs
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
id-token: write
pull-requests: write

jobs:
# Single deploy job since we're just deploying
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
python -m pip install wget awscli
python -m pip install pytest
python -m pip install neuronx-cc==2.*
python -m pip install Sphinx
- name: Generate Docs
run: |
sphinx-build doc _apidoc
- name: Upload Page Artifacts
uses: actions/upload-artifact@v4
with:
name: upload-pr-doc
path: _apidoc
retention-days: 7
- name: Comment Artifact Link
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const workflow_id = context.runId
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Please download and review the generated API doc at https://github.com/aws-neuron/nki-samples/actions/runs/' + workflow_id
})
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ enabling bare-metal access to the chip for full control.
## Documentation
The latest NKI documentation can be found on the AWS Documentation site, [here](https://awsdocs-neuron.readthedocs-hosted.com/en/latest/general/nki/).
Documentation for NKI kernels are both inline (docstring) and available on the documentation site's
[kernel API reference page](https://awsdocs-neuron.readthedocs-hosted.com/en/latest/general/nki/api/nki.kernels.html).
[kernel API reference page](https://aws-neuron.github.io/nki-samples/).

## Repository Structure

Expand Down
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## View Documentation

The documentation of this repo is built with Github Action, and is available at `<insert_link_when_deployed>`
The documentation of this repo is built with Github Action, and is available at https://aws-neuron.github.io/nki-samples/

## Build Documentation Locally

Expand Down
6 changes: 3 additions & 3 deletions doc/nki_samples.reference.allocated_fused_linear.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Allocated Attention
Allocated Fused Linear
=======================

.. currentmodule:: nki_samples.reference.allocated_fused_linear

This file hosts the high-performance kernel that computes `RMSNorm(hidden) @ wQKV`,
this implementation uses
This file hosts the high-performance kernel that computes `RMSNorm(hidden) @ wQKV`.
This implementation uses
the `direct allocation API <https://awsdocs-neuron.readthedocs-hosted.com/en/latest/general/nki/nki_direct_allocation_guide.html>` to achieve better performance.

.. autosummary::
Expand Down
Loading