Giter VIP home page Giter VIP logo

Comments (2)

jrhemstad avatar jrhemstad commented on June 10, 2024

@alliepiper what do you think?

from cccl.

alliepiper avatar alliepiper commented on June 10, 2024

I suggest a more expansive approach that addresses a few other concerns I've had:

  1. Device compiler specs are currently inconsistent (NVCC: string 'nvcc', ClangCUDA: object at anchor *llvm16)
  2. Compiler 'name' is overloaded. Maybe this is subjective, but I find Clang, MSVC, and Intel more recognizable than "llvm", "cl", or "oneapi", but the latter are used for image names. Splitting the 'familiar' name and devcontainer tag would be nice from a UX perspective.
  3. Expansion of the host-compiler object when printing original workflow lines for debugging / diagnostics gets annoying. Having a list of host compilers quickly becomes unreadable after the yaml parser turns anchors -> objects). Adding std info to the existing compiler objects would worsen this with the current implementation.

I think we can address these while making the change you requested by using strings instead of anchors in the job specification. We can then use these strings to lookup what we need in the metadata objects, which can grow in complexity as much as needed without cluttering up diagnostics.

I'm imagining something like this:

cuda_toolkits:
  - 11.1: { std: [11, 14, 17,   ] }
  - 11.8: { std: [11, 14, 17,   ] }
  - 12.0: { std: [11, 14, 17, 20] }
  - 12.4: { std: [11, 14, 17, 20], aka: 'curr' }

# Version info / std reqs implicit - use CTK for nvcc, host compiler for clang:
device_compilers: 
  nvcc:
    exe: 'nvcc'
  clang:
    exe: 'clang++'

host_compilers:
  gcc:
    name: 'GCC'
    container_tag: 'gcc'
    exe: 'g++'
    versions:
      - 6:  { std: [11, 14,       ] }
      - 7:  { std: [11, 14, 17,   ] }
      - 8:  { std: [11, 14, 17,   ] }
      - 9:  { std: [11, 14, 17,   ] }
      - 10: { std: [11, 14, 17, 20] }
      - 11: { std: [11, 14, 17, 20] }
      - 12: { std: [11, 14, 17, 20] }
  clang:
    name: 'Clang'
    container_tag: 'llvm'
    exe: 'clang++'
    versions:
      - 9:  { std: [11, 14, 17,   ] }
      - 10: { std: [11, 14, 17,   ] }
      - 11: { std: [11, 14, 17, 20] }
      - 12: { std: [11, 14, 17, 20] }
      - 13: { std: [11, 14, 17, 20] }
      - 14: { std: [11, 14, 17, 20] }
      - 15: { std: [11, 14, 17, 20] }
      - 16: { std: [11, 14, 17, 20] }
  msvc:
    name: 'MSVC'
    container_tag: 'cl'
    exe: cl
    versions:
      - 14.16: { std: [    14,       ], aka: '2017' }
      - 14.29: { std: [    14, 17,   ], aka: '2019' }
      - 14.36: { std: [    14, 17, 20]              }
      - 14.39: { std: [    14, 17, 20], aka: '2022' }
  intel:
    name: 'Intel'
    container_tag: 'oneapi'
    exe: icpc
    versions:
      - 2023.2.0: { std: [11, 14, 17,   ] }

This is how various lines from the workflow spec would change:

  • '<compiler>[version]' strings instead of anchors for host compilers.
  • Omit the version to use the latest.
  • Consistent, clearly defined strings for device compilers.
  • aka for MSVC version allows either year tags or explicit versions to be requested.
  • CTK entries are more compact after deanchorification.
# Current then new:

- {jobs: ['build'], std: 'all', cxx: [*gcc7, *gcc8, *gcc9, *gcc10, *gcc11]}
- {jobs: ['build'], std: 'all', cxx: ['gcc7', 'gcc8', 'gcc9', 'gcc10', 'gcc11']}

- {jobs: ['build'], std: 'all', cxx: [*llvm9, *llvm10, *llvm11, *llvm12, *llvm13, *llvm14, *llvm15]}
- {jobs: ['build'], std: 'all', cxx: ['clang9', 'clang10', 'clang11', 'clang12', 'clang13', 'clang14', 'clang15']}

- {jobs: ['test'],  std: 'all', cxx: [*gcc12, *llvm16]}
- {jobs: ['test'],  std: 'all', cxx: ['gcc12', 'clang16']}

- {jobs: ['build'], std: 'all', cxx: [*oneapi]}
- {jobs: ['build'], std: 'all', cxx: ['intel']}

- {jobs: ['build'], std: 'all', cxx: [*msvc2019, *msvc2022_1436]}
- {jobs: ['build'], std: 'all', cxx: ['msvc2019', 'msvc14.36']} # Either version format works via `aka`

# I'd prefer old versions be explicit to ensure compat. These rarely change, so it's less useful than 'latest/curr'?
- {jobs: ['infra'], project: 'cccl', ctk: *ctk_11_1, cxx: [*gcc-oldest, *llvm-oldest]}
- {jobs: ['infra'], project: 'cccl', ctk: '11.1', cxx: ['gcc6', 'clang9']}

- {jobs: ['infra'], project: 'cccl', ctk: *ctk_curr, cxx: [*gcc-newest, *llvm-newest]}
- {jobs: ['infra'], project: 'cccl', ctk: 'curr', cxx: ['gcc', 'clang']}

# clang cuda:
- {jobs: ['build'], std: [17, 20], cudacxx: *llvm-newest, cxx: *llvm-newest}
- {jobs: ['build'], std: [17, 20], cudacxx: 'clang', cxx: 'clang'}

from cccl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.