Browse Source

pnnx write implicit int conversion in python script (#5767)

tags/20241226
nihui GitHub 1 year ago
parent
commit
e71fdf8e51
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      .ci/pnnx.yml
  2. +1
    -1
      tools/pnnx/src/ir.cpp

+ 2
- 2
.ci/pnnx.yml View File

@@ -200,8 +200,8 @@ jobs:
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export MKL_ENABLE_INSTRUCTIONS=SSE4_2
cd tools/pnnx
cd build && ctest --output-on-failure -j 16
cd tools/pnnx/build
ctest --output-on-failure -j 16

- name: python-pnnx
run: |


+ 1
- 1
tools/pnnx/src/ir.cpp View File

@@ -1051,7 +1051,7 @@ static std::string expand_expression(const Operator* op)
|| t == "torch.long")
{
std::string unaryop = t;
if (t == "int") unaryop = "int";
if (t == "int") unaryop = ""; // but the explicit int() causes troubles in tracing
if (t == "abs") unaryop = "torch.abs";
if (t == "acos") unaryop = "torch.acos";
if (t == "acosh") unaryop = "torch.acosh";


Loading…
Cancel
Save