Skip to content
Snippets Groups Projects

Fix template compilation and warnings

Merged Charles Villard requested to merge silvanosky/aidge_backend_cuda:compilation_fix1 into dev
2 unresolved threads

Context

Compilation error when building with CUDA 12.6 and GCC 14.2

Modified files

  • include/aidge/backend/cuda/data/TensorImpl.hpp
  • src/data/TensorImpl.cu
  • src/operator/ILayerNormImpl_CUDA_kernels.cu

Detailed major modifications

  • Moved enable_if template specialization from parameter to return type which helps the compiler to select the correct implementation.
  • Changed factor type to avoid out of bound warning.
Edited by Cyril Moineau

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
99 101 return thrust::equal(thrustData, thrustData + mNbElts, thrustOtherData);
100 102 }
101 103
104 template void Aidge::thrust_copy<half_float::half, double>(half_float::half const*, double*, unsigned long);
  • added 1 commit

    • b08a6b1d - edit: TensorImpl: problem with half type conversion, comment for now

    Compare with previous version

  • added 1 commit

    • 3a82949e - edit: TensorImpl.{hpp,cu}: Fixed template in the general case

    Compare with previous version

  • added 1 commit

    • e1452c59 - edit: ILayerNorm: fixed test

    Compare with previous version

  • @silvanosky The pipeline is still failing, are you still on this? Can we help?

  • reopened

  • The pipeline keep failing using Clang, I don't know exactly why. It seems that the enable if condition don't have the same behavior as GCC hence symbol are undefined. CUDA seems to be compatible with GCC only so if you have a CLANG/CUDA expert to fix it.

    I can't focus on this right now, I will have time in march to investigate deeper.

  • Maxence Naud added 20 commits

    added 20 commits

    • e1452c59...ed7ea278 - 13 commits from branch eclipse/aidge:dev
    • 1084f489 - fix: TensorImpl: Enable if on return type instead of parameter
    • b2d4a2c1 - edit: ILayerNormImpl: fixed type possible overflow warning
    • 741f3ea1 - Update TensorImpl.hpp add include for type_traits
    • 8080e6fc - Update TensorImpl.cu
    • 63926c14 - edit: TensorImpl: problem with half type conversion, comment for now
    • 785d69c6 - edit: TensorImpl.{hpp,cu}: Fixed template in the general case
    • 320db778 - edit: ILayerNorm: fixed test

    Compare with previous version

  • Maxence Naud approved this merge request

    approved this merge request

  • Charles Villard added 19 commits

    added 19 commits

    • 320db778...c4f53b0d - 13 commits from branch eclipse/aidge:dev
    • 1ba7bbd3 - fix: TensorImpl: Enable if on return type instead of parameter
    • f4721189 - edit: ILayerNormImpl: fixed type possible overflow warning
    • a3c832f9 - Update TensorImpl.hpp add include for type_traits
    • af3da233 - edit: TensorImpl.{hpp,cu}: Fixed template in the general case
    • 2d392d87 - edit: ILayerNorm: fixed test
    • 734cbe41 - upgrade: pybind: 2.13.6

    Compare with previous version

  • Charles Villard reset approvals from @pineapple by pushing to the branch

    reset approvals from @pineapple by pushing to the branch

  • Cyril Moineau marked this merge request as draft

    marked this merge request as draft

  • Setting to draft and stuck

  • Charles Villard added 8 commits

    added 8 commits

    • 734cbe41...ec169671 - 2 commits from branch eclipse/aidge:dev
    • 43ee3a7a - fix: TensorImpl: Enable if on return type instead of parameter
    • ad677378 - edit: ILayerNormImpl: fixed type possible overflow warning
    • 8d8656b7 - Update TensorImpl.hpp add include for type_traits
    • 1ce87625 - edit: TensorImpl.{hpp,cu}: Fixed template in the general case
    • 2e74a4aa - edit: ILayerNorm: fixed test
    • 8ebe2829 - upgrade: pybind: 2.13.6

    Compare with previous version

  • Charles Villard added 2 commits

    added 2 commits

    • 76bd4dac - edit: TensorImpl: try to fix template ?
    • 2425c258 - edit: TensorImpl: gave up original approach to use class partial

    Compare with previous version

  • added 1 commit

    • f5ecf069 - edit: TensorImpl: gave up original approach to use class partial

    Compare with previous version

  • added 1 commit

    • bfb6e034 - edit: TensorImpl: gave up original approach to use class partial

    Compare with previous version

  • changed milestone to %aidge v0.6.0

  • removed Stuck ❌ label

  • Charles Villard marked this merge request as ready

    marked this merge request as ready

  • Charles Villard requested review from @pineapple

    requested review from @pineapple

  • Charles Villard added 8 commits

    added 8 commits

    • 00ffea41 - 1 commit from branch eclipse/aidge:dev
    • 7d810245 - fix: TensorImpl: Enable if on return type instead of parameter
    • dd3bd11d - edit: ILayerNormImpl: fixed type possible overflow warning
    • a7164012 - Update TensorImpl.hpp add include for type_traits
    • 27a9451c - edit: TensorImpl.{hpp,cu}: Fixed template in the general case
    • 7b0be0af - edit: ILayerNorm: fixed test
    • 931b62e2 - edit: TensorImpl: try to fix template ?
    • 51450d3e - edit: TensorImpl: gave up original approach to use class partial

    Compare with previous version

  • removed Stuck ❌ label

  • Maxence Naud added 11 commits

    added 11 commits

    • 51450d3e...f5dbfb26 - 4 commits from branch eclipse/aidge:dev
    • 1992ac67 - fix: TensorImpl: Enable if on return type instead of parameter
    • 943081f8 - edit: ILayerNormImpl: fixed type possible overflow warning
    • 6c3aa17b - Update TensorImpl.hpp add include for type_traits
    • f80c3d59 - edit: TensorImpl.{hpp,cu}: Fixed template in the general case
    • cf94ef7a - edit: ILayerNorm: fixed test
    • 29181ce4 - edit: TensorImpl: try to fix template ?
    • 1562648a - edit: TensorImpl: gave up original approach to use class partial

    Compare with previous version

  • Cyril Moineau changed the description

    changed the description

  • Cyril Moineau approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading