Home
last modified time | relevance | path

Searched refs:get_context (Results 1 – 25 of 323) sorted by relevance

12345678910>>...13

/third_party/mindspore/tests/ut/python/pynative_mode/
Dtest_context.py61 assert context.get_context("mode") == context.GRAPH_MODE
63 assert context.get_context("mode") == context.PYNATIVE_MODE
71 assert context.get_context("device_id") == 1
79 assert context.get_context("device_target") == "GPU"
81 assert context.get_context("device_target") == "Ascend"
82 assert context.get_context("device_id") == 1
115 assert context.get_context("device_id") == 0
116 assert context.get_context("device_target") == "Ascend"
117 assert context.get_context("save_graphs")
119 assert context.get_context("save_graphs_path").find("mindspore_ir_path") > 0
[all …]
/third_party/python/Lib/multiprocessing/
Dcontext.py56 m = SyncManager(ctx=self.get_context())
68 return Lock(ctx=self.get_context())
73 return RLock(ctx=self.get_context())
78 return Condition(lock, ctx=self.get_context())
83 return Semaphore(value, ctx=self.get_context())
88 return BoundedSemaphore(value, ctx=self.get_context())
93 return Event(ctx=self.get_context())
98 return Barrier(parties, action, timeout, ctx=self.get_context())
103 return Queue(maxsize, ctx=self.get_context())
108 return JoinableQueue(maxsize, ctx=self.get_context())
[all …]
Dsharedctypes.py14 from . import get_context
78 ctx = ctx or get_context()
92 ctx = ctx or get_context()
105 ctx = ctx or get_context()
187 ctx = ctx or get_context(force=True)
/third_party/boost/boost/compute/
Dcommand_queue.hpp238 context get_context() const in get_context() function in boost::compute::command_queue
282 this->get_context().get(), in set_as_default_device_queue()
305 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_read_buffer()
343 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_read_buffer_async()
386 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_read_buffer_rect()
433 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_read_buffer_rect_async()
476 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_write_buffer()
514 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_write_buffer_async()
557 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_write_buffer_rect()
604 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_write_buffer_rect_async()
[all …]
/third_party/boost/libs/compute/include/boost/compute/
Dcommand_queue.hpp238 context get_context() const in get_context() function in boost::compute::command_queue
282 this->get_context().get(), in set_as_default_device_queue()
305 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_read_buffer()
343 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_read_buffer_async()
386 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_read_buffer_rect()
433 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_read_buffer_rect_async()
476 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_write_buffer()
514 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_write_buffer_async()
557 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_write_buffer_rect()
604 BOOST_ASSERT(buffer.get_context() == this->get_context()); in enqueue_write_buffer_rect_async()
[all …]
/third_party/mindspore/mindspore/train/
Ddataset_helper.py50 context.get_context("device_target") == "Ascend" and \
51 context.get_context("mode") == context.GRAPH_MODE and \
173 not context.get_context("enable_ge") and \
174 context.get_context("device_target") in ("Ascend", "GPU"):
183 context.get_context("device_target") == "Ascend" and \
184 context.get_context("mode") == context.PYNATIVE_MODE:
234 if context.get_context("enable_ge"):
237 if context.get_context("mode") == context.GRAPH_MODE:
243 elif (context.get_context("device_target") == "Ascend") or \
244 (context.get_context("device_target") == "GPU"):
[all …]
/third_party/boost/libs/compute/include/boost/compute/interop/opencv/
Dcore.hpp57 BOOST_ASSERT(image.get_context() == queue.get_context()); in opencv_copy_mat_to_image()
67 BOOST_ASSERT(image.get_context() == queue.get_context()); in opencv_copy_image_to_mat()
93 BOOST_ASSERT(image.get_context() == queue.get_context()); in opencv_create_mat_with_image2d()
128 const context &context = queue.get_context(); in opencv_create_image2d_with_mat()
/third_party/boost/boost/compute/interop/opencv/
Dcore.hpp57 BOOST_ASSERT(image.get_context() == queue.get_context()); in opencv_copy_mat_to_image()
67 BOOST_ASSERT(image.get_context() == queue.get_context()); in opencv_copy_image_to_mat()
93 BOOST_ASSERT(image.get_context() == queue.get_context()); in opencv_create_mat_with_image2d()
128 const context &context = queue.get_context(); in opencv_create_image2d_with_mat()
/third_party/boost/libs/compute/include/boost/compute/detail/
Dread_write_single_value.hpp32 BOOST_ASSERT(buffer.get_context() == queue.get_context()); in read_single_value()
57 BOOST_ASSERT(buffer.get_context() == queue.get_context()); in write_single_value()
/third_party/boost/boost/compute/detail/
Dread_write_single_value.hpp32 BOOST_ASSERT(buffer.get_context() == queue.get_context()); in read_single_value()
57 BOOST_ASSERT(buffer.get_context() == queue.get_context()); in write_single_value()
/third_party/boost/boost/compute/interop/opengl/
Dacquire.hpp80 BOOST_ASSERT(buffer.get_context() == queue.get_context()); in opengl_enqueue_acquire_buffer()
92 BOOST_ASSERT(buffer.get_context() == queue.get_context()); in opengl_enqueue_release_buffer()
/third_party/boost/libs/compute/include/boost/compute/interop/opengl/
Dacquire.hpp80 BOOST_ASSERT(buffer.get_context() == queue.get_context()); in opengl_enqueue_acquire_buffer()
92 BOOST_ASSERT(buffer.get_context() == queue.get_context()); in opengl_enqueue_release_buffer()
/third_party/boost/libs/asio/include/boost/asio/detail/
Dio_object_impl.hpp49 io_object_impl::get_context(ex))), in io_object_impl()
77 io_object_impl::get_context(other.get_executor()))), in io_object_impl()
140 static execution_context& get_context(const T& t, in get_context() function in boost::asio::detail::io_object_impl
148 static execution_context& get_context(const T& t, in get_context() function in boost::asio::detail::io_object_impl
/third_party/boost/boost/asio/detail/
Dio_object_impl.hpp49 io_object_impl::get_context(ex))), in io_object_impl()
77 io_object_impl::get_context(other.get_executor()))), in io_object_impl()
140 static execution_context& get_context(const T& t, in get_context() function in boost::asio::detail::io_object_impl
148 static execution_context& get_context(const T& t, in get_context() function in boost::asio::detail::io_object_impl
/third_party/mindspore/mindspore/train/train_thor/
Ddataset_helper.py71 if context.get_context("device_target") == "Ascend":
74 elif context.get_context("device_target") == "GPU":
77 elif context.get_context("device_target") == "CPU":
146 if context.get_context("enable_ge") or context.get_context("device_target") == "Ascend":
/third_party/mindspore/tests/st/pynative/
Dtest_pynative_mixed_precision_cells.py28 self.device_target = context.get_context('device_target')
119 context.set_context(mode=context.GRAPH_MODE, device_target=context.get_context('device_target'))
122 …context.set_context(mode=context.PYNATIVE_MODE, device_target=context.get_context('device_target'))
130 context.set_context(mode=context.GRAPH_MODE, device_target=context.get_context('device_target'))
133 …context.set_context(mode=context.PYNATIVE_MODE, device_target=context.get_context('device_target'))
141 context.set_context(mode=context.GRAPH_MODE, device_target=context.get_context('device_target'))
144 …context.set_context(mode=context.PYNATIVE_MODE, device_target=context.get_context('device_target'))
Dtest_pynative_layernorm_input_and_argmaxwithvalue.py57 self.device_target = context.get_context('device_target')
129 … context.set_context(mode=context.GRAPH_MODE, device_target=context.get_context('device_target'))
132 …context.set_context(mode=context.PYNATIVE_MODE, device_target=context.get_context('device_target'))
138 … context.set_context(mode=context.GRAPH_MODE, device_target=context.get_context('device_target'))
141 …context.set_context(mode=context.PYNATIVE_MODE, device_target=context.get_context('device_target'))
194 …context.set_context(mode=context.PYNATIVE_MODE, device_target=context.get_context('device_target'))
201 … context.set_context(mode=context.GRAPH_MODE, device_target=context.get_context('device_target'))
204 …context.set_context(mode=context.PYNATIVE_MODE, device_target=context.get_context('device_target'))
/third_party/boost/boost/compute/algorithm/
Dset_intersection.hpp137 vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_intersection()
138 vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_intersection()
152 vector<value_type> temp_result(count1+count2, queue.get_context()); in set_intersection()
153 vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context()); in set_intersection()
Dset_difference.hpp149 vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_difference()
150 vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_difference()
164 vector<value_type> temp_result(count1+count2, queue.get_context()); in set_difference()
165 vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context()); in set_difference()
Dset_symmetric_difference.hpp161 vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_symmetric_difference()
162 vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_symmetric_difference()
176 vector<value_type> temp_result(count1+count2, queue.get_context()); in set_symmetric_difference()
177 vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context()); in set_symmetric_difference()
Dset_union.hpp162 vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_union()
163 vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_union()
177 vector<value_type> temp_result(count1+count2, queue.get_context()); in set_union()
178 vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context()); in set_union()
/third_party/boost/libs/compute/include/boost/compute/algorithm/
Dset_difference.hpp149 vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_difference()
150 vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_difference()
164 vector<value_type> temp_result(count1+count2, queue.get_context()); in set_difference()
165 vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context()); in set_difference()
Dset_intersection.hpp137 vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_intersection()
138 vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_intersection()
152 vector<value_type> temp_result(count1+count2, queue.get_context()); in set_intersection()
153 vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context()); in set_intersection()
Dset_symmetric_difference.hpp161 vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_symmetric_difference()
162 vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_symmetric_difference()
176 vector<value_type> temp_result(count1+count2, queue.get_context()); in set_symmetric_difference()
177 vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context()); in set_symmetric_difference()
Dset_union.hpp162 vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_union()
163 vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context()); in set_union()
177 vector<value_type> temp_result(count1+count2, queue.get_context()); in set_union()
178 vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context()); in set_union()

12345678910>>...13