Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfelder committed Jan 3, 2024
1 parent d27c11d commit 3cdce27
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build Windows

on:
push:
branches:
- fix/windows-build

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
ARCH_TYPE: native

jobs:
check-changed-files:
name: Check Changed Files
runs-on: ubuntu-22.04
outputs:
golang: ${{ steps.changed_files.outputs.golang }}
rust: ${{ steps.changed_files.outputs.rust }}
cpp_cuda: ${{ steps.changed_files.outputs.cpp_cuda }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Get all changed files
id: changed-files-yaml
uses: tj-actions/changed-files@v39
# https://github.com/tj-actions/changed-files#input_files_yaml_from_source_file
with:
files_yaml_from_source_file: .github/changed-files.yml
- name: Run Changed Files script
id: changed_files
# https://github.com/tj-actions/changed-files#outputs-
run: |
echo "golang=${{ steps.changed-files-yaml.outputs.golang_any_modified }}" >> "$GITHUB_OUTPUT"
echo "rust=${{ steps.changed-files-yaml.outputs.rust_any_modified }}" >> "$GITHUB_OUTPUT"
echo "cpp_cuda=${{ steps.changed-files-yaml.outputs.cpp_any_modified }}" >> "$GITHUB_OUTPUT"
build-rust-windows:
name: Build Rust on Windows
runs-on: windows-2022
needs: check-changed-files
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Download and Install Cuda
if: needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true'
uses: Jimver/[email protected]
with:
cuda: '12.0.0'
method: 'network'
# https://docs.nvidia.com/cuda/archive/12.0.0/cuda-installation-guide-microsoft-windows/index.html
sub-packages: '["cudart", "nvcc", "thrust", "visual_studio_integration"]'
- name: Build Rust Targets
working-directory: ./wrappers/rust
if: needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true'
env:
CUDA_PATH: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}
# Building from the root workspace will build all members of the workspace by default
run: cargo build --release --verbose

2 changes: 1 addition & 1 deletion icicle/appUtils/ntt/ntt.cu
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ namespace ntt {
// but it's a singleton that is supposed to be initialized once per program lifetime
if (!Domain<S>::twiddles) {
S omega = primitive_root;
for (int i = 0; i < S::TWO_ADICITY; i++)
for (int i = 0; i < S::CONFIG::omegas_count; i++)
omega = S::sqr(omega);
if (omega != S::one()) {
std::cerr << "Primitive root provided to the InitDomain function is not in the subgroup" << '\n';
Expand Down
1 change: 0 additions & 1 deletion icicle/primitives/field.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class Field
public:
static constexpr unsigned TLC = CONFIG::limbs_count;
static constexpr unsigned NBITS = CONFIG::modulus_bit_count;
static constexpr unsigned TWO_ADICITY = CONFIG::omegas_count;

static constexpr HOST_DEVICE_INLINE Field zero() { return Field{CONFIG::zero}; }

Expand Down

0 comments on commit 3cdce27

Please sign in to comment.