Skip to content

Commit

Permalink
fix: upgrade to clang17 to use InheritParentConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
wiryls committed Nov 21, 2023
1 parent be9fd94 commit 5659b48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
style: file
tidy-checks: '-*' # disable clang tidy at this stage
version: 17
- name: Fail test
if: steps.linter.outputs.checks-failed > 0
run: echo "Some files failed the linting checks!" && exit 1
20 changes: 10 additions & 10 deletions dipu/torch_dipu/csrc_dipu/diopirt/diopirt_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,26 @@ DIOPI_RT_API diopiError_t diopiGetTensorElemSize(diopiConstTensorHandle_t pth,
}

DIOPI_RT_API diopiError_t diopiGetTensorStoragePtr(diopiConstTensorHandle_t pth,
void** pStoragePtr) {
*pStoragePtr = (reinterpret_cast<const at::Tensor*>(pth))->storage().data();
void **pStoragePtr) {
*pStoragePtr = (reinterpret_cast<const at::Tensor *>(pth))->storage().data();
return diopiSuccess;
}

DIOPI_RT_API diopiError_t diopiGetTensorStorageOffset(
diopiConstTensorHandle_t pth, int64_t* pOffset) {
*pOffset = (reinterpret_cast<const at::Tensor*>(pth))->storage_offset();
DIOPI_RT_API diopiError_t
diopiGetTensorStorageOffset(diopiConstTensorHandle_t pth, int64_t *pOffset) {
*pOffset = (reinterpret_cast<const at::Tensor *>(pth))->storage_offset();
return diopiSuccess;
}

DIOPI_RT_API diopiError_t diopiGetTensorStorageNbytes(
diopiConstTensorHandle_t pth, size_t* pNbytes) {
*pNbytes = (reinterpret_cast<const at::Tensor*>(pth))->storage().nbytes();
DIOPI_RT_API diopiError_t
diopiGetTensorStorageNbytes(diopiConstTensorHandle_t pth, size_t *pNbytes) {
*pNbytes = (reinterpret_cast<const at::Tensor *>(pth))->storage().nbytes();
return diopiSuccess;
}

DIOPI_RT_API diopiError_t diopiGetTensorDeviceIndex(
diopiConstTensorHandle_t pth, diopiDeviceIndex_t* pDevIndex) {
*pDevIndex = (reinterpret_cast<const at::Tensor*>(pth))->device().index();
diopiConstTensorHandle_t pth, diopiDeviceIndex_t *pDevIndex) {
*pDevIndex = (reinterpret_cast<const at::Tensor *>(pth))->device().index();
return diopiSuccess;
}

Expand Down

0 comments on commit 5659b48

Please sign in to comment.