Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #4633

Closed
Open
Created Mar 15, 2019 by James Willenbring@jmwilleMaintainer

Tpetra::MultiVector constructor that takes a device View uses create_mirror instead of create_mirror_view

Created by: mhoemmen

@trilinos/tpetra @vbrunini

In most cases, Tpetra::MultiVector's host View is the result of Kokkos::create_mirror_view on its device View. However, in one case:

https://github.com/trilinos/Trilinos/blob/5c9a2ec8019b310b5b74a22e23fcbea11486f781/packages/tpetra/core/src/Tpetra_MultiVector_def.hpp#L427

Tpetra creates the host View from the input device View using Kokkos::create_mirror. This means that, unlike in all other cases, the host View is always a separate allocation (even if not building with CUDA!) from the device View. That's weird, and it may be causing issues relating to my fixes for #4626 (closed).

Note the comment above that line of code:

    // The difference between create_mirror and create_mirror_view, is
    // that the latter copies to host.  We don't necessarily want to
    // do that; we just want to allocate the memory.

git blame dates that to 2015. It could have been the case back then that create_mirror_view copied to host. It certainly does not now.

Assignee
Assign to
Time tracking