Skip to content
3 changes: 3 additions & 0 deletions .azure-pipelines/code-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ pr:
paths:
include:
- auto_round
- auto_round_extension
- setup.py
- requirements.txt
- requirements-cpu.txt
- requirements-lib.txt
- .azure-pipelines/code-scan.yml
- .azure-pipelines/scripts/codeScan

Expand Down
15 changes: 6 additions & 9 deletions .azure-pipelines/docker/Dockerfile.devel
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,20 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG UBUNTU_VER=22.04
FROM ubuntu:${UBUNTU_VER} as devel
ARG UBUNTU_VER=24.04
FROM ubuntu:${UBUNTU_VER}

# See http://bugs.python.org/issue19846
ENV LANG C.UTF-8

RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \
python3 \
python3-pip \
python3-dev \
python3-distutils \
python3.12-dev \
autoconf \
build-essential \
git \
libgl1-mesa-glx \
libglib2.0-0 \
libomp-dev \
numactl \
time \
wget \
Expand All @@ -45,9 +43,8 @@ RUN groupadd -g ${GROUP_ID} hostgroup && \

USER hostuser

RUN python -m pip install --no-cache-dir --upgrade pip
RUN python -m pip install --no-cache-dir setuptools

ENV PATH="/home/hostuser/.local/bin:$PATH"
RUN pip config set global.break-system-packages true
RUN pip list

WORKDIR /
Expand Down
9 changes: 4 additions & 5 deletions .azure-pipelines/docker/DockerfileCodeScan.devel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG UBUNTU_VER=22.04
ARG UBUNTU_VER=24.04
FROM ubuntu:${UBUNTU_VER} as devel

# See http://bugs.python.org/issue19846
Expand All @@ -24,8 +24,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \
aspell-en \
python3 \
python3-pip \
python3-dev \
python3-distutils \
autoconf \
build-essential \
wget
Expand All @@ -40,7 +38,8 @@ RUN groupadd -g ${GROUP_ID} hostgroup && \

USER hostuser

RUN python -m pip install --no-cache-dir pylint==2.12.1\
bandit
ENV PATH="/home/hostuser/.local/bin:$PATH"
RUN pip config set global.break-system-packages true
RUN python -m pip install --no-cache-dir pylint bandit

WORKDIR /
4 changes: 2 additions & 2 deletions .azure-pipelines/template/docker-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ steps:

- ${{ if eq(parameters.imageSource, 'pull') }}:
- script: |
docker pull vault.habana.ai/gaudi-docker/1.21.0/ubuntu22.04/habanalabs/pytorch-installer-2.6.0:latest
docker pull vault.habana.ai/gaudi-docker/1.22.0/ubuntu24.04/habanalabs/pytorch-installer-2.7.1:latest
displayName: "Pull habana docker image"

- script: |
Expand All @@ -95,7 +95,7 @@ steps:
else
docker run -dit --disable-content-trust --privileged --name=${{ parameters.containerName }} --shm-size="2g" \
--runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --net=host --ipc=host \
-v ${BUILD_SOURCESDIRECTORY}:/auto-round vault.habana.ai/gaudi-docker/1.21.0/ubuntu22.04/habanalabs/pytorch-installer-2.6.0:latest
-v ${BUILD_SOURCESDIRECTORY}:/auto-round vault.habana.ai/gaudi-docker/1.22.0/ubuntu24.04/habanalabs/pytorch-installer-2.7.1:latest
docker exec ${{ parameters.containerName }} bash -c "ln -sf \$(which python3) /usr/bin/python"
fi
echo "Show the container list after docker run ... "
Expand Down
9 changes: 5 additions & 4 deletions .azure-pipelines/template/ut-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
parameters:
dockerConfigName: ${{ parameters.dockerConfigName }}
repoName: "auto-round"
repoTag: "py310"
repoTag: "py312"
dockerFileName: "Dockerfile"
containerName: ${{ parameters.utContainerName }}
repo: ${{ parameters.repo }}
Expand All @@ -35,9 +35,10 @@ steps:
- ${{ if eq(parameters.imageSource, 'build') }}:
- script: |
docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \
&& pip install torch==2.7.1 torchvision --index-url https://download.pytorch.org/whl/cpu \
&& pip install intel-extension-for-pytorch==2.7.0 \
&& pip install .[cpu] \
&& pip install torch==2.8.0 torchvision --index-url https://download.pytorch.org/whl/cpu \
&& pip install intel-extension-for-pytorch==2.8.0 \
&& pip install -r requirements-cpu.txt \
&& pip install . \
&& pip list"
displayName: "Env Setup"

Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/unit-test-hpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pr:
paths:
include:
- auto_round
- auto_round_extension
- test/test*hpu*'
- setup.py
- requirements-lib.txt
Expand Down
4 changes: 2 additions & 2 deletions auto_round/export/export_to_itrex/model_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ def forward(self, input):
self.weight = weight
input = input.type(self.weight.dtype)
logger.debug(f"Calculating {self}")
return F.linear(input, self.weight, self.bias)
return F.linear(input, self.weight, self.bias) # pylint: disable=E1102
else:
input = input.type(weight.dtype)
return F.linear(input, weight, self.bias)
return F.linear(input, weight, self.bias) # pylint: disable=E1102

def extra_repr(self) -> str:
tmp_str = "in_features={}, out_features={}, bits={}, group_size={}, bias={}".format(
Expand Down
2 changes: 1 addition & 1 deletion auto_round/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def linear_forward(self, x, weight, bias):
Returns:
torch.Tensor: Output tensor after applying the linear layer.
"""
return F.linear(x, weight, bias)
return F.linear(x, weight, bias) # pylint: disable=E1102

def all_reduce_linear_forward(self, x, weight, bias):
"""Performs the forward pass for a linear layer.
Expand Down
Loading