Skip to content

Commit

Permalink
Merge pull request tensorflow#26724 from ROCmSoftwarePlatform:google_…
Browse files Browse the repository at this point in the history
…upstream_snapshot_op

PiperOrigin-RevId: 246868352
  • Loading branch information
tensorflower-gardener committed May 6, 2019
2 parents 6ecc82b + 7b9f278 commit fe5f181
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tensorflow/core/kernels/snapshot_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SnapshotOp : public OpKernel {
TF_CALL_POD_TYPES(REGISTER_KERNEL);
#undef REGISTER_KERNEL

#if GOOGLE_CUDA
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
#define REGISTER_KERNEL(TYPE) \
REGISTER_KERNEL_BUILDER( \
Name("Snapshot").Device(DEVICE_GPU).TypeConstraint<TYPE>("T"), \
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/kernels/snapshot_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
#ifndef TENSORFLOW_CORE_KERNELS_SNAPSHOT_OP_H_
#define TENSORFLOW_CORE_KERNELS_SNAPSHOT_OP_H_

#if GOOGLE_CUDA
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
#define EIGEN_USE_GPU
#endif

Expand Down
4 changes: 2 additions & 2 deletions tensorflow/core/kernels/snapshot_op_gpu.cu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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.
==============================================================================*/
#if GOOGLE_CUDA
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM

// See docs in ../ops/array_ops.cc.
#include "tensorflow/core/kernels/snapshot_op.h"
Expand All @@ -31,4 +31,4 @@ TF_CALL_POD_TYPES(DEFINE_GPU_KERNELS);

} // namespace tensorflow

#endif // GOOGLE_CUDA
#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM

0 comments on commit fe5f181

Please sign in to comment.