Skip to content

Commit

Permalink
fixes for ci and removing macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev committed Aug 23, 2024
1 parent 1ad623f commit fc4f2af
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 160 deletions.
54 changes: 0 additions & 54 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -658,60 +658,6 @@ jobs:
displayName: 'Upload conformance tests artifacts'
continueOnError: true

- job: 'macOSMakeClang'
timeoutInMinutes: 0
variables:
release.dir: '__release_mac_clang'
platform.type : 'mac32e'
pool:
vmImage: 'macos-12'
steps:
- script: |
brew install dos2unix tree
conda create -n ci-env -q -y -c conda-forge python=3.10
source /usr/local/miniconda/etc/profile.d/conda.sh
conda activate ci-env
pip install -q cpufeature
displayName: 'brew and conda install'
- script: |
.ci/env/apt.sh mkl
displayName: 'mkl installation'
- script: |
source /usr/local/miniconda/etc/profile.d/conda.sh
conda activate ci-env
.ci/scripts/describe_system.sh
displayName: 'System info'
- script: |
.ci/scripts/build.sh --compiler clang --target daal --optimizations "sse2 avx2" --conda-env ci-env
displayName: 'make daal'
- script: |
.ci/scripts/build.sh --compiler clang --target onedal_c --optimizations "sse2 avx2"
displayName: 'make onedal_c'
- task: PublishPipelineArtifact@1
inputs:
artifactName: '$(platform.type) build'
targetPath: '$(Build.Repository.LocalPath)/$(release.dir)'
displayName: 'Upload build artifacts'
continueOnError: true
- script: |
.ci/scripts/test.sh --test-kind examples --build-dir $(release.dir) --compiler clang --interface daal/cpp --build-system cmake
displayName: 'daal/cpp examples'
- script: |
.ci/scripts/test.sh --test-kind examples --build-dir $(release.dir) --compiler clang --interface oneapi/cpp --build-system cmake
displayName: 'oneapi/cpp examples'
- script: |
deploy/nuget/prepare_dal_nuget.sh --release-dir $(release.dir) --build-nupkg yes
tree -h -I include __nuget/inteldal*/
ls -lh __nuget/inteldal*.nupkg
displayName: 'nuget pkg'
- task: PublishPipelineArtifact@1
inputs:
artifactName: '$(platform.type) fail'
targetPath: '$(Build.Repository.LocalPath)/$(release.dir)'
displayName: 'Uploading on fail'
condition: failed()
continueOnError: true

- job: 'WindowsMakeVC'
timeoutInMinutes: 0
variables:
Expand Down
3 changes: 3 additions & 0 deletions .ci/scripts/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ pacman -S --noconfirm msys/make msys/dos2unix
echo call .ci\env\tbb.bat
if "%TBBROOT%"=="" if not exist .\__deps\tbb\win\tbb call .ci\env\tbb.bat || set errorcode=1

echo call .\dev\download_micromkl.bat
if "%MKLROOT%"=="" if not exist .\__deps\oneMKL\win call .\dev\download_micromkl.bat || set errorcode=1

echo call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall" x64
if "%VISUALSTUDIOVERSION%"=="" call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall" x64 || set errorcode=1

Expand Down
32 changes: 16 additions & 16 deletions cpp/daal/src/externals/service_blas_mkl.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ struct MklBlas<double, cpu>
static void xxsyr(const char * uplo, const DAAL_INT * n, const double * alpha, const double * x, const DAAL_INT * incx, double * a,
const DAAL_INT * lda)
{
mkl_set_num_threads_local(1);
int old_nthr = mkl_set_num_threads_local(1);
__DAAL_MKLFN_CALL(blas_, dsyr, (uplo, (MKL_INT *)n, alpha, x, (MKL_INT *)incx, a, (MKL_INT *)lda));
mkl_set_num_threads_local(0);
mkl_set_num_threads_local(old_nthr);
}

static void xgemm(const char * transa, const char * transb, const DAAL_INT * p, const DAAL_INT * ny, const DAAL_INT * n, const double * alpha,
Expand Down Expand Up @@ -159,10 +159,10 @@ struct MklBlas<double, cpu>
static void xxsymm(char * side, char * uplo, DAAL_INT * m, DAAL_INT * n, double * alpha, double * a, DAAL_INT * lda, double * b, DAAL_INT * ldb,
double * beta, double * c, DAAL_INT * ldc)
{
mkl_set_num_threads_local(1);
int old_nthr = mkl_set_num_threads_local(1);
__DAAL_MKLFN_CALL(blas_, dsymm,
(side, uplo, (MKL_INT *)m, (MKL_INT *)n, alpha, a, (MKL_INT *)lda, b, (MKL_INT *)ldb, beta, c, (MKL_INT *)ldc));
mkl_set_num_threads_local(0);
mkl_set_num_threads_local(old_nthr);
}

static void xgemv(const char * trans, const DAAL_INT * m, const DAAL_INT * n, const double * alpha, const double * a, const DAAL_INT * lda,
Expand All @@ -174,9 +174,9 @@ struct MklBlas<double, cpu>
static void xxgemv(const char * trans, const DAAL_INT * m, const DAAL_INT * n, const double * alpha, const double * a, const DAAL_INT * lda,
const double * x, const DAAL_INT * incx, const double * beta, double * y, const DAAL_INT * incy)
{
mkl_set_num_threads_local(1);
int old_nthr = mkl_set_num_threads_local(1);
__DAAL_MKLFN_CALL(blas_, dgemv, (trans, (MKL_INT *)m, (MKL_INT *)n, alpha, a, (MKL_INT *)lda, x, (MKL_INT *)incx, beta, y, (MKL_INT *)incy));
mkl_set_num_threads_local(0);
mkl_set_num_threads_local(old_nthr);
}

static void xaxpy(DAAL_INT * n, double * a, double * x, DAAL_INT * incx, double * y, DAAL_INT * incy)
Expand All @@ -186,9 +186,9 @@ struct MklBlas<double, cpu>

static void xxaxpy(const DAAL_INT * n, const double * a, const double * x, const DAAL_INT * incx, double * y, const DAAL_INT * incy)
{
mkl_set_num_threads_local(1);
int old_nthr = mkl_set_num_threads_local(1);
__DAAL_MKLFN_CALL(blas_, daxpy, ((MKL_INT *)n, a, x, (MKL_INT *)incx, y, (MKL_INT *)incy));
mkl_set_num_threads_local(0);
mkl_set_num_threads_local(old_nthr);
}

static double xxdot(const DAAL_INT * n, const double * x, const DAAL_INT * incx, const double * y, const DAAL_INT * incy)
Expand Down Expand Up @@ -228,9 +228,9 @@ struct MklBlas<float, cpu>
static void xxsyr(const char * uplo, const DAAL_INT * n, const float * alpha, const float * x, const DAAL_INT * incx, float * a,
const DAAL_INT * lda)
{
mkl_set_num_threads_local(1);
int old_nthr = mkl_set_num_threads_local(1);
__DAAL_MKLFN_CALL(blas_, ssyr, (uplo, (MKL_INT *)n, alpha, x, (MKL_INT *)incx, a, (MKL_INT *)lda));
mkl_set_num_threads_local(0);
mkl_set_num_threads_local(old_nthr);
}

static void xgemm(const char * transa, const char * transb, const DAAL_INT * p, const DAAL_INT * ny, const DAAL_INT * n, const float * alpha,
Expand Down Expand Up @@ -261,10 +261,10 @@ struct MklBlas<float, cpu>
static void xxsymm(char * side, char * uplo, DAAL_INT * m, DAAL_INT * n, float * alpha, float * a, DAAL_INT * lda, float * b, DAAL_INT * ldb,
float * beta, float * c, DAAL_INT * ldc)
{
mkl_set_num_threads_local(1);
int old_nthr = mkl_set_num_threads_local(1);
__DAAL_MKLFN_CALL(blas_, ssymm,
(side, uplo, (MKL_INT *)m, (MKL_INT *)n, alpha, a, (MKL_INT *)lda, b, (MKL_INT *)ldb, beta, c, (MKL_INT *)ldc));
mkl_set_num_threads_local(0);
mkl_set_num_threads_local(old_nthr);
}

static void xgemv(const char * trans, const DAAL_INT * m, const DAAL_INT * n, const float * alpha, const float * a, const DAAL_INT * lda,
Expand All @@ -276,9 +276,9 @@ struct MklBlas<float, cpu>
static void xxgemv(const char * trans, const DAAL_INT * m, const DAAL_INT * n, const float * alpha, const float * a, const DAAL_INT * lda,
const float * x, const DAAL_INT * incx, const float * beta, float * y, const DAAL_INT * incy)
{
mkl_set_num_threads_local(1);
int old_nthr = mkl_set_num_threads_local(1);
__DAAL_MKLFN_CALL(blas_, sgemv, (trans, (MKL_INT *)m, (MKL_INT *)n, alpha, a, (MKL_INT *)lda, x, (MKL_INT *)incx, beta, y, (MKL_INT *)incy));
mkl_set_num_threads_local(0);
mkl_set_num_threads_local(old_nthr);
}

static void xaxpy(DAAL_INT * n, float * a, float * x, DAAL_INT * incx, float * y, DAAL_INT * incy)
Expand All @@ -288,9 +288,9 @@ struct MklBlas<float, cpu>

static void xxaxpy(const DAAL_INT * n, const float * a, const float * x, const DAAL_INT * incx, float * y, const DAAL_INT * incy)
{
mkl_set_num_threads_local(1);
int old_nthr = mkl_set_num_threads_local(1);
__DAAL_MKLFN_CALL(blas_, saxpy, ((MKL_INT *)n, a, x, (MKL_INT *)incx, y, (MKL_INT *)incy));
mkl_set_num_threads_local(0);
mkl_set_num_threads_local(old_nthr);
}

static float xxdot(const DAAL_INT * n, const float * x, const DAAL_INT * incx, const float * y, const DAAL_INT * incy)
Expand Down
Loading

0 comments on commit fc4f2af

Please sign in to comment.