Commit 1705b099 authored by Simon Perkins's avatar Simon Perkins Committed by Rasmus Munk Larsen
Browse files

Map Staging Area (#9686)

* Map Staging Area Operator

* Add map staging operators to the BUILD

* Don't be too clever about notifying waiting thread

* Add Staging Area Size op

* Use predicate form of condition_variable.wait

* Add a Staging Area clear op

* Add Peek op and capacity to the Staging Area

* map_stage_op.cpp -> map_stage_op.cc

* size should be int32

* Small improvements to staging test case

* Create BaseStagingArea

Containing common functionality to StagingArea and BaseStagingArea

* Add MapStagingArea test cases

* Add an ordering test

* Rename get() to peek()

* Combine pop(key) and popitem() into get(key=None)

* Block on peek methods

Wait for the requested element to be inserted into the staging area.

* Use constructor initializer lists

* Arrange class typedefs, members and methods

Also make previously public helper methods like HasBoundedCapacity() and
IsFull() private.

* Better docs for StagingArea.clear()

* SYCL_DEVICE MapStage => OrderedMapStage

* Initializer list fix

* device('/gpu:0') => test.gpu_device_name()

* Copyright year to 2017

* Reverse keys before random shuffle

* Python docstring updates

* Fix stage op docs

* Order RecordInput correctly

* Updated MapStage op docs

* Capture index by value instead of reference

Its just an int.

* Add support for Staging Area memory limit

Mostly useful for constraining the amount of memory used for Staging
Areas placed on the GPU.

* Use key Tensor as key rather than int64

* Pass dtypes to StagingMap

* CamelCase types

* Support barrier operation on the MapStagingArea

- It is now possible to insert incomplete elements.
- Key std::map and std::unordered_map on scalar Tensor int64
  (avoids unnecessary allocations)

* Remove shuffling to make test deterministic

* Use size_t for indices and positive quantities

* Fix lint errors

- autopep8 data_flow_ops.py indentation to 2 spaces.
- Alphabetically order data_flow lib dependencies in BUILD

* extra capacity() should be memory_limit()

* Run buildifier

* Fix OrderedMapIncompleteSize kernel name

* Fix device name in colocation test

Device name is "" if no GPU is present.

* Fix subtle size_t to int conversion bug

* Add #include <numeric> for windows builds

* Add #include <numeric> in stage_op.cc too
parent 47bcf291
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment