Skip to content

Commit

Permalink
Merge branch 'master' into omer/arm64-comp
Browse files Browse the repository at this point in the history
  • Loading branch information
omer-dayan committed Jan 7, 2025
2 parents 288a3c1 + a6cca02 commit 1c21bf8
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
15 changes: 8 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
g++ \
Expand All @@ -8,15 +8,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

RUN pip install \
cpplint==1.5.4
cpplint==1.5.4 --break-system-packages

RUN mkdir -p /opt/toolchains && \
wget "https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/aarch64-linux-gnu/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz" && \
tar -xf gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz -C /opt/toolchains && \
mv /opt/toolchains/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu /opt/toolchains/aarch64-linux-gnu && \
rm -f gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
VERION=14.2.rel1 && \
wget "https://developer.arm.com/-/media/Files/downloads/gnu/$VERION/binrel/arm-gnu-toolchain-$VERION-$(uname -m)-aarch64-none-linux-gnu.tar.xz" && \
tar -xf arm-gnu-toolchain-$VERION-$(uname -m)-aarch64-none-linux-gnu.tar.xz -C /opt/toolchains && \
mv /opt/toolchains/arm-gnu-toolchain-$VERION-$(uname -m)-aarch64-none-linux-gnu /opt/toolchains/aarch64-none-linux-gnu && \
rm -f arm-gnu-toolchain-$VERION-$(uname -m)-aarch64-none-linux-gnu.tar.xz

ARG BAZEL=4.2.1
ARG BAZEL=6.4.0
RUN ARCH=$([ "$(uname -m)" = "aarch64" ] && echo "arm64" || uname -m); \
wget -O /usr/local/bin/bazel "https://github.com/bazelbuild/bazel/releases/download/$BAZEL/bazel-$BAZEL-linux-$ARCH" && \
chmod +x /usr/local/bin/bazel
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.PHONY: build build_aarch64 build_native test install
.PHONY: build build_aarch64 build_x86_64 test install

build_native:
build_x86_64:
make -C cpp clean && \
make -C cpp build && \
make -C py build
make -C cpp build ARCH=x86_64 && \
make -C py build ARCH=x86_64

build_aarch64:
make -C cpp clean && \
Expand All @@ -12,7 +12,7 @@ build_aarch64:

build:
make -C py clean && \
make build_native && \
make build_x86_64 && \
make build_aarch64

install: build
Expand Down
6 changes: 3 additions & 3 deletions cpp/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("//toolchain:rules.bzl", "runai_cc_configure_toolchain", "runai_cc_autoconf_impl_x86", "runai_cc_autoconf_impl_arm64")
load("//toolchain:rules.bzl", "runai_cc_configure_toolchain", "runai_cc_autoconf_impl_x86_64", "runai_cc_autoconf_impl_aarch64")

runai_cc_configure_toolchain("x86_64", runai_cc_autoconf_impl_x86)
runai_cc_configure_toolchain("aarch64", runai_cc_autoconf_impl_arm64)
runai_cc_configure_toolchain("x86_64", runai_cc_autoconf_impl_x86_64)
runai_cc_configure_toolchain("aarch64", runai_cc_autoconf_impl_aarch64)

new_local_repository(
name = "aws",
Expand Down
10 changes: 3 additions & 7 deletions cpp/toolchain/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ def runai_cc_autoconf_configurator(impl):
configure = True,
)

def runai_cc_autoconf_default_impl(ctx):
tools = runai_crosstool_tools("")
return cc_autoconf_impl(ctx, overriden_tools = tools)

def runai_cc_configure_toolchain(toolchain_name, impl = cc_autoconf_impl):
"""A C++ configuration rules that generate the crosstool file."""

Expand All @@ -99,10 +95,10 @@ def runai_cc_configure_toolchain(toolchain_name, impl = cc_autoconf_impl):
"@" + toolchain_name + "_toolchains//:all",
)

def runai_cc_autoconf_impl_x86(ctx):
def runai_cc_autoconf_impl_x86_64(ctx):
tools = runai_crosstool_tools("")
return cc_autoconf_impl(ctx, overriden_tools = tools)

def runai_cc_autoconf_impl_arm64(ctx):
tools = runai_crosstool_tools("aarch64-linux-gnu")
def runai_cc_autoconf_impl_aarch64(ctx):
tools = runai_crosstool_tools("aarch64-none-linux-gnu")
return cc_autoconf_impl(ctx, overriden_tools = tools)
1 change: 1 addition & 0 deletions cpp/utils/fd/fd.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <map>
#include <string>
#include <vector>
#include <cstdint>

namespace runai::llm::streamer::utils
{
Expand Down
1 change: 1 addition & 0 deletions cpp/utils/random/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <set>
#include <string>
#include <vector>
#include <cstdint>

#define DEFAULT_COUNT() (number(10, 100))

Expand Down
1 change: 1 addition & 0 deletions cpp/utils/temp/file/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <string>
#include <vector>
#include <cstdint>

#include "utils/random/random.h"

Expand Down

0 comments on commit 1c21bf8

Please sign in to comment.