@@ -157,20 +157,6 @@ void HexagonDeviceAPI::FreeWorkspace(Device dev, void* data) {
157157 dmlc::ThreadLocalStore<HexagonWorkspacePool>::Get ()->FreeWorkspace (dev, data);
158158}
159159
160- void * HexagonDeviceAPI::AllocVtcmWorkspace (Device dev, int ndim, const int64_t * shape,
161- DLDataType dtype, Optional<String> mem_scope) {
162- // must be Hexagon device (not CPU)
163- CHECK (dev.device_type == kDLHexagon ) << " dev.device_type: " << dev.device_type ;
164- CHECK ((ndim == 1 || ndim == 2 ) && " Hexagon Device API supports only 1d and 2d allocations" );
165- return AllocDataSpace (dev, ndim, shape, dtype, mem_scope);
166- }
167-
168- void HexagonDeviceAPI::FreeVtcmWorkspace (Device dev, void * ptr) {
169- // must be Hexagon device (not CPU)
170- CHECK (dev.device_type == kDLHexagon ) << " dev.device_type: " << dev.device_type ;
171- FreeDataSpace (dev, ptr);
172- }
173-
174160void HexagonDeviceAPI::CopyDataFromTo (DLTensor* from, DLTensor* to, TVMStreamHandle stream) {
175161 CHECK_EQ (from->byte_offset , 0 );
176162 CHECK_EQ (to->byte_offset , 0 );
@@ -268,7 +254,7 @@ TVM_REGISTER_GLOBAL("device_api.hexagon.alloc_nd").set_body([](TVMArgs args, TVM
268254 type_hint.lanes = 1 ;
269255
270256 HexagonDeviceAPI* hexapi = HexagonDeviceAPI::Global ();
271- *rv = hexapi->AllocVtcmWorkspace (dev, ndim, shape, type_hint, String (scope));
257+ *rv = hexapi->AllocDataSpace (dev, ndim, shape, type_hint, String (scope));
272258});
273259
274260TVM_REGISTER_GLOBAL (" device_api.hexagon.free_nd" ).set_body([](TVMArgs args, TVMRetValue* rv) {
@@ -283,7 +269,7 @@ TVM_REGISTER_GLOBAL("device_api.hexagon.free_nd").set_body([](TVMArgs args, TVMR
283269 dev.device_id = device_id;
284270
285271 HexagonDeviceAPI* hexapi = HexagonDeviceAPI::Global ();
286- hexapi->FreeVtcmWorkspace (dev, ptr);
272+ hexapi->FreeDataSpace (dev, ptr);
287273 *rv = static_cast <int32_t >(0 );
288274});
289275
0 commit comments