Skip to content

Commit

Permalink
lcy/fix_droplet_runtime_error_202 (#388)
Browse files Browse the repository at this point in the history
* reset allocatorImpl

* restore DIPUBFCachingAllocator.cpp && update deviceimpl.cpp

* add comment
  • Loading branch information
cyLi-Tiger authored Nov 6, 2023
1 parent 8dac466 commit 22457dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dipu/torch_dipu/csrc_dipu/vendor/droplet/deviceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ using DROPLET_deviceId = int;
// =====================

void initializVendor() {

// according to the discussion with droplet team, make a random runtime call
// to make sure droplet runtime software is initialized correctly
int num = -1;
DIPU_CALLDROPLET(::tangGetDeviceCount(reinterpret_cast<int*>(&num)))
}

void finalizeVendor() {
Expand Down

0 comments on commit 22457dd

Please sign in to comment.