Skip to content

Dg replace merge#4959

Closed
openroad-robot wants to merge 13 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:dg_replace_merge
Closed

Dg replace merge#4959
openroad-robot wants to merge 13 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:dg_replace_merge

Conversation

@openroad-robot
Copy link
Copy Markdown
Contributor

Hi Matt,

I added the init codes of DG-RePlAce. Could you please take a look ?

Thanks,
Zhiang

ZhiangWang033 and others added 6 commits April 9, 2024 15:58
…t-private/master

get all the latest commits from the master branch
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 83. Check the log or trigger a new build to see more.

Comment thread src/gpl2/include/gpl2/GpuReplace.h
Comment thread src/gpl2/include/gpl2/GpuReplace.h
Comment thread src/gpl2/src/cudaDCT.h
Comment thread src/gpl2/src/cudaDCT.h
Comment thread src/gpl2/src/cudaDCT.h
Comment thread src/gpl2/src/initialPlace.cpp
Comment thread src/gpl2/src/initialPlace.h
Comment thread src/gpl2/src/initialPlace.h
Comment thread src/gpl2/src/nesterovPlace.cpp
Comment thread src/gpl2/src/nesterovPlace.cpp
@maliberty
Copy link
Copy Markdown
Member

@ZhiangWang033 needs clang-format and clang-tidy cleaned up. Also it needs to gracefully handle not having cuda installed.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Comment thread src/gpl2/CMakeLists.txt Outdated
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 56. Check the log or trigger a new build to see more.

Comment thread src/gpl2/src/nesterovPlace.cpp
Comment thread src/gpl2/src/nesterovPlace.cpp
Comment thread src/gpl2/src/placerBase.cpp

namespace gpl2 {

using namespace std;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use namespace using-directives; use using-declarations instead [google-build-using-namespace]

using namespace std;
^

: network_(nullptr),
db_(nullptr),
log_(nullptr),
pbVars_(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: initializer for member 'pbVars_' is redundant [readability-redundant-member-init]

Suggested change
pbVars_(),
,

Comment on lines +2687 to +2689
else {
return original;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use 'else' after 'return' [readability-else-after-return]

Suggested change
else {
return original;
}
return original;

Comment thread src/gpl2/src/placerBase.h

#pragma once

#include <cuda.h>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'cuda.h' file not found [clang-diagnostic-error]

#include <cuda.h>
         ^

Comment thread src/gpl2/src/placerBase.h
int64_t nesterovInstsArea() const
{
return stdInstsArea_
+ static_cast<int64_t>(round(macroInstsArea_ * targetDensity_));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: call to 'round' promotes float to double [performance-type-promotion-in-math-fn]

src/gpl2/src/placerBase.h:57:

- #include <memory>
+ #include <cmath>
+ #include <memory>
Suggested change
+ static_cast<int64_t>(round(macroInstsArea_ * targetDensity_));
+ static_cast<int64_t>(std::round(macroInstsArea_ * targetDensity_));

///////////////////////////////////////////////////////////////
// Instance
Instance::Instance()
: inst_(nullptr),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member initializer for 'inst_' is redundant [modernize-use-default-member-init]

Suggested change
: inst_(nullptr),
: ,

// Instance
Instance::Instance()
: inst_(nullptr),
instId_(-1),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member initializer for 'instId_' is redundant [modernize-use-default-member-init]

Suggested change
instId_(-1),
,

Comment thread src/drt/src/gr/FlexGR.cpp
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there changes in drt? It seems unrelated. Using std::cout is not ok and would require use of the logger if these are intended.

@ZhiangWang033
Copy link
Copy Markdown
Contributor

ZhiangWang033 commented Apr 17, 2024 via email

@rovinski
Copy link
Copy Markdown
Collaborator

Please fix up the copyright organization and year.

@maliberty
Copy link
Copy Markdown
Member

@ZhiangWang033 any eta for your updates?

ZhiangWang033 and others added 6 commits May 12, 2024 15:04
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 33. Check the log or trigger a new build to see more.

//
///////////////////////////////////////////////////////////////////////////////

#include "gpl2/MakeGpuReplace.h"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'gpl2/MakeGpuReplace.h' file not found [clang-diagnostic-error]

#include "gpl2/MakeGpuReplace.h"
         ^

//
///////////////////////////////////////////////////////////////////////////////

#include "gpl2/GpuReplace.h"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'gpl2/GpuReplace.h' file not found [clang-diagnostic-error]

#include "gpl2/GpuReplace.h"
         ^

dDx_(0.0),
dDy_(0.0),
densityScale_(0.0),
haloWidth_(0),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member initializer for 'haloWidth_' is redundant [modernize-use-default-member-init]

Suggested change
haloWidth_(0),
,

densityScale_(0.0),
haloWidth_(0),
type_(InstanceType::FILLER),
isFixed_(false)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member initializer for 'isFixed_' is redundant [modernize-use-default-member-init]

Suggested change
isFixed_(false)

int lx = 0.0;
int ly = 0.0;
inst->getLocation(lx, ly);
int ux = lx + floor(bbox->getDX() / 2) * 2;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: result of integer division used in a floating point context; possible loss of precision [bugprone-integer-division]

  int ux = lx + floor(bbox->getDX() / 2) * 2;
                      ^

{
int x;
int y;
__host__ __device__ IntPoint() : x(0), y(0) {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]

Suggested change
__host__ __device__ IntPoint() : x(0), y(0) {}
__host__ _device_ IntPoint() : x(0), y(0) {}

{
float x;
float y;
__host__ __device__ FloatPoint() : x(0), y(0) {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]

Suggested change
__host__ __device__ FloatPoint() : x(0), y(0) {}
__host__ _device_ FloatPoint() : x(0), y(0) {}

{
int64_t x;
int64_t y;
__host__ __device__ Int64Point() : x(0), y(0) {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]

Suggested change
__host__ __device__ Int64Point() : x(0), y(0) {}
__host__ _device_ Int64Point() : x(0), y(0) {}


struct IntRect
{
__host__ __device__ IntRect()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]

Suggested change
__host__ __device__ IntRect()
__host__ _device_ IntRect()


// numeric operators

__host__ __device__ int fastModulo(const int input, const int ceil);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]

Suggested change
__host__ __device__ int fastModulo(const int input, const int ceil);
__host__ _device_ int fastModulo(const int input, const int ceil);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants